Avoid overriding GCC build sysroot

This commit is contained in:
Wildan M 2026-01-06 09:44:21 +07:00
parent 1cf1ffabc1
commit e9d0d843d0
No known key found for this signature in database
GPG Key ID: 01AC53185C679C79

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