Skip to content

Commit

Permalink
use new _TRIPLETSH variable in llvm codepath
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Sep 1, 2023
1 parent c2b4571 commit 8b5b076
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions _build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -732,25 +732,25 @@ build_single_target() {
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -I${tmp}/include/c++/backward"
fi
elif [ "${_HOSTOS}" = 'linux' ] && [ "${_OS}" = 'linux' ] && [ "${unamem}" != "${_machine}" ] && [ "${_CC}" = 'llvm' ]; then
_CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -isystem /usr/${_machine}-linux-gnu/include"
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -L/usr/${_machine}-linux-gnu/lib"
_CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -isystem /usr/${_TRIPLETSH}/include"
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -L/usr/${_TRIPLETSH}/lib"
# 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/${_machine}-linux-gnu" -mindepth 1 -maxdepth 1 -type d | head -n 1)"
tmp="$(find "/usr/lib/gcc-cross/${_TRIPLETSH}" -mindepth 1 -maxdepth 1 -type d | head -n 1)"
if [ -z "${tmp}" ]; then
>&2 echo '! Error: Failed to detect gcc-cross env root.'
exit 1
fi
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -L${tmp}"
# https://packages.debian.org/testing/all/libstdc++-13-dev-arm64-cross/filelist
# /usr/aarch64-linux-gnu/include/c++/13/
tmp="$(find "/usr/${_machine}-linux-gnu/include/c++" -mindepth 1 -maxdepth 1 -type d | head -n 1)"
tmp="$(find "/usr/${_TRIPLETSH}/include/c++" -mindepth 1 -maxdepth 1 -type d | head -n 1)"
if [ -z "${tmp}" ]; then
>&2 echo '! Error: Failed to detect g++-cross env root.'
exit 1
fi
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -I${tmp}/include/c++"
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -I${tmp}/include/c++/${_machine}-linux-gnu"
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -I${tmp}/include/c++/${_TRIPLETSH}"
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -I${tmp}/include/c++/backward"
fi

Expand Down

0 comments on commit 8b5b076

Please sign in to comment.