summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-06-23 22:13:47 -0400
committerRich Felker <dalias@aerifal.cx>2011-06-23 22:13:47 -0400
commitec05a0b08f0d93341c149a6f3235e4ee5711b2f8 (patch)
treeefcab9f79ced717da74e9877caa421502351c0c9 /tools
parentb7f6e0c6f848b7a8c64b3f7b72014b48a9923729 (diff)
downloadmusl-ec05a0b08f0d93341c149a6f3235e4ee5711b2f8.tar.gz
musl-ec05a0b08f0d93341c149a6f3235e4ee5711b2f8.tar.bz2
musl-ec05a0b08f0d93341c149a6f3235e4ee5711b2f8.tar.xz
musl-ec05a0b08f0d93341c149a6f3235e4ee5711b2f8.zip
adapt build/install/gcc-wrapper systems for dynamic linking support
Diffstat (limited to 'tools')
-rw-r--r--tools/gen-musl-gcc.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/gen-musl-gcc.sh b/tools/gen-musl-gcc.sh
index bf20c1f6..fcd1e4ea 100644
--- a/tools/gen-musl-gcc.sh
+++ b/tools/gen-musl-gcc.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-printf '#!/bin/sh\n\nlibc_prefix="%s"\n' "$1"
+printf '#!/bin/sh\n\nlibc_prefix="%s"\narch="%s"\n' "$1" "$2"
cat <<"EOF"
libc_lib=$libc_prefix/lib
@@ -27,5 +27,6 @@ done
exec "$0" "$@"
' -std=gnu99 -nostdinc -nostdlib \
-isystem "$libc_inc" -isystem "$gcc_inc" \
- -Wl,-xxxxxx "$@" -L"$libc_lib" -lc -L"$libgcc" -lgcc -Lxxxxxx -Wl,-nostdlib
+ -Wl,-xxxxxx "$@" -L"$libc_lib" -lc -L"$libgcc" -lgcc -Lxxxxxx \
+ -Wl,-dynamic-linker /lib/ld-musl-"$arch".so.1 -Wl,-nostdlib
EOF