From c7c38208a9222619a12a39e10960f94c2e79eb4c Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 30 Oct 2023 19:55:15 +0000 Subject: [PATCH] test musl cross-builds 3 llvm --- _build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_build.sh b/_build.sh index 4d20b6f11..004e8978c 100755 --- a/_build.sh +++ b/_build.sh @@ -1175,6 +1175,7 @@ build_single_target() { ccrsdir="$(dirname "${ccrtlib}")" # /usr/lib/gcc/aarch64-linux-gnu/12 ccrtlib="$(basename "${ccrtlib}" | cut -c 4-)" # delete 'lib' prefix ccrtlib="-l${ccrtlib%.*}" # 'gcc' + ccridir="${ccrsdir}" else if [ "${unamem}" = "${_machine}" ]; then gccroot="/usr/lib/gcc/${_TRIPLETSH}" # /usr/lib/gcc/aarch64-linux-gnu/12 @@ -1189,9 +1190,10 @@ build_single_target() { ccrsdir="${ccrtdir}" ccrtlib="-lgcc -lgcc_eh" _LDFLAGS_CXX_GLOBAL="${_LDFLAGS_CXX_GLOBAL} -nostdlib++" + ccridir="$("clang${_CCSUFFIX}" -print-resource-dir)" # /usr/lib/llvm-13/lib/clang/13.0.1 fi libprefix="/usr/lib/${_machine}-linux-musl" - _CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -static -nostdinc -isystem ${ccrsdir}/include -isystem /usr/include/${_machine}-linux-musl" + _CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -static -nostdinc -isystem ${ccridir}/include -isystem /usr/include/${_machine}-linux-musl" _LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -nostartfiles -L${libprefix} -Wl,${libprefix}/Scrt1.o -Wl,${libprefix}/crti.o -L${ccrsdir} -Wl,${libprefix}/crtn.o" _LIBS_GLOBAL="${_LIBS_GLOBAL} -lc ${ccrtlib}" fi