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

Bug#717557: gcc-4.8: can't compile working 64bit kernel with 32bit userspace gcc-4.8



On Sun, 2013-10-20 at 22:21 +0200, Matthias Klose wrote:
> Am 20.10.2013 00:25, schrieb Ben Hutchings:
> > On Sat, 2013-10-19 at 23:38 +0200, Matthias Klose wrote:
> >> Control: severity -1 important Control: tags -1 + moreinfo
> >> 
> >>>> In file included from <command-line>:0:0: 
> >>>> /usr/include/stdc-predef.h:30:26: fatal error: bits/predefs.h: No
> >>>> such file
> >>> or directory
> >>>> #include <bits/predefs.h> ^
> >>> compilation terminated.
> >>> 
> >>> It looks like I can avoid this by changing the compile tests to use
> >>> the -nostdinc option.  But this change may possibly cause other
> >>> problems, and neither the pre-included header nor the fact that
> >>> -nostdinc disables it seem to be documented.
> >> 
> >> please attach the test program and the command line options used for this
> >> test case.  I think the issue is within the kernel build system not being
> >> prepared for multiarch and -nostdinc.
> > 
> > gcc-4.8 -m64 -x c -c /dev/null
> 
> works for me on a current sid/i386. I assume that gcc-4.8-multilib is installed?

No, it works if that's installed.  But gcc-X.Y-multilib was previously
only needed for building with a 64-bit C library, not for building a
64-bit kernel.

If this kernel configuration was actually failing to build without
gcc-4.8-multilib, I wouldn't mind so much.  The problem is that it's
built wrongly now.  Maybe some later version of the kernel will be
changed to detect or work around this problem, but we have to assume
people will still try to build older versions not using -nostdinc for
some time to come.

The options to deal with this include:
1. Make missing headers non-fatal while pre-including <stdc-predef.h>.
2. Disable pre-inclusion of <stdc-predef.h>.
3. Make 32-bit gcc fail to compile anything with -m64 if
gcc-X.Y-multilib is not installed, even if -nostdinc is used.
4. Make gcc-X.Y depend on gcc-X.Y-multilib on architectures where it
exists.

Ben.

-- 
Ben Hutchings
Tomorrow will be cancelled due to lack of interest.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: