mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-17 23:44:17 +08:00
Enable hosted libstdc++ for i586 & riscv64gc with workaround
This commit is contained in:
parent
7c1132a728
commit
dcc12a361a
@ -228,7 +228,7 @@ else
|
||||
cp -r "$(PREFIX)/libtool-install/". "$@.partial"
|
||||
@#TODO: how to make this not conflict with libc?
|
||||
rm -f "$@.partial/lib/gcc/$(GNU_TARGET)/13.2.0/include/limits.h"
|
||||
# libgcc and bare features of libstdcxx
|
||||
# libgcc and freestanding libstdcxx
|
||||
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
|
||||
$(MAKE) -C "$(ROOT)/$(GCC_TARGET)/build" all-target-libgcc all-target-libstdc++-v3 && \
|
||||
$(MAKE) -C "$(ROOT)/$(GCC_TARGET)/build" install-target-libgcc install-target-libstdc++-v3 DESTDIR="$(ROOT)/$@-build.partial/usr"
|
||||
@ -239,15 +239,11 @@ else
|
||||
@#TODO: generates wrong lib path for libtool
|
||||
rm -f "$@.partial"/$(GNU_TARGET)/lib/libstdc++.la
|
||||
rm -f "$@.partial"/$(GNU_TARGET)/lib/libsupc++.la
|
||||
# fully featured libstdcxx, not supported for targets only supporting static linking
|
||||
ifneq ($(TARGET),riscv64gc-unknown-redox)
|
||||
ifneq ($(TARGET),i586-unknown-redox)
|
||||
# hosted libstdcxx
|
||||
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
|
||||
export $(PREFIX_CONFIG) "COOKBOOK_HOST_SYSROOT=$(ROOT)/$@.partial" COOKBOOK_CROSS_TARGET=$(HOST_TARGET) && \
|
||||
rm -rf "$(LIBSTDCXX_TARGET)/stage" && ./target/release/repo cook libstdcxx-v3
|
||||
cp -r "$(LIBSTDCXX_TARGET)/stage/usr/". "$@.partial/$(GNU_TARGET)"
|
||||
endif
|
||||
endif
|
||||
rm -rf "$@-build.partial"
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
|
||||
@ -11,6 +11,11 @@ COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--enable-libstdcxx-threads
|
||||
)
|
||||
|
||||
# TODO: Investigate why mutex is not available in riscv64
|
||||
if [ "${TARGET}" = "riscv64gc-unknown-redox" ]; then
|
||||
COOKBOOK_CONFIGURE_FLAGS+=( --without-libstdcxx-zoneinfo )
|
||||
fi
|
||||
|
||||
CPPINCLUDE="${COOKBOOK_HOST_SYSROOT}/$TARGET/include/c++/13.2.0"
|
||||
export CPPFLAGS+=" -I${CPPINCLUDE} -I${CPPINCLUDE}/$TARGET/bits"
|
||||
COOKBOOK_CONFIGURE="${COOKBOOK_SOURCE}/libstdc++-v3/configure"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user