https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90653
Bug ID: 90653 Summary: --with-build-sysroot= not honored for ./configure C compiler checks. Product: gcc Version: 8.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: kallisti5 at unixzen dot com Target Milestone: --- After updating from gcc 7.3.x to 8.3.x, the early stage of our bootstrap is no longer finding our provided sysroot. Build flags: CFLAGS="-O2 -U_FORTIFY_SOURCE" CXXFLAGS="-O2" ./configure \ --build=$buildMachineTriple --host=$effectiveTargetMachineTriple \ --target=$effectiveTargetMachineTriple --prefix=$installDir \ --libexecdir=$installDir/lib --mandir=$manDir --docdir=$docDir \ --disable-nls --enable-shared --disable-plugin \ --enable-version-specific-runtime-libs \ --enable-languages=c,c++ --enable-lto --enable-frame-pointer \ --enable-threads=posix --enable-tls \ --with-pkgversion=$(echo $portVersion | cut -c 7-) \ --with-sysroot=/ \ --with-build-sysroot=$sysrootLocation \ --with-threads=posix \ --with-default-libstdcxx-abi=gcc4-compatible \ --disable-libstdcxx-pch \ $sysrootLocation is: /work/generated.ppc/objects/haiku/ppc/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-8.3.0_2019_05_24/boot/cross-sysroot/ppc With this, we get: "error: C compiler cannot create executables" Our startfile specs are valid... #define STANDARD_STARTFILE_PREFIX_1 "/boot/system/non-packaged/develop/lib/" #define STANDARD_STARTFILE_PREFIX_2 "/boot/system/develop/lib/" ...and we have a valid early build sysroot: root@9e90f9304b75:/work/generated.ppc# find /work/generated.ppc/objects/haiku/ppc/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-8.3.0_2019_05_24/boot/cross-sysroot/ppc | grep develop/lib /work/generated.ppc/objects/haiku/ppc/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-8.3.0_2019_05_24/boot/cross-sysroot/ppc/boot/system/develop/lib /work/generated.ppc/objects/haiku/ppc/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-8.3.0_2019_05_24/boot/cross-sysroot/ppc/boot/system/develop/lib/crti.o /work/generated.ppc/objects/haiku/ppc/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-8.3.0_2019_05_24/boot/cross-sysroot/ppc/boot/system/develop/lib/crtn.o /work/generated.ppc/objects/haiku/ppc/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-8.3.0_2019_05_24/boot/cross-sysroot/ppc/boot/system/develop/lib/init_term_dyn.o /work/generated.ppc/objects/haiku/ppc/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-8.3.0_2019_05_24/boot/cross-sysroot/ppc/boot/system/develop/lib/start_dyn.o /work/generated.ppc/objects/haiku/ppc/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-8.3.0_2019_05_24/boot/cross-sysroot/ppc/boot/system/develop/lib/haiku_version_glue.o /work/generated.ppc/objects/haiku/ppc/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-8.3.0_2019_05_24/boot/cross-sysroot/ppc/boot/system/develop/lib/libroot.so However, we get gcc executed during the configure stage and receive: /work/generated.ppc/cross-tools-ppc/lib/gcc/powerpc-apple-haiku/8.3.0/../../../../powerpc-apple-haiku/bin/ld: cannot find crti.o: No such file or directory /work/generated.ppc/cross-tools-ppc/lib/gcc/powerpc-apple-haiku/8.3.0/../../../../powerpc-apple-haiku/bin/ld: cannot find start_dyn.o: No such file or directory /work/generated.ppc/cross-tools-ppc/lib/gcc/powerpc-apple-haiku/8.3.0/../../../../powerpc-apple-haiku/bin/ld: cannot find init_term_dyn.o: No such file or directory /work/generated.ppc/cross-tools-ppc/lib/gcc/powerpc-apple-haiku/8.3.0/../../../../powerpc-apple-haiku/bin/ld: cannot find -lroot /work/generated.ppc/cross-tools-ppc/lib/gcc/powerpc-apple-haiku/8.3.0/../../../../powerpc-apple-haiku/bin/ld: cannot find crtn.o: No such file or directory I'm not sure if this is a autoconf bug, or a gcc bug. I think *maybe* autoconf handles the "generate valid executables with C compiler" phase?