Skip to content

Commit

Permalink
picolibc: fix libstd++ build
Browse files Browse the repository at this point in the history
When building libstd++ toolchain should not use includes from newlib
because it places __getreent calls into the lib. So, it's definitely
wrong

This change is a continuation of the commit:
046d948 crosstool-ng: fix libstdc++ configuration for canadian builds
  • Loading branch information
Lapshin committed Aug 25, 2024
1 parent 27d8f45 commit 0e51843
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/build/cc/gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,12 @@ do_gcc_core_backend() {
# selection that doesn't merge the headers (i.e. musl, uClibc-ng) may not
# work. Better suggestions welcome.
if [ "${CT_USE_SYSROOT}" != "y" ]; then
cflags_for_target="${cflags_for_target} -idirafter ${CT_HEADERS_DIR}"
if [ "${build_step}" = "libstdcxx" ]; then
local gcc_version=$(cat "${CT_SRC_DIR}/gcc/gcc/BASE-VER" )
cflags_for_target="${cflags_for_target} -idirafter ${CT_PREFIX_DIR}/lib/gcc/${CT_TARGET}/${gcc_version}/include -nostdinc"
else
cflags_for_target="${cflags_for_target} -idirafter ${CT_HEADERS_DIR}"
fi
fi

# Assume '-O2' by default for building target libraries.
Expand Down

0 comments on commit 0e51843

Please sign in to comment.