$FreeBSD$ --- bin/ifort.orig Thu Apr 7 09:47:54 2005 +++ bin/ifort Thu Apr 7 09:49:52 2005 @@ -1,5 +1,10 @@ #!/bin/sh +ICC_LOCALBASE=%%ICC_LOCALBASE%% +export ICC_LOCALBASE; +GXX_ROOT=/lib +export GXX_ROOT + if [ -z "$INTEL_LICENSE_FILE" ] then INTEL_LICENSE_FILE="/licenses"; @@ -24,11 +29,31 @@ fi export PATH; -export -n IA32ROOT; unset IA32ROOT; - if [ $# != 0 ] then - exec -a "/bin/ifort" /bin/ifortbin "$@"; + i=0 + argc=$# + while [ $i -lt $argc ] ; do + val1=$1 + shift + val2=${val1#"-openmp"} + if [ ${#val1} -gt ${#val2} ] ; then + echo "Sorry, option '$val1' is not supported on FreeBSD." + exit 1 + fi + val2=${val1#"-par"} + if [ ${#val1} -gt ${#val2} ] ; then + echo "Sorry, option '$val1' is not supported on FreeBSD." + exit 1 + fi + if [ "${val1}" = "-Kpic" ] || [ "${val1}" = "-KPIC" ] || \ + [ "${val1}" = "-fpic" ] || [ "${val1}" = "-fPIC" ] ; then + set -- "$@" "-Qoption,ld,-PIC" + fi + set -- "$@" "$val1" + i=$(($i+1)) + done + exec /bin/ifortbin "$@"; else - exec -a "/bin/ifort" /bin/ifortbin; + exec /bin/ifortbin; fi