/
strip_fPIC.sh
executable file
·21 lines (21 loc) · 443 Bytes
1
2
3
4
5
#!/bin/sh
#
# libtool assumes that the compiler can handle the -fPIC flag
# This isn't always true (for example, nasm can't handle it)
command=""
6
while [ $# -gt 0 ]; do
7
case "$1" in
8
9
-fPIC)
# Ignore -fPIC option
10
;;
11
12
13
-fno-common)
# Ignore -fPIC and -DPIC options
;;
14
*)
15
command="$command $1"
16
17
;;
esac
18
19
20
21
shift
done
echo $command
exec $command