Skip to content

Commit b708b19

Browse files
committed
use new _TRIPLETSH variable in llvm codepath
1 parent 1e2e483 commit b708b19

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

_build.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -732,25 +732,25 @@ build_single_target() {
732732
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -I${tmp}/include/c++/backward"
733733
fi
734734
elif [ "${_HOSTOS}" = 'linux' ] && [ "${_OS}" = 'linux' ] && [ "${unamem}" != "${_machine}" ] && [ "${_CC}" = 'llvm' ]; then
735-
_CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -isystem /usr/${_machine}-linux-gnu/include"
736-
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -L/usr/${_machine}-linux-gnu/lib"
735+
_CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -isystem /usr/${_TRIPLETSH}/include"
736+
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -L/usr/${_TRIPLETSH}/lib"
737737
# https://packages.debian.org/testing/all/libgcc-13-dev-arm64-cross/filelist
738738
# /usr/lib/gcc-cross/aarch64-linux-gnu/13/
739-
tmp="$(find "/usr/lib/gcc-cross/${_machine}-linux-gnu" -mindepth 1 -maxdepth 1 -type d | head -n 1)"
739+
tmp="$(find "/usr/lib/gcc-cross/${_TRIPLETSH}" -mindepth 1 -maxdepth 1 -type d | head -n 1)"
740740
if [ -z "${tmp}" ]; then
741741
>&2 echo '! Error: Failed to detect gcc-cross env root.'
742742
exit 1
743743
fi
744744
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -L${tmp}"
745745
# https://packages.debian.org/testing/all/libstdc++-13-dev-arm64-cross/filelist
746746
# /usr/aarch64-linux-gnu/include/c++/13/
747-
tmp="$(find "/usr/${_machine}-linux-gnu/include/c++" -mindepth 1 -maxdepth 1 -type d | head -n 1)"
747+
tmp="$(find "/usr/${_TRIPLETSH}/include/c++" -mindepth 1 -maxdepth 1 -type d | head -n 1)"
748748
if [ -z "${tmp}" ]; then
749749
>&2 echo '! Error: Failed to detect g++-cross env root.'
750750
exit 1
751751
fi
752752
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -I${tmp}/include/c++"
753-
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -I${tmp}/include/c++/${_machine}-linux-gnu"
753+
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -I${tmp}/include/c++/${_TRIPLETSH}"
754754
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -I${tmp}/include/c++/backward"
755755
fi
756756

0 commit comments

Comments
 (0)