test/*.sh : Fix MALLOC_PERTURB initialization.
[platform/upstream/flac.git] / strip_non_asm_libtool_args.sh
1 #!/bin/sh
2 #
3 # libtool assumes that the compiler can handle the -fPIC flag.
4 # This isn't always true (for example, nasm can't handle it).
5 # Also, on some versions of OS X it tries to pass -fno-common
6 # to 'as' which causes problems.
7 command=""
8 while [ $1 ]; do
9         if [ "$1" != "-fPIC" ]; then
10                 if [ "$1" != "-DPIC" ]; then
11                         if [ "$1" != "-fno-common" ]; then
12                                 command="$command $1"
13                         fi
14                 fi
15         fi
16         shift
17 done
18 echo $command
19 exec $command