Date: Sat, 14 Sep 2013 13:17:09 -0600 From: Ian Lepore <ian@FreeBSD.org> To: Dimitry Andric <dim@FreeBSD.org> Cc: freebsd-current@FreeBSD.org Subject: Re: aicasm build error Message-ID: <1379186229.1197.31.camel@revolution.hippie.lan> In-Reply-To: <55AEA8C2-9C47-4AB4-8626-EB7AC28839FC@FreeBSD.org> References: <1379181005.1197.24.camel@revolution.hippie.lan> <55AEA8C2-9C47-4AB4-8626-EB7AC28839FC@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2013-09-14 at 20:42 +0200, Dimitry Andric wrote: > On Sep 14, 2013, at 19:50, Ian Lepore <ian@freebsd.org> wrote: > > For a while I've been getting a build error on aicasm during the early > > steps of the build. Today I finally dug into it and discovered it's > > because the build is using a mix of header files, some from /usr/include > > on the build host, and some from obj/... for the target being built. It > > happens because dev/aic7xxx/aicasm/Makefile contains CFLAGS+= -I. and > > the current directory when aicasm builds is obj/.../<kernconf>. In my > > case it was picking up machine/_types.h from objdir. > > > > Apparently this is usually harmless, but if the build host system and > > the target versions are far enough apart, or with a cross-build where > > the host and target are different architectures, you can get problems. > > > > After a little digging, I just now discovered Marcel fixed this long ago > > in r70000, but then it got undone in r236578 a couple months ago. Is > > there any reason not to restore Marcel's fix, such as with the attached > > patch? > > It got undone for a specific reason, which is mentioned in the commit > message for r236578. > > This hack might make it work, but it might also cause other issues. The > problem really is how to make sure aicasm is compiled with the *host* > compiler, not the compiler from /usr/obj. > > -Dimitry > Actually, the commit message that removed it talks about -Wunused-arguments and -Werror and -nostdinc, and then says -nostdinc is removed, and says nothing at all about the fact that -I/usr/include was also removed at the same time. I'm proposing adding back the -I but not the -nostdinc. Another possibly-viable fix is to remove the -I. so that it doesn't pick up headers from obj/..., which makes buildkernel work for me, but maybe it would cause the aicasm build to fail if built separately or something. -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1379186229.1197.31.camel>