Chris@1: #!/bin/sh Chris@1: # Chris@1: # libtool assumes that the compiler can handle the -fPIC flag. Chris@1: # This isn't always true (for example, nasm can't handle it). Chris@1: # Also, on some versions of OS X it tries to pass -fno-common Chris@1: # to 'as' which causes problems. Chris@1: command="" Chris@1: while [ $1 ]; do Chris@1: if [ "$1" != "-fPIC" ]; then Chris@1: if [ "$1" != "-DPIC" ]; then Chris@1: if [ "$1" != "-fno-common" ]; then Chris@1: command="$command $1" Chris@1: fi Chris@1: fi Chris@1: fi Chris@1: shift Chris@1: done Chris@1: echo $command Chris@1: exec $command