1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00
freebsd-ports/lang/icc/files/patch-bin::icc
Alexander Leidinger 5b75a54ddf Update to 8.0.055.p057.
As Intel uses it's own directory for ifc and icc, we don't conflict with
ifc anymore.

Because of ABI changes, you have to recompile C++ programs (don't forget
stlport-icc).

Note that this port is a _work in progress_:
 - Icc allows to use an already installed libstdc++ from gcc, this doesn't
   work yet on FreeBSD. Libstdc++ on 4.x is too old, so it's unlikely we
   can add support for it. The headers of libstdc++ shipping with FreeBSD
   5.2-CURRENT use GCCisms not (yet) supported by icc, the hardcoded search
   path for them also doesn't fit for FreeBSD 5.2-CURRENT.
 - We've incorporated parts (cxa) of the FreeBSD >= 502101 libc on < 502101
   systems. It's tested on 4.x, but not on FreeBSD < 502101.
 - Not all (new) options (including GCC compatibility) are thoroughly
   tested.

When encountering problems please report to me first instead of directly
contacting Intel.

Ackknowledgements:
 - Bradley T Hughes <bhughes@trolltech.com> for PR 59552, it resulted in
   a modification of our libc (C++ DSO Object Destruction API) we
   incorporate in the port on < 502101 systems.
 - Marius Strobl <marius@alchemy.franken.de> for his help with the port
   (e.g. ld.c, cxa).
2004-01-11 15:32:07 +00:00

83 lines
1.7 KiB
Plaintext

--- bin/icc.orig Tue Dec 9 19:55:19 2003
+++ bin/icc Tue Dec 9 20:03:34 2003
@@ -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>/lib;
else
@@ -16,7 +19,7 @@
fi
export LD_LIBRARY_PATH;
-if [ -z PATH ]
+if [ -z "$PATH" ]
then
PATH=<INSTALLDIR>/bin;
else
@@ -24,11 +27,46 @@
fi
export PATH;
-export -n IA32ROOT; unset IA32ROOT;
-
if [ $# != 0 ]
then
- exec -a "<INSTALLDIR>/bin/icc" <INSTALLDIR>/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>/bin/iccbin "$@";
else
- exec -a "<INSTALLDIR>/bin/icc" <INSTALLDIR>/bin/iccbin;
+ exec <INSTALLDIR>/bin/iccbin;
fi