1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-04 01:48:54 +00:00
freebsd-ports/lang/icc/files/patch-bin::icpc
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

76 lines
1.6 KiB
Plaintext

--- bin/icpc.orig Tue Dec 9 19:55:12 2003
+++ bin/icpc Tue Dec 9 20:12:01 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,39 @@
fi
export PATH;
-export -n IA32ROOT; unset IA32ROOT;
-
if [ $# != 0 ]
then
- exec -a "<INSTALLDIR>/bin/icpc" <INSTALLDIR>/bin/icpcbin "$@";
+ 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
+ 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/icpcbin "$@";
else
- exec -a "<INSTALLDIR>/bin/icpc" <INSTALLDIR>/bin/icpcbin;
+ exec <INSTALLDIR>/bin/icpcbin;
fi