summaryrefslogtreecommitdiffstats
path: root/lang/icc/files/patch-ia32::bin::icc
blob: 5f637a0b017d400570f1c9a41a542dd5619064bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
--- ia32/bin/icc.orig	Fri Jan 10 16:57:18 2003
+++ ia32/bin/icc	Fri Jan 10 17:09:38 2003
@@ -1,34 +1,68 @@
 #!/bin/sh
 
+PREFIX=@@PREFIX@@
+export PREFIX;
+
 if [ -z INTEL_LICENSE_FILE ]
 then
-INTEL_LICENSE_FILE=<INSTALLDIR>/licenses;
+INTEL_LICENSE_FILE=${PREFIX}/intel/licenses;
 else
-INTEL_LICENSE_FILE=$INTEL_LICENSE_FILE:<INSTALLDIR>/licenses;
+INTEL_LICENSE_FILE=$INTEL_LICENSE_FILE:${PREFIX}/intel/licenses;
 fi
 export INTEL_LICENSE_FILE;
 
 if [ -z LD_LIBRARY_PATH ]
 then 
- LD_LIBRARY_PATH=<INSTALLDIR>/compiler70/ia32/lib;
+ LD_LIBRARY_PATH=${PREFIX}/intel/compiler70/ia32/lib;
 else
- LD_LIBRARY_PATH=<INSTALLDIR>/compiler70/ia32/lib:$LD_LIBRARY_PATH
+ LD_LIBRARY_PATH=${PREFIX}/intel/compiler70/ia32/lib:$LD_LIBRARY_PATH
 fi
 export LD_LIBRARY_PATH;
 
 if [ -z PATH ]
 then
- PATH=<INSTALLDIR>/compiler70/ia32/bin;
+ PATH=${PREFIX}/intel/compiler70/ia32/bin;
 else
- PATH=<INSTALLDIR>/compiler70/ia32/bin:$PATH;
+ PATH=${PREFIX}/intel/compiler70/ia32/bin:$PATH;
 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
+  set -- "$@" "$val1"
+  i=$(($i+1))
+ done
+ exec ${PREFIX}/intel/compiler70/ia32/bin/iccbin -I${PREFIX}/intel/compiler70/ia32/include -I${PREFIX}/intel/compiler70/ia32/include/substitute_headers "$@";
 else
- exec -a "<INSTALLDIR>/compiler70/ia32/bin/icc" <INSTALLDIR>/compiler70/ia32/bin/iccbin;
+ exec ${PREFIX}/intel/compiler70/ia32/bin/iccbin;
 fi
OpenPOWER on IntegriCloud