Merge branch 'hosted-gcc' into 'master'

Avoid overriding GCC build sysroot

See merge request redox-os/redox!1811
This commit is contained in:
Jeremy Soller 2026-01-06 06:26:18 -07:00
commit d4e502f961

View File

@ -32,10 +32,17 @@ COOKBOOK_CONFIGURE_FLAGS=(
--with-native-system-header-dir="/include"
--disable-hosted-libstdcxx
--with-sysroot
--with-build-sysroot="${COOKBOOK_CROSS_SYSROOT:-$COOKBOOK_SYSROOT}"
)
else
export CFLAGS_FOR_TARGET="${CPPFLAGS}" CXXFLAGS_FOR_TARGET="${CPPFLAGS}" LDFLAGS_FOR_TARGET="${LDFLAGS}"
export CC_FOR_BUILD="$CC_WRAPPER gcc" CXX_FOR_BUILD="$CC_WRAPPER g++"
unset CFLAGS CPPFLAGS LDFLAGS
COOKBOOK_CONFIGURE_FLAGS+=(
--with-sysroot=/
--with-gmp="${COOKBOOK_SYSROOT}/usr"
--with-mpfr="${COOKBOOK_SYSROOT}/usr"
--with-mpc="${COOKBOOK_SYSROOT}/usr"
)
fi
@ -48,7 +55,6 @@ fi
COOKBOOK_CONFIGURE_FLAGS+=(
--target="${CROSS_GNU_TARGET}"
--with-build-sysroot="${COOKBOOK_CROSS_SYSROOT:-$COOKBOOK_SYSROOT}"
--with-linker-hash-style=gnu
--enable-languages=c,c++,lto
--enable-initfini-array