strip_fPIC.sh
changeset 22 48c34d68918e
parent 1 cf2af46e9e2a
equal deleted inserted replaced
21:75a95f82bc1f 22:48c34d68918e
     2 #
     2 #
     3 # libtool assumes that the compiler can handle the -fPIC flag
     3 # libtool assumes that the compiler can handle the -fPIC flag
     4 # This isn't always true (for example, nasm can't handle it)
     4 # This isn't always true (for example, nasm can't handle it)
     5 command=""
     5 command=""
     6 while [ $# -gt 0 ]; do
     6 while [ $# -gt 0 ]; do
     7     if [ "$1" != "-fPIC" ]; then
     7     case "$1" in
     8         if [ "$1" != "-DPIC" ]; then
     8         -?PIC)
       
     9             # Ignore -fPIC and -DPIC options
       
    10             ;;
       
    11         *)
     9             command="$command $1"
    12             command="$command $1"
    10         fi
    13             ;;
    11     fi
    14     esac
    12     shift
    15     shift
    13 done
    16 done
    14 echo $command
    17 echo $command
    15 exec $command
    18 exec $command