mirror of
git://git.musl-libc.org/musl
synced 2024-12-16 19:55:38 +00:00
5d26d5d15b
this is needed in case -lgcc is passed explicitly on the link command line, for example if the wrapper is being used to build musl itself.
38 lines
588 B
Bash
38 lines
588 B
Bash
incdir=$1
|
|
libdir=$2
|
|
ldso=$3
|
|
cat <<EOF
|
|
%rename cpp_options old_cpp_options
|
|
|
|
*cpp_options:
|
|
-nostdinc -isystem $incdir %(old_cpp_options)
|
|
|
|
*cc1:
|
|
%(cc1_cpu) -nostdinc -isystem $incdir
|
|
|
|
*link_libgcc:
|
|
-L$libdir -L .%s
|
|
|
|
*libgcc:
|
|
libgcc.a%s %:if-exists(libgcc_eh.a%s)
|
|
|
|
*startfile:
|
|
%{!shared: $libdir/%{pie:S}crt1.o} $libdir/crti.o %{shared|pie:crtbeginS.o%s;:crtbegin.o%s}
|
|
|
|
*endfile:
|
|
%{shared|pie:crtendS.o%s;:crtend.o%s} $libdir/crtn.o
|
|
|
|
*link:
|
|
-dynamic-linker $ldso -nostdlib %{shared:-shared} %{static:-static} %{rdynamic:-export-dynamic}
|
|
|
|
*esp_link:
|
|
|
|
|
|
*esp_options:
|
|
|
|
|
|
*esp_cpp_options:
|
|
|
|
|
|
EOF
|