Skip to content

Commit

Permalink
test musl cross-builds 3 llvm
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Oct 30, 2023
1 parent 3c26721 commit c7c3820
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c7c3820

Please sign in to comment.