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


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

1.3
date	2004.11.16.20.14.47;	author marius;	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.4
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/icpc.orig	Sun Mar  6 15:46:09 2005
+++ bin/icpc	Sun Mar  6 15:48:12 2005
@@@@ -1,5 +1,17 @@@@
 #!/bin/sh
 
+ICC_LOCALBASE=%%ICC_LOCALBASE%%
+export ICC_LOCALBASE
+
+GXX_ROOT=${GXX_ROOT:-<INSTALLDIR>/lib}
+export GXX_ROOT
+
+GXX_INCLUDE=${GXX_INCLUDE:-%%GXX_INCLUDE%%}
+if [ ! -z "$GXX_INCLUDE" ]
+then
+ export GXX_INCLUDE
+fi
+
 if [ -z "$INTEL_LICENSE_FILE" ]
 then
  INTEL_LICENSE_FILE="<INSTALLDIR>/licenses";
@@@@ -24,11 +36,43 @@@@
 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}" = "-cxxlib-icc" ] ; then
+   set -- "$@@" "-I${ICC_LOCALBASE}/include/stlport"
+   set -- "$@@" "-Qoption,ld,-CPLUSPLUS"
+  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
@


1.3
log
@- Update to 8.1.024.
- Declare a PATCH_DEPENDS on emulators/linux_base-8 only if actually using
  RTPpatch to apply an Intel provided binary patch.
- Turn the GCC-compatibility of ICC on by default for FreeBSD >= 502108;
  except for one bug which is worked around by this port and will be fixed
  in src later FreeBSD gained support for using the GCC-compatibility along
  with the patch to compile the kernel with ICC (but the ICC 8.0 series
  wasn't configurable/hackable enough to actually use it on FreeBSD, which
  resulted into the aforementioned bug).
- On FreeBSD >= 502108 default to using libstdc++ from the base as STL
  instead of STLport unless "-cxxlib-icc" is passed to icpc (made possible
  by turning on the GCC-compatibility and the compatibility to GCC 3.3 and
  3.4 which was added to ICC 8.1). On FreeBSD < 502108 STLport i.e.
  devel/stlport-icc is and will continue to be the only STL available.
  Update the instructions displayed by the post-install target accordingly.
- Put the wrappers for glibc specific symbols and other GNU/Linux compat
  hacks into their own library "libiccfbsd" and teach the ld-wrapper to
  injected this lib instead of adding these things to the Intel libcxa and
  libcxaguard. Beginning with ICC 8.1 non of the Intel libs is "guaranteed"
  to be linked into resulting executable (this is actually a fix in ICC
  as libcxa and libcxaguard are C++ only). This fixes linking against libm
  with icc amongst other things [1].
- Clean the ld-wrapper up a bit. Stop trying to create a perfect world for
  the real ld(1) regarding superfluous linkage options, ICC natively passes
  far to many of them to the linker that we easily could remove them all.
- Change the ld-wrapper to allow for bootstrapping STLport in a bit
  different way that we used to do it, required to make devel/stlport-icc
  build correctly again.
- Use fmt(1) to print the infos displayed by the post-install target so
  the text is formated properly after the included variables are expanded [2].

Todo: - Rework the freaking thread library selection via the PTHREAD_LIBS
        environment variable by the ld-wrapper, this causes really annoying
        problems when compiling ports with ICC. Some functionality analogous
        to the GCC "-pthread" option (which is also known by ICC but is not
        documented and doesn't do the right thing for FreeBSD) would be great.
      - Make devel/stlport-icc build again with ICC 8.1 after devel/stlport
        has been updated to 4.6.2 (PR 73604). Patch for 4.5.3 already done.

Reported by:	Dan Nelson <dnelson@@allantgroup.com> [1]
Courtesy of:	netchild [2]
Approved by:	netchild
@
text
@d1 3
a3 3
--- bin/icpc.orig	Tue Dec  9 19:55:12 2003
+++ bin/icpc	Tue Dec  9 20:12:01 2003
@@@@ -1,6 +1,18 @@@@
a5 1
-if [ -z INTEL_LICENSE_FILE ]
d9 1
a9 1
+GXX_ROOT=<INSTALLDIR>/lib
d12 1
a12 1
+GXX_INCLUDE=%%GXX_INCLUDE%%
d18 1
a18 1
+if [ -z "$INTEL_LICENSE_FILE" ]
d20 1
a20 20
 INTEL_LICENSE_FILE=<INSTALLDIR>/licenses;
 else
@@@@ -8,7 +20,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 +28,7 @@@@
 fi
 export LD_LIBRARY_PATH;
 
-if [ -z PATH ]
+if [ -z "$PATH" ]
 then
  PATH=<INSTALLDIR>/bin;
 else
@


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
@d3 1
a3 1
@@@@ -1,6 +1,12 @@@@
d13 6
d23 1
a23 1
@@@@ -8,7 +14,7 @@@@
d32 1
a32 1
@@@@ -16,7 +22,7 @@@@
d41 1
a41 1
@@@@ -24,11 +30,39 @@@@
d64 4
@


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,39 @@@@
@

