From 153c805ac9fd8bac082ac6e44f834fa92ddd7df7 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 1 Nov 2023 09:17:49 +0000 Subject: [PATCH] fixup 5 --- _build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_build.sh b/_build.sh index 0476bd160..3ced1be00 100755 --- a/_build.sh +++ b/_build.sh @@ -1248,6 +1248,10 @@ build_single_target() { ccrtlib="-l${ccrtlib%.*}" # clang_rt.builtins-aarch64 or gcc libprefix="/usr/${_TRIPLETSH}/lib" _LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -nodefaultlibs -L${libprefix} -L${ccrtdir}" + # lld by default wants to load startfiles from + # /usr/bin/../lib/gcc-cross/x86_64-linux-gnu/12/../../../../x86_64-linux-gnu/lib/ + # or similar. + _LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -nostartfiles ${libprefix}/Scrt1.o ${libprefix}/crti.o ${libprefix}/crtn.o" _LIBS_GLOBAL="${_LIBS_GLOBAL} -lc ${ccrtlib}" fi _LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -rtlib=compiler-rt"