On Sat, 2013-09-14 at 20:42 +0200, Dimitry Andric wrote: > On Sep 14, 2013, at 19:50, Ian Lepore <ian_at_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 > What do you think about this patch, which should achieve that goal? This builds aicasm along with the compiler and binutils and all the other compile-related tools. Using this, I'm able to add "device ahc" to the kernel config of an arm cross-build and it works. (That's not useful of course, except to demonstrate that it now uses the right compiler and then runs the tool successfully during a kernel build.) I see no straighforward way to do this as part of the kernel build, which means aicasm gets built whether your kernel config includes an ahc/ahd device or not. I suspect that's going to make some people unhappy, but it takes less than a second to build aicasm on my machine, it's really not a big burden. -- Ian
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:41 UTC