e0984a2582
There slipped in a hardcoded /usr/local, it was supposed to be a placeholder for LOCALBASE (to find the stlport lib in the ld wrapper). Thanks to: Marius Strobl <marius@alchemy.franken.de> for reviewing the commits.
82 lines
1.9 KiB
Text
82 lines
1.9 KiB
Text
--- ia32/bin/icc.orig Sun Jan 11 18:23:24 2004
|
|
+++ ia32/bin/icc Sun Jan 11 18:22:09 2004
|
|
@@ -1,6 +1,9 @@
|
|
#!/bin/sh
|
|
|
|
-if [ -z INTEL_LICENSE_FILE ]
|
|
+ICC_LOCALBASE=%%ICC_LOCALBASE%%
|
|
+export ICC_LOCALBASE;
|
|
+
|
|
+if [ -z "$INTEL_LICENSE_FILE" ]
|
|
then
|
|
INTEL_LICENSE_FILE=<INSTALLDIR>/licenses;
|
|
else
|
|
@@ -8,7 +11,7 @@
|
|
fi
|
|
export INTEL_LICENSE_FILE;
|
|
|
|
-if [ -z LD_LIBRARY_PATH ]
|
|
+if [ -z "$LD_LIBRARY_PATH" ]
|
|
then
|
|
LD_LIBRARY_PATH=<INSTALLDIR>/compiler70/ia32/lib;
|
|
else
|
|
@@ -16,7 +19,7 @@
|
|
fi
|
|
export LD_LIBRARY_PATH;
|
|
|
|
-if [ -z PATH ]
|
|
+if [ -z "$PATH" ]
|
|
then
|
|
PATH=<INSTALLDIR>/compiler70/ia32/bin;
|
|
else
|
|
@@ -24,11 +27,46 @@
|
|
fi
|
|
export PATH;
|
|
|
|
-export -n IA32ROOT; unset IA32ROOT;
|
|
-
|
|
if [ $# != 0 ]
|
|
then
|
|
- exec -a "<INSTALLDIR>/compiler70/ia32/bin/icc" <INSTALLDIR>/compiler70/ia32/bin/iccbin "$@";
|
|
+ i=0
|
|
+ argc=$#
|
|
+ while [ $i -lt $argc ] ; do
|
|
+ val1=$1
|
|
+ shift
|
|
+ for s in .C .cc .cpp .cxx .c++; do
|
|
+ val2=${val1%$s}
|
|
+ if [ ${#val1} -gt ${#val2} ] ; then
|
|
+ echo "Please use icpc to compile C++ source."
|
|
+ exit 1
|
|
+ fi
|
|
+ done
|
|
+ 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
|
|
+ if [ "${val1}" = "-mt" ] ; then
|
|
+ unset val1
|
|
+ set -- "$@" "-Qoption,ld,-MT"
|
|
+ fi
|
|
+ if [ "${val1}" = "-pipe" ] ; then
|
|
+ unset val1
|
|
+ set -- "$@"
|
|
+ fi
|
|
+ set -- "$@" "$val1"
|
|
+ i=$(($i+1))
|
|
+ done
|
|
+ exec <INSTALLDIR>/compiler70/ia32/bin/iccbin "$@";
|
|
else
|
|
- exec -a "<INSTALLDIR>/compiler70/ia32/bin/icc" <INSTALLDIR>/compiler70/ia32/bin/iccbin;
|
|
+ exec <INSTALLDIR>/compiler70/ia32/bin/iccbin;
|
|
fi
|