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