summaryrefslogtreecommitdiff
path: root/tools/gen-musl-gcc.sh
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-03-01 12:04:36 -0500
committerRich Felker <dalias@aerifal.cx>2011-03-01 12:04:36 -0500
commit71df8b2760348c55b1c0d04aeebcae372d9760d3 (patch)
tree7652ae7f5e91229c63e59b132dd4d293c2685861 /tools/gen-musl-gcc.sh
parent07e9d63b8f0614f582f0f453437eaafe92441435 (diff)
downloadmusl-71df8b2760348c55b1c0d04aeebcae372d9760d3.tar.gz
use -L/...../ -lgcc instead of /...../libgcc.a in musl-gcc wrapper
this should avoid warnings about unused libs when not linking, and might fix some other obscure issues too. i might replace this approach with a completely different one soon though.
Diffstat (limited to 'tools/gen-musl-gcc.sh')
-rw-r--r--tools/gen-musl-gcc.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/gen-musl-gcc.sh b/tools/gen-musl-gcc.sh
index 89f7f4d9..bf20c1f6 100644
--- a/tools/gen-musl-gcc.sh
+++ b/tools/gen-musl-gcc.sh
@@ -11,6 +11,7 @@ libc_end="$libc_lib/crtn.o"
gcc_inc=$libc_inc
libgcc="`gcc \"$@\" -print-file-name=libgcc.a`"
+libgcc=${libgcc%libgcc.a}
gcc -wrapper sh,-c,'
x= ; y= ; z= ; s= ; for i ; do
@@ -26,5 +27,5 @@ done
exec "$0" "$@"
' -std=gnu99 -nostdinc -nostdlib \
-isystem "$libc_inc" -isystem "$gcc_inc" \
- -Wl,-xxxxxx "$@" -L"$libc_lib" -lc "$libgcc" -Lxxxxxx -Wl,-nostdlib
+ -Wl,-xxxxxx "$@" -L"$libc_lib" -lc -L"$libgcc" -lgcc -Lxxxxxx -Wl,-nostdlib
EOF