Skip to content

Commit

Permalink
_build.sh: blind try for debian musl missing <memory> C++ header
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Nov 8, 2024
1 parent 0b0b785 commit 02de741
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions _build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1108,18 +1108,22 @@ build_single_target() {
_CXXFLAGS_GLOBAL+=" -I${tmp}/include/c++/${_TRIPLET}"
_CXXFLAGS_GLOBAL+=" -I${tmp}/include/c++/backward"
fi
elif [ "${_HOST}" = 'linux' ] && [ "${_OS}" = 'linux' ] && [ "${unamem}" != "${_machine}" ] && [ "${_CC}" = 'llvm' ] && [ "${_CRT}" != 'musl' ]; then
_CFLAGS_GLOBAL+=" -isystem /usr/${_TRIPLETSH}/include"
_LDFLAGS_GLOBAL+=" -L/usr/${_TRIPLETSH}/lib"
if [ "${_CCRT}" = 'libgcc' ]; then
# https://packages.debian.org/testing/all/libgcc-13-dev-arm64-cross/filelist
# /usr/lib/gcc-cross/aarch64-linux-gnu/13/
tmp="$(find "/usr/lib/gcc-cross/${_TRIPLETSH}" -mindepth 1 -maxdepth 1 -type d | head -n 1 || true)"
if [ -z "${tmp}" ]; then
>&2 echo '! Error: Failed to detect gcc-cross env root.'
exit 1
elif [ "${_HOST}" = 'linux' ] && [ "${_OS}" = 'linux' ] && [ "${unamem}" != "${_machine}" ] && [ "${_CC}" = 'llvm' ]; then
if [ "${_CRT}" != 'musl' ]; then
_CFLAGS_GLOBAL+=" -isystem /usr/${_TRIPLETSH}/include"
_LDFLAGS_GLOBAL+=" -L/usr/${_TRIPLETSH}/lib"
if [ "${_CCRT}" = 'libgcc' ]; then
# https://packages.debian.org/testing/all/libgcc-13-dev-arm64-cross/filelist
# /usr/lib/gcc-cross/aarch64-linux-gnu/13/
tmp="$(find "/usr/lib/gcc-cross/${_TRIPLETSH}" -mindepth 1 -maxdepth 1 -type d | head -n 1 || true)"
if [ -z "${tmp}" ]; then
>&2 echo '! Error: Failed to detect gcc-cross env root.'
exit 1
fi
_LDFLAGS_GLOBAL+=" -L${tmp}"
fi
_LDFLAGS_GLOBAL+=" -L${tmp}"
fi
if [ "${_DISTRO}" = 'debian' ]; then
# 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)"
Expand Down

0 comments on commit 02de741

Please sign in to comment.