Skip to content

Commit bc4d8ad

Browse files
committed
use new _TRIPLETSH variable in llvm codepath
1 parent eeb1c5a commit bc4d8ad

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
@@ -745,25 +745,25 @@ build_single_target() {
745745
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -I${tmp}/include/c++/backward"
746746
fi
747747
elif [ "${_HOSTOS}" = 'linux' ] && [ "${_OS}" = 'linux' ] && [ "${unamem}" != "${_machine}" ] && [ "${_CC}" = 'llvm' ]; then
748-
_CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -isystem /usr/${_machine}-linux-gnu/include"
749-
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -L/usr/${_machine}-linux-gnu/lib"
748+
_CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -isystem /usr/${_TRIPLETSH}/include"
749+
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -L/usr/${_TRIPLETSH}/lib"
750750
# https://packages.debian.org/testing/all/libgcc-13-dev-arm64-cross/filelist
751751
# /usr/lib/gcc-cross/aarch64-linux-gnu/13/
752-
tmp="$(find "/usr/lib/gcc-cross/${_machine}-linux-gnu" -mindepth 1 -maxdepth 1 -type d | head -n 1)"
752+
tmp="$(find "/usr/lib/gcc-cross/${_TRIPLETSH}" -mindepth 1 -maxdepth 1 -type d | head -n 1)"
753753
if [ -z "${tmp}" ]; then
754754
>&2 echo '! Error: Failed to detect gcc-cross env root.'
755755
exit 1
756756
fi
757757
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -L${tmp}"
758758
# https://packages.debian.org/testing/all/libstdc++-13-dev-arm64-cross/filelist
759759
# /usr/aarch64-linux-gnu/include/c++/13/
760-
tmp="$(find "/usr/${_machine}-linux-gnu/include/c++" -mindepth 1 -maxdepth 1 -type d | head -n 1)"
760+
tmp="$(find "/usr/${_TRIPLETSH}/include/c++" -mindepth 1 -maxdepth 1 -type d | head -n 1)"
761761
if [ -z "${tmp}" ]; then
762762
>&2 echo '! Error: Failed to detect g++-cross env root.'
763763
exit 1
764764
fi
765765
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -I${tmp}/include/c++"
766-
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -I${tmp}/include/c++/${_machine}-linux-gnu"
766+
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -I${tmp}/include/c++/${_TRIPLETSH}"
767767
_CXXFLAGS_GLOBAL="${_CXXFLAGS_GLOBAL} -I${tmp}/include/c++/backward"
768768
fi
769769

0 commit comments

Comments
 (0)