diff options
author | netchild <netchild@FreeBSD.org> | 2002-09-20 20:16:25 +0800 |
---|---|---|
committer | netchild <netchild@FreeBSD.org> | 2002-09-20 20:16:25 +0800 |
commit | 9cda27c9f22f062c7048d218394c162b3f10731d (patch) | |
tree | c481959f95e57718d94cde67a2080d364278d1ae /lang/icc7/files | |
parent | 197e963979318bfc627ecb936e116c0708ef0751 (diff) | |
download | freebsd-ports-gnome-9cda27c9f22f062c7048d218394c162b3f10731d.tar.gz freebsd-ports-gnome-9cda27c9f22f062c7048d218394c162b3f10731d.tar.zst freebsd-ports-gnome-9cda27c9f22f062c7048d218394c162b3f10731d.zip |
- Update to 6.0.1.304.
- Re-enable patching of iccvars.(c)sh (solely called by icid and therefore
overlooked), accidentally broken by last commit.
- Fix generation of multi-threaded code, triggered by the (badly documented)
compiler option "-mt".
- Disable compiler options "-openmp*" and "-parallel", they depend on
libguide which itself depends on pthread_atfork() (not provided by libc_r),
therefore don't install libguide.
Note: All compiler options are now believed to either work on FreeBSD or
be disabled (Maintainer note: '-prof_gen' is under investigation).
- Add a message about installing stlport-icc in order to get full C++ support.
- Remove workaround for generation of shared objects with binutils/ld 2.12.x,
appears to be fixed (unfortunately no confirmation by Intel Support, "That
is good news <...> then we should just close this issue." *sigh*).
Submitted by: marius@alchemy.franken.de
- Add note about a problem on P4 and how to solve it.
Suggested by: Martin Kahlert <martin.kahlert@infineon.com>
- Remove outdated information in pkg-descr.
Diffstat (limited to 'lang/icc7/files')
-rw-r--r-- | lang/icc7/files/ld.c | 55 | ||||
-rw-r--r-- | lang/icc7/files/patch-icc | 7 | ||||
-rw-r--r-- | lang/icc7/files/patch-icpc | 15 |
3 files changed, 45 insertions, 32 deletions
diff --git a/lang/icc7/files/ld.c b/lang/icc7/files/ld.c index 8bcf90797140..fdd1869bba13 100644 --- a/lang/icc7/files/ld.c +++ b/lang/icc7/files/ld.c @@ -143,7 +143,7 @@ int main(int argc, char *argv[], char *envp[]) { size_t i; - int bootstrap, cpp, dynamic, shared, stlinserted; + int bootstrap, cpp, dynamic, stlinserted, threaded; char *prefix; struct arglist al; @@ -154,7 +154,7 @@ main(int argc, char *argv[], char *envp[]) errx(1, "can't get PREFIX"); initarg(&al); - bootstrap = cpp = dynamic = shared = stlinserted = 0; + bootstrap = cpp = dynamic = stlinserted = threaded = 0; #ifdef DEBUG printf("input: "); @@ -185,11 +185,6 @@ main(int argc, char *argv[], char *envp[]) continue; } - if (ARGCMP("-shared")) { - shared++; - continue; - } - /* * If the compiler was called with -static we shouldn't see * "--dynamic-linker" here. @@ -210,12 +205,24 @@ main(int argc, char *argv[], char *envp[]) stlinserted++; continue; } + + /* + * ICC links the thread safe libircmt instead of libirc when + * told to generate threaded code by any of the compiler flags + * "-mt", "-openmp" or "-parallel". We use this as an indicator + * to link against libc_r. + */ + if (ARGCMP("-lircmt")) { + threaded++; + continue; + } + } #ifdef DEBUG - printf("\ncpp: %s bootstrap: %s dynamic: %s shared: %s\n", + printf("\ncpp: %s bootstrap: %s dynamic: %s threaded: %s\n", cpp ? "YES" : "NO", bootstrap ? "YES" : "NO", - dynamic ? "YES" : "NO", shared ? "YES" : "NO"); + dynamic ? "YES" : "NO", threaded ? "YES" : "NO"); #endif if (bootstrap && !cpp) @@ -246,16 +253,6 @@ main(int argc, char *argv[], char *envp[]) if (ARGCMP("-Qy")) continue; - /* - * Because of a nasty behaviour (bug?) of binutils/ld 2.12.[0,1] - * we must not statically link libcxa and libunwind to shared - * objects, e.g. our STL replacement. Doing so causes broken - * exception handling amongst some other strange reactions. - * This perfectly worked with binutils/ld 2.11.2. - */ - if (cpp && shared && (ARGCMP("-lcxa") || ARGCMP("-lunwind"))) - continue; - /* Libunwind is only needed when compiling C++ source. */ if (!cpp && ARGCMP("-lunwind")) continue; @@ -276,10 +273,11 @@ main(int argc, char *argv[], char *envp[]) } /* - * Libcxa and libunwind depend on libc_r when compiling C++ - * source. + * Link against libc_r when compiling multi-threaded or C++ + * code (libcxa and libunwind depend on libc_r when compiling + * C++ source). */ - if (cpp && ARGCMP("-lc")) { + if ((cpp || threaded) && ARGCMP("-lc")) { if (al.argc > 0 && strncmp(al.argv[al.argc - 1], "-B", strlen("-B"))) addarg(&al, @@ -317,17 +315,14 @@ main(int argc, char *argv[], char *envp[]) } /* - * Link and map files for C++ exception handling, C++ ABI stuff. + * Link and map files for C++ exception handling. */ if (!cpp && (ARGCMP("--version-script") || ARGCMPB(prefix, "/intel/compiler60/ia32/lib/icrt.link") || ARGCMPB(prefix, - "/intel/compiler60/ia32/lib/icrt.internal.map") || - ARGCMPB(prefix, "/intel/compiler60/ia32/lib/crtxi.o") || - ARGCMPB(prefix, "/intel/compiler60/ia32/lib/crtxn.o"))) { + "/intel/compiler60/ia32/lib/icrt.internal.map"))) continue; - } /* * Force libcxa and libunwind to static linkage, since the @@ -335,14 +330,13 @@ main(int argc, char *argv[], char *envp[]) * Don't add superfluous -Bdynamic. */ if (ARGCMP("-Bdynamic") && i <= argc + 1) { - if (!shared && (!strcmp(argv[i + 1], "-lcxa") || - (cpp && !strcmp(argv[i + 1], "-lunwind")))) { + if (!strcmp(argv[i + 1], "-lcxa") || + (cpp && !strcmp(argv[i + 1], "-lunwind"))) { addarg(&al, "-Bstatic", 1); continue; } if (!strcmp(argv[i + 1], "-lcprts") || - !strcmp(argv[i + 1], "-lcxa") || !strcmp(argv[i + 1], "-lunwind")) continue; } @@ -362,6 +356,7 @@ main(int argc, char *argv[], char *envp[]) if (!strcmp(argv[i], "-lcxa") || !strcmp(argv[i], "-limf") || !strcmp(argv[i], "-lirc") || + !strcmp(argv[i], "-lircmt") || !strcmp(argv[i], "-lunwind")) addarg(&al, "-Bstatic", 1); else diff --git a/lang/icc7/files/patch-icc b/lang/icc7/files/patch-icc index 53426d19cbe0..adcc3f15a4b4 100644 --- a/lang/icc7/files/patch-icc +++ b/lang/icc7/files/patch-icc @@ -1,6 +1,6 @@ --- opt/intel/compiler60/ia32/bin/icc.orig Tue Aug 6 04:34:18 2002 +++ opt/intel/compiler60/ia32/bin/icc Tue Aug 6 04:46:51 2002 -@@ -1,29 +1,44 @@ +@@ -1,29 +1,49 @@ #!/bin/sh -INTEL_LICENSE_FILE=<INSTALLDIR>/licenses; @@ -46,6 +46,11 @@ + exit 1 + fi + done ++ val2=${val1#"-openmp"} ++ if [ ${#val1} -gt ${#val2} ] || [ ${val1} = "-parallel" ] ; then ++ echo "Sorry, option '$val1' is not supported on FreeBSD." ++ exit 1 ++ fi + set -- "$@" "$val1" + i=$(($i+1)) + done diff --git a/lang/icc7/files/patch-icpc b/lang/icc7/files/patch-icpc index 03e4dd7c1c95..a1e3f2685e08 100644 --- a/lang/icc7/files/patch-icpc +++ b/lang/icc7/files/patch-icpc @@ -1,6 +1,6 @@ --- opt/intel/compiler60/ia32/bin/icpc.orig Fri Sep 6 02:18:03 2002 +++ opt/intel/compiler60/ia32/bin/icpc Tue Sep 10 18:32:59 2002 -@@ -1,29 +1,29 @@ +@@ -1,29 +1,42 @@ #!/bin/sh -INTEL_LICENSE_FILE=<INSTALLDIR>/licenses; @@ -34,6 +34,19 @@ if [ $# != 0 ] then - exec -a "<INSTALLDIR>/compiler60/ia32/bin/icpc" <INSTALLDIR>/compiler60/ia32/bin/icpcbin "$@"; ++ i=0 ++ argc=$# ++ while [ $i -lt $argc ] ; do ++ val1=$1 ++ shift ++ val2=${val1#"-openmp"} ++ if [ ${#val1} -gt ${#val2} ] || [ ${val1} = "-parallel" ] ; then ++ echo "Sorry, option '$val1' is not supported on FreeBSD." ++ exit 1 ++ fi ++ set -- "$@" "$val1" ++ i=$(($i+1)) ++ done + exec ${PREFIX}/intel/compiler60/ia32/bin/icpcbin "$@"; else - exec -a "<INSTALLDIR>/compiler60/ia32/bin/icpc" <INSTALLDIR>/compiler60/ia32/bin/icpcbin; |