summaryrefslogtreecommitdiff
path: root/sub/musl/muslgccmake
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-05-22 21:56:04 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-05-22 21:56:04 +0000
commit82d0f92ab8b84466ae20ab919c1f9c3577b5cecb (patch)
tree776015ae6c6a386125b2d39e13b62f91b99548f8 /sub/musl/muslgccmake
downloadlh-bootstrap-82d0f92ab8b84466ae20ab919c1f9c3577b5cecb.tar.xz
Initial commit
Diffstat (limited to 'sub/musl/muslgccmake')
-rwxr-xr-xsub/musl/muslgccmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/sub/musl/muslgccmake b/sub/musl/muslgccmake
new file mode 100755
index 0000000..6618bb9
--- /dev/null
+++ b/sub/musl/muslgccmake
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+
+file="$1"
+muslspecs="$2"
+realgcc="$3"
+allstatic="$4"
+
+if $allstatic ; then
+ dostatic=-static
+else
+ dostatic=
+fi
+
+cat > "$file" <<EOF
+#!/bin/sh
+exec "\${REALGCC:-$realgcc}" $dostatic -specs "$muslspecs" "\$@"
+EOF
+exec chmod 0755 "$file"