diff --git a/_build.sh b/_build.sh index f04787683..e1e99228d 100755 --- a/_build.sh +++ b/_build.sh @@ -1246,7 +1246,8 @@ build_single_target() { ccrtlib="${ccrtdir}/libclang_rt.builtins-${_machine}.a" ccrtlib="$(basename "${ccrtlib}" | cut -c 4-)" # delete 'lib' prefix ccrtlib="-l${ccrtlib%.*}" # clang_rt.builtins-aarch64 or gcc - _LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -nodefaultlibs -L${ccrtdir}" + libprefix="/usr/lib/${_machine}-linux-gnu" + _LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -nodefaultlibs -L${libprefix} -L${ccrtdir}" _LIBS_GLOBAL="${_LIBS_GLOBAL} -lc ${ccrtlib}" fi _LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -rtlib=compiler-rt"