head	1.3;
access;
symbols
	RELEASE_8_3_0:1.3
	RELEASE_9_0_0:1.3
	RELEASE_7_4_0:1.3
	RELEASE_8_2_0:1.3
	RELEASE_6_EOL:1.3
	RELEASE_8_1_0:1.3
	RELEASE_7_3_0:1.3
	RELEASE_8_0_0:1.3
	RELEASE_7_2_0:1.3
	RELEASE_7_1_0:1.3
	RELEASE_6_4_0:1.3
	RELEASE_5_EOL:1.3
	RELEASE_7_0_0:1.3
	RELEASE_6_3_0:1.3
	PRE_XORG_7:1.3
	RELEASE_4_EOL:1.3
	RELEASE_6_2_0:1.3
	RELEASE_6_1_0:1.3
	RELEASE_5_5_0:1.3
	RELEASE_6_0_0:1.3
	RELEASE_5_4_0:1.3
	RELEASE_4_11_0:1.2
	RELEASE_5_3_0:1.1
	RELEASE_4_10_0:1.1;
locks; strict;
comment	@# @;


1.3
date	2005.03.06.15.08.26;	author netchild;	state Exp;
branches;
next	1.2;

1.2
date	2004.11.02.23.27.26;	author marius;	state Exp;
branches;
next	1.1;

1.1
date	2004.01.11.15.32.07;	author netchild;	state Exp;
branches;
next	;


desc
@@


1.3
log
@ - update to 8.1.028
 - 5.x got the header fix too, don't install replacement headers there [1]
 - allow to override GXX_ROOT [2]

Note: you may see "as: Illegal seek" while compiling with icc (a simple test
didn't revealed the same message with icpc). I don't know the reason for it,
but the resulting executable seems to work, so I commit the update.

Thanks to:	marius [1]
Requested by:	mi [2]
@
text
@--- bin/icc.orig	Sun Mar  6 15:40:09 2005
+++ bin/icc	Sun Mar  6 15:44:30 2005
@@@@ -1,5 +1,11 @@@@
 #!/bin/sh
 
+ICC_LOCALBASE=%%ICC_LOCALBASE%%
+export ICC_LOCALBASE
+
+GXX_ROOT=${GXX_ROOT:-<INSTALLDIR>/lib}
+export GXX_ROOT
+
 if [ -z "$INTEL_LICENSE_FILE" ]
 then
  INTEL_LICENSE_FILE="<INSTALLDIR>/licenses";
@@@@ -24,11 +30,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
@


1.2
log
@o Preliminary update to 8.1.022:
  - For changes since the 8.0 series see the installed C++ReleaseNotes.htm
    but note that information given there doesn't necessarily apply to ICC
    on FreeBSD, e.g. -cxxlib-gcc isn't the default on FreeBSD yet and this
    port also doesn't install the Eclipse and CDT IDEs.
  - ICC now unfortunately requires emulators/linux_base-8.
  - Works fine for compiling C source.
  - A 6.0-current GENERIC kernel compiles and boots.
  - The devel/stlport-icc port currently can't link the exception handling
    testsuite with this ICC version (due to relying on a missbehaviour of
    the old ICC versions) and has to be changed in a way that doesn't break
    lang/icc7.
  - Support for using the GCC-compatibility of ICC on FreeBSD and using
    the GNU libstdc++ as the STL with ICC is in the works.

o Like with the system GCC, default to libpthread for the threads library
  on FreeBSD >= 502102.

Approved by:		netchild
In joint forces with:	netchild
@
text
@d1 3
a3 3
--- bin/icc.orig	Tue Dec  9 19:55:19 2003
+++ bin/icc	Tue Dec  9 20:03:34 2003
@@@@ -1,6 +1,12 @@@@
a5 1
-if [ -z INTEL_LICENSE_FILE ]
d9 1
a9 1
+GXX_ROOT=<INSTALLDIR>/lib
d12 1
a12 1
+if [ -z "$INTEL_LICENSE_FILE" ]
d14 1
a14 20
 INTEL_LICENSE_FILE=<INSTALLDIR>/licenses;
 else
@@@@ -8,7 +14,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 +22,7 @@@@
 fi
 export LD_LIBRARY_PATH;
 
-if [ -z PATH ]
+if [ -z "$PATH" ]
 then
  PATH=<INSTALLDIR>/bin;
 else
@


1.1
log
@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).
@
text
@d3 1
a3 1
@@@@ -1,6 +1,9 @@@@
d8 4
a11 1
+export ICC_LOCALBASE;
d17 1
a17 1
@@@@ -8,7 +11,7 @@@@
d26 1
a26 1
@@@@ -16,7 +19,7 @@@@
d35 1
a35 1
@@@@ -24,11 +27,46 @@@@
@

