@@ -1113,21 +1113,24 @@ build_single_target() {
11131113 _CXXFLAGS_GLOBAL+=" -I${tmp} /include/c++/${_TRIPLET} "
11141114 _CXXFLAGS_GLOBAL+=" -I${tmp} /include/c++/backward"
11151115 fi
1116- elif [ " ${_HOST} " = ' linux' ] && [ " ${_OS} " = ' linux' ] && [ " ${unamem} " != " ${_machine} " ] && [ " ${_CC} " = ' llvm' ]; then
1117- if [ " ${_CRT} " != ' musl' ]; then
1118- _CFLAGS_GLOBAL+=" -isystem /usr/${_TRIPLETSH} /include"
1119- _LDFLAGS_GLOBAL+=" -L/usr/${_TRIPLETSH} /lib"
1120- if [ " ${_CCRT} " = ' libgcc' ]; then
1121- # https://packages.debian.org/testing/all/libgcc-13-dev-arm64-cross/filelist
1122- # /usr/lib/gcc-cross/aarch64-linux-gnu/13/
1123- tmp=" $( find " /usr/lib/gcc-cross/${_TRIPLETSH} " -mindepth 1 -maxdepth 1 -type d | head -n 1 || true) "
1124- if [ -z " ${tmp} " ]; then
1125- >&2 echo ' ! Error: Failed to detect gcc-cross env root.'
1126- exit 1
1116+ elif [ " ${_HOST} " = ' linux' ] && [ " ${_OS} " = ' linux' ] && [ " ${unamem} " != " ${_machine} " ]; then
1117+ if [ " ${_CC} " = ' llvm' ]; then
1118+ if [ " ${_CRT} " != ' musl' ]; then
1119+ _CFLAGS_GLOBAL+=" -isystem /usr/${_TRIPLETSH} /include"
1120+ _LDFLAGS_GLOBAL+=" -L/usr/${_TRIPLETSH} /lib"
1121+ if [ " ${_CCRT} " = ' libgcc' ]; then
1122+ # https://packages.debian.org/testing/all/libgcc-13-dev-arm64-cross/filelist
1123+ # /usr/lib/gcc-cross/aarch64-linux-gnu/13/
1124+ tmp=" $( find " /usr/lib/gcc-cross/${_TRIPLETSH} " -mindepth 1 -maxdepth 1 -type d | head -n 1 || true) "
1125+ if [ -z " ${tmp} " ]; then
1126+ >&2 echo ' ! Error: Failed to detect gcc-cross env root.'
1127+ exit 1
1128+ fi
1129+ _LDFLAGS_GLOBAL+=" -L${tmp} "
11271130 fi
1128- _LDFLAGS_GLOBAL+=" -L${tmp} "
11291131 fi
11301132 fi
1133+
11311134 if [ " ${_DISTRO} " = ' debian' ]; then
11321135 # https://packages.debian.org/testing/all/libstdc++-13-dev-arm64-cross/filelist
11331136 # /usr/aarch64-linux-gnu/include/c++/13/
0 commit comments