Skip to content

Commit

Permalink
try installing libstdc++ 4
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Nov 9, 2024
1 parent c7f509d commit ca78607
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
25 changes: 19 additions & 6 deletions _build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1127,13 +1127,26 @@ build_single_target() {
# https://packages.debian.org/testing/all/libstdc++-13-dev-arm64-cross/filelist
# /usr/aarch64-linux-gnu/include/c++/13/
tmp="$(find "/usr/${_TRIPLETSH}/include/c++" -mindepth 1 -maxdepth 1 -type d | head -n 1 || true)"
if [ -z "${tmp}" ]; then
>&2 echo '! Error: Failed to detect g++-cross env root.'
exit 1
if [ -n "${tmp}" ]; then
_CXXFLAGS_GLOBAL+=" -I${tmp}"
_CXXFLAGS_GLOBAL+=" -I${tmp}/${_TRIPLETSH}"
_CXXFLAGS_GLOBAL+=" -I${tmp}/backward"
else
# https://packages.debian.org/trixie/arm64/libstdc++-12-dev/filelist
# /usr/include/c++/12/algorithm
# /usr/include/aarch64-linux-gnu/c++/12/ext/opt_random.h
tmp1="$(find "/usr/include/c++" -mindepth 1 -maxdepth 1 -type d | head -n 1 || true)"
tmp2="$(find "/usr/include/${_TRIPLETSH}/c++" -mindepth 1 -maxdepth 1 -type d | head -n 1 || true)"
if [ -n "${tmp1}" ] && \
[ -n "${tmp2}" ]; then
_CXXFLAGS_GLOBAL+=" -I${tmp1}"
_CXXFLAGS_GLOBAL+=" -I${tmp2}"
_CXXFLAGS_GLOBAL+=" -I${tmp1}/backward"
else
>&2 echo '! Error: Failed to detect g++-cross env root.'
exit 1
fi
fi
_CXXFLAGS_GLOBAL+=" -I${tmp}"
_CXXFLAGS_GLOBAL+=" -I${tmp}/${_TRIPLETSH}"
_CXXFLAGS_GLOBAL+=" -I${tmp}/backward"
fi
fi

Expand Down
7 changes: 7 additions & 0 deletions _ci-linux-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ elif [[ "${CW_CONFIG:-}" = *'linux'* ]]; then
extra+=" libc6-dev-arm64-cross"
fi
[[ "${CW_CONFIG:-}" = *'r64'* ]] && extra+=" libc6-dev-riscv64-cross"

if [ "$(uname -m)" = 'aarch64' ]; then
extra+=" libc6-dev-amd64-cross libstdc++${CW_GCCSUFFIX}-dev-amd64-cross"
else
extra+=" libc6-dev-arm64-cross libstdc++${CW_GCCSUFFIX}-dev-arm64-cross"
fi
[[ "${CW_CONFIG:-}" = *'r64'* ]] && extra+=" libc6-dev-riscv64-cross libstdc++${CW_GCCSUFFIX}-dev-riscv64-cross"
fi
if [[ "${CW_CONFIG:-}" = *'boringssl'* ]] || [[ "${CW_CONFIG:-}" = *'awslc'* ]]; then
if [ "$(uname -m)" = 'aarch64' ]; then
Expand Down

0 comments on commit ca78607

Please sign in to comment.