summaryrefslogtreecommitdiff
path: root/sub/musl/muslgccmake
blob: 6618bb97c74bc8edecaf39a39d58a3c6c2ae2ad7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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"