[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#797324: gcc-5: please support multiarch path to kfreebsd-kernel-headers

Control: tags -1 - patch + moreinfo

Matthias Klose wrote:
> On 08/31/2015 03:42 PM, Steven Chamberlain wrote:
> >> +
> >> +ifeq ($(DEB_TARGET_ARCH_OS),kfreebsd)
> >> +	: # multilib builds without b-d on gcc-multilib (used in FLAGS_FOR_TARGET)
> >> +	ln -sf /usr/include/$(DEB_TARGET_MULTIARCH) $(builddir_jit)/sys-include
> >> +endif
> >> +
> >
> > [...] to build
> > the native jit compiler after we have moved kernel headers to a
> > multiarch path.
> why is this needed for the jit build?

Seems it was only the multilib jit builds that needed this.

I installed my experimental kfreebsd-kernel-headers package that
moves kernel headers to /usr/include/$(DEB_TARGET_MULTIARCH), and it
was failing with:

| /«PKGBUILDDIR»/build-jit/./gcc/xgcc -B/«PKGBUILDDIR»/build-jit/./gcc/ -B/usr/x86_64-kfreebsd-gnu/bin/ -B/usr/x86_64-kfreebsd-gnu/lib/ -isystem /usr/x86_64-kfreebsd-gnu/include -isystem /usr/x86_64-kfreebsd-gnu/sys-include -isystem /«PKGBUILDDIR»/build-jit/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC -fPIC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fpic -mlong-double-80 -I. -I. -I../.././gcc -I../../../src/libgcc -I../../../src/libgcc/. -I../../../src/libgcc/../gcc -I../../../src/libgcc/../include  -DHAVE_CC_TLS  -DUSE_TLS -o generic-morestack-thread.o -MT generic-morestack-thread.o -MD -MP -MF generic-morestack-thread.dep  -c ../../../src/libgcc/generic-morestack-thread.c -fvisibility=hidden -DHIDE_EXPORTS
| In file included from /usr/include/bits/siginfo.h:196:0,
|                  from /usr/include/signal.h:80,
|                  from ../../../../src/libgcc/generic-morestack.c:42:
| /usr/include/x86_64-kfreebsd-gnu/sys/_types.h:33:28: fatal error: machine/_types.h: No such file or directory
| compilation terminated.
| ../../../../src/libgcc/shared-object.mk:14: recipe for target 'generic-morestack.o' failed
| make[6]: *** [generic-morestack.o] Error 1
| make[6]: Leaving directory '/«PKGBUILDDIR»/build-jit/x86_64-kfreebsd-gnu/32/libgcc'

The native jit build is okay with this, since it is already in the
default include search path:

    $ x86_64-kfreebsd-gnu-cpp-5 -v < /dev/null 2>&1 | grep '/usr/include'

But the multilib compiler does something different:

    $ x86_64-kfreebsd-gnu-cpp-5 -v -m32 < /dev/null 2>&1 | grep '/usr/include'
    ignoring nonexistent directory "/usr/include/i386-kfreebsd-gnu"

The multilib files are actually in /usr/include/x86_64-kfreebsd-gnu, yet
it is looking at /usr/include/i386-kfreebsd-gnu instead.

I don't know if this was intentional, but it is maybe convenient, that
multilib headers could someday be obsoleted by installing a foreign
kfreebsd-kernel-headers:kfreebsd-i386 for example.

This means I need to re-think my patch, however.

> at least for stretch, I'd like to avoid any build dependencies on foreign
> architectures, for both the native and the cross compiler.  It's too new, not
> yet completely supported.


> > Or rather, it seems ideal if someday linux kernel headers could move
> > too, and eventually multilib would become obsolete?
> I mentioned this to Aurelian too, but I think this would need testing first,
> what it will break ...  and my guess is that this will be a lot.


Right now I'm only looking for the minimal change to allow
kfreebsd-kernel-headers to move to multiarch paths.  The other
things are interesting, but only as longer-term goals.

Steven Chamberlain

Attachment: signature.asc
Description: Digital signature

Reply to: