Skip to content

Commit

Permalink
gcc musl manual 1
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Oct 11, 2023
1 parent 181cba4 commit 622dc4b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions _build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1132,10 +1132,17 @@ build_single_target() {
clangrtlib="$(basename "${clangrtlib}" | cut -c 4-)" # delete 'lib' prefix
clangrtlib="${clangrtlib%.*}" # gcc
libprefix="/usr/lib/${_machine}-linux-musl"
_CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -nostdinc -isystem ${clangrsdir}/include -isystem /usr/include/${_machine}-linux-musl"
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -nostdlib -nodefaultlibs -nostartfiles -L${libprefix} ${libprefix}/crt1.o ${libprefix}/crti.o -L${clangrsdir} ${libprefix}/crtn.o"
_LIBS_GLOBAL="${_LIBS_GLOBAL} -lc -l${clangrtlib}"
_CFLAGS_GLOBAL="${_CFLAGS_GLOBAL} -nostdinc -isystem /usr/include/${_machine}-linux-musl -isystem include"
_LDFLAGS_GLOBAL="${_LDFLAGS_GLOBAL} -nostdlib -nodefaultlibs -nostartfiles -L${libprefix} ${libprefix}/Scrt1.o ${libprefix}/crti.o -L${clangrsdir} crtbeginS.o crtendS.o ${libprefix}/crtn.o"
_LIBS_GLOBAL="${_LIBS_GLOBAL} -lc libgcc.a libgcc_eh.a"
fi
# *cpp_options: -nostdinc -isystem /usr/include/aarch64-linux-musl -isystem include%s %(old_cpp_options)
# *cc1: %(cc1_cpu) -nostdinc -isystem /usr/include/aarch64-linux-musl -isystem include%s
# *link_libgcc: -L/usr/lib/aarch64-linux-musl -L .%s
# *libgcc: libgcc.a%s %:if-exists(libgcc_eh.a%s)
# *startfile: %{!shared: /usr/lib/aarch64-linux-musl/Scrt1.o} /usr/lib/aarch64-linux-musl/crti.o crtbeginS.o%s
# *endfile: crtendS.o%s /usr/lib/aarch64-linux-musl/crtn.o
# *link: -dynamic-linker /lib/ld-musl-aarch64.so.1 -nostdlib %{shared:-shared} %{static:-static} %{rdynamic:-export-dynamic}

if [ "${_CCRT}" = 'clang-rt' ]; then
if [ "${_TOOLCHAIN}" != 'llvm-apple' ]; then
Expand Down

0 comments on commit 622dc4b

Please sign in to comment.