public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Wrong header included in cross build with asymmetric GCC versions
@ 2017-05-25 18:23 K. B.
  0 siblings, 0 replies; only message in thread
From: K. B. @ 2017-05-25 18:23 UTC (permalink / raw)
  To: gcc

A non-bootstrapped build:
build triplet is x86_64-linux-gnu
host,target triplet is x86_64-none-linux-musl
host compiler is gcc version 6.3.0

./configure --prefix=/usr --sysconfdir=/etc
--target=x86_64-none-linux-musl --host=x86_64-none-linux-musl
--libexecdir=/usr/lib --enable-threads=posix --libdir=/usr/lib
--disable-nls --with-sysroot=/ --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --with-system-zlib
--with-target-system-zlib --with-tune=generic

libgcc/config/i386/cpuinfo.c: fails on undeclared identifiers where
included "cpuid.h" ends up being incorrectly sourced from the 6.3.0
host compiler.
I believe this error is not unique to this file and exposes a larger
flaw within the build system in the handling of include paths for
non-boostrapping/cross builds and is otherwise undetected until a
header mismatch of this sort occurs.


make[3]: Leaving directory
'/home/deb/src/build/buildroot-x86/custom/gcc-7.1.0/x86_64-none-linux-musl/libgcc'
x86_64-none-linux-musl-cc   -g -O2 -O2  -g -O2 -DIN_GCC    -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include
-fpic -mlong-double-80 -DUSE_ELF_SYMVER -g -DIN_LIBGCC2
-fbuilding-libgcc -fno-stack-protector   -fpic -mlong-double-80
-DUSE_ELF_SYMVER -I. -I. -I../../host-x86_64-none-linux-musl/gcc
-I../.././libgcc -I../.././libgcc/. -I../.././libgcc/../gcc
-I../.././libgcc/../include  -DHAVE_CC_TLS  -DUSE_TLS -o cpuinfo.o -MT
cpuinfo.o -MD -MP -MF cpuinfo.dep  -c
../.././libgcc/config/i386/cpuinfo.c -fvisibility=hidden
-DHIDE_EXPORTS
../.././libgcc/config/i386/cpuinfo.c: In function ‘get_available_features’:
../.././libgcc/config/i386/cpuinfo.c:278:17: error:
‘bit_AVX512VPOPCNTDQ’ undeclared (first use in this function)
       if (ecx & bit_AVX512VPOPCNTDQ)
                 ^~~~~~~~~~~~~~~~~~~
../.././libgcc/config/i386/cpuinfo.c:278:17: note: each undeclared
identifier is reported only once for each function it appears in
../.././libgcc/config/i386/cpuinfo.c:280:17: error: ‘bit_AVX5124VNNIW’
undeclared (first use in this function)
       if (edx & bit_AVX5124VNNIW)
                 ^~~~~~~~~~~~~~~~
../.././libgcc/config/i386/cpuinfo.c:282:17: error: ‘bit_AVX5124FMAPS’
undeclared (first use in this function)
       if (edx & bit_AVX5124FMAPS)
                 ^~~~~~~~~~~~~~~~
../.././libgcc/shared-object.mk:14: recipe for target 'cpuinfo.o' failed
make[2]: *** [cpuinfo.o] Error 1
make[2]: Leaving directory
'/home/deb/src/build/buildroot-x86/custom/gcc-7.1.0/x86_64-none-linux-musl/libgcc'
Makefile:13316: recipe for target 'all-target-libgcc' failed
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory '/home/deb/src/build/buildroot-x86/custom/gcc-7.1.0'
Makefile:897: recipe for target 'all' failed
make: *** [all] Error 2

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-25 18:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-25 18:23 Wrong header included in cross build with asymmetric GCC versions K. B.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).