diff options
author | marius <marius@FreeBSD.org> | 2004-11-17 04:14:47 +0800 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2004-11-17 04:14:47 +0800 |
commit | aa676ddbc1f70f17fc674f116b494c8957f14e4e (patch) | |
tree | 7ed39b3cffb8bed04573253acbad9454b32dd8e8 /lang | |
parent | 242db5bb42de7b056861c7b816f9caf5046dbfa5 (diff) | |
download | freebsd-ports-gnome-aa676ddbc1f70f17fc674f116b494c8957f14e4e.tar.gz freebsd-ports-gnome-aa676ddbc1f70f17fc674f116b494c8957f14e4e.tar.zst freebsd-ports-gnome-aa676ddbc1f70f17fc674f116b494c8957f14e4e.zip |
- 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
Diffstat (limited to 'lang')
-rw-r--r-- | lang/icc/Makefile | 78 | ||||
-rw-r--r-- | lang/icc/distinfo | 4 | ||||
-rw-r--r-- | lang/icc/files/_types.h | 50 | ||||
-rw-r--r-- | lang/icc/files/exclude | 1 | ||||
-rw-r--r-- | lang/icc/files/ld.c | 112 | ||||
-rw-r--r-- | lang/icc/files/patch-bin::icpc | 18 | ||||
-rw-r--r-- | lang/icc/pkg-plist | 4 |
7 files changed, 163 insertions, 104 deletions
diff --git a/lang/icc/Makefile b/lang/icc/Makefile index fae7979e79d1..5858c2d027b9 100644 --- a/lang/icc/Makefile +++ b/lang/icc/Makefile @@ -6,10 +6,10 @@ # PORTNAME= icc -PORTVERSION= 8.1.022 +PORTVERSION= 8.1.024 CATEGORIES= lang linux devel MASTER_SITES= -DISTNAME= l_cc_pc_${PORTVERSION:C/p.+$//} +DISTNAME= l_cc_pu_${PORTVERSION:C/p.+$//} MAINTAINER= netchild@FreeBSD.org COMMENT= Intels C/C++ compiler, set up to produce native FreeBSD binaries @@ -18,11 +18,11 @@ PATCHLEVEL= ${PORTVERSION:C/(.+p)(.+)$/pe\2/} DISTFILES= ${DISTNAME}${EXTRACT_SUFX} .if ${PORTVERSION} != ${PATCHLEVEL} DISTFILES+= ${DISTNAME}_${PATCHLEVEL}${EXTRACT_SUFX} +#PATCH_DEPENDS= ${LINUXBASE}/etc/redhat-release:${PORTSDIR}/emulators/linux_base +PATCH_DEPENDS= ${LINUXBASE}/lib/libc-2.3.2.so:${PORTSDIR}/emulators/linux_base-8 .endif EXTRACT_DEPENDS= rpm2cpio.pl:${PORTSDIR}/archivers/rpm2cpio -#PATCH_DEPENDS= ${LINUXBASE}/etc/redhat-release:${PORTSDIR}/emulators/linux_base -PATCH_DEPENDS= ${LINUXBASE}/lib/libc-2.3.2.so:${PORTSDIR}/emulators/linux_base-8 RESTRICTED= Intel forbids any redistribution NO_PACKAGE= ${RESTRICTED} @@ -61,9 +61,17 @@ EXTRACT_AFTER_ARGS= | tar -xf - \ ICCCFGVAL!= ${UNAME} -r | ${SED} -e 's/\..*//' .if ( ${OSVERSION} < 502108 ) -PLIST_SUB+= STDARG_H="" SYS_CDEFS_H="" +PLIST_SUB+= MACHINE__TYPES_H="@comment " STDARG_H="" SYS_CDEFS_H="" .else PLIST_SUB+= STDARG_H="@comment " SYS_CDEFS_H="@comment " +.if ${OSVERSION} < 502126 +GCCCOMPATVER= 330 +.endif +.if ${OSVERSION} >= 502126 +GCCCOMPATVER= 340 +.endif +GXXINCLUDE= /usr/include/c++/${GCCCOMPATVER:C/([0-9])([0-9]).+/\1.\2/} +PLIST_SUB+= MACHINE__TYPES_H="" .endif .for file in ${DISTFILES} @@ -113,6 +121,7 @@ post-patch: .for i in icc iccvars.csh iccvars.sh icpc @${REINPLACE_CMD} -i "" -e 's:%%ICC_LOCALBASE%%:${LOCALBASE}:g; \ s:\<INSTALLDIR\>:${PREFIX}/${COMPILERDIR}:g; \ + s:%%GXX_INCLUDE%%:${GXXINCLUDE}:g; \ s:man -w:manpath -q:g' ${WRKSRC}/opt/${COMPILERDIR}/bin/${i} @${CHMOD} 755 ${WRKSRC}/opt/${COMPILERDIR}/bin/${i} .endfor @@ -131,25 +140,36 @@ post-patch: .endfor # Provide a more FreeBSD'ish compile environment .for i in icc.cfg icpc.cfg - @${ECHO_CMD} -e "-no-gcc\n-Qlocation,ld,${PREFIX}/${COMPILERDIR}/bin/ldwrapper\n\n-wr1125\n-we140\n\n-Ulinux\n-U__linux__\n-U__linux\n-U__gnu_linux__\n\n-D__FreeBSD__=${ICCCFGVAL}\n\n" >>${WRKSRC}/opt/${COMPILERDIR}/bin/${i} + @${ECHO_CMD} -e "-Qlocation,ld,${PREFIX}/${COMPILERDIR}/bin/ldwrapper\n\n-wr1125\n-we140\n\n-Ulinux\n-U__linux__\n-U__linux\n-U__gnu_linux__\n\n-D__FreeBSD__=${ICCCFGVAL}\n\n" >>${WRKSRC}/opt/${COMPILERDIR}/bin/${i} .if ( ${OSVERSION} >= 500039 ) @${ECHO_CMD} -e "-D__wchar_t=__ct_rune_t\n" >>${WRKSRC}/opt/${COMPILERDIR}/bin/${i} .endif .if ( ${OSVERSION} >= 502108 ) @${ECHO_CMD} -e "-restrict\n" >>${WRKSRC}/opt/${COMPILERDIR}/bin/${i} +.else + @${ECHO_CMD} -e "-no-gcc\n" >>${WRKSRC}/opt/${COMPILERDIR}/bin/${i} .endif @${CHMOD} a-x,g-w ${WRKSRC}/opt/${COMPILERDIR}/bin/${i} .endfor # C++ hack for icpc +.if ( ${OSVERSION} >= 502108 ) + @${ECHO_CMD} -e "-gcc-version=${GCCCOMPATVER}\n-cxxlib-gcc\n" \ + >>${WRKSRC}/opt/${COMPILERDIR}/bin/icpc.cfg +.else @${ECHO_CMD} -e "\n-I${PREFIX}/include/stlport\n-Qoption,ld,-CPLUSPLUS\n" \ >>${WRKSRC}/opt/${COMPILERDIR}/bin/icpc.cfg +.endif @cd ${WRKSRC}/opt/${COMPILERDIR}/bin/ && ${LN} -s icc.cfg iccbin.cfg \ && ${LN} -s icpc.cfg icpcbin.cfg -# Hack while there's no support for icc in the stdarg.h and sys/cdefs.h. .if ( ${OSVERSION} < 502108 ) +# Hack while there's no support for ICC in the stdarg.h and sys/cdefs.h. @${CP} ${FILESDIR}/stdarg.h ${WRKSRC}/opt/${COMPILERDIR}/include @${MKDIR} ${WRKSRC}/opt/${COMPILERDIR}/include/sys @${CP} ${FILESDIR}/cdefs.h ${WRKSRC}/opt/${COMPILERDIR}/include/sys +.else +# Work around bug for ICC support in src/sys/i386/include/_types.h. + @${MKDIR} ${WRKSRC}/opt/${COMPILERDIR}/include/machine + @${CP} ${FILESDIR}/_types.h ${WRKSRC}/opt/${COMPILERDIR}/include/machine .endif .if ( ${OSVERSION} >= 470101 && ${OSVERSION} < 500000 ) || \ @@ -183,8 +203,7 @@ do-build: ${OBJCOPY_OPS} \ ${WRKSRC}/opt/${COMPILERDIR}/lib/${i} .endfor - @${AR} q ${WRKSRC}/opt/${COMPILERDIR}/lib/libcxa.a ${WRKSRC}/*.o - @${AR} q ${WRKSRC}/opt/${COMPILERDIR}/lib/libcxaguard.a ${WRKSRC}/*.o + @${AR} cr ${WRKSRC}/opt/${COMPILERDIR}/lib/libiccfbsd.a ${WRKSRC}/*.o # Some magic to be able to link @${MKDIR} ${WRKSRC}/opt/${COMPILERDIR}/bin/ldwrapper @${CC} ${CFLAGS} -o \ @@ -203,46 +222,21 @@ do-install: ${CPIO} -pdu -R ${BINOWN}:${BINGRP} --quiet ${PREFIX} post-install: - @${ECHO} "${PKGNAME} is now installed in ${PREFIX}/${COMPILERDIR}, to use it you have to" - @${ECHO} "put your license into your \$${INTEL_FLEXLM_LICENSE} (default:" - @${ECHO} "${PREFIX}/${COMPILERDIR}/licenses) directory and add" - @${ECHO} "${PREFIX}/${COMPILERDIR}/bin to your PATH." + @${ECHO} "${PKGNAME} is now installed in ${PREFIX}/${COMPILERDIR}, to use it you have to put your license into your \$${INTEL_FLEXLM_LICENSE} (default: ${PREFIX}/${COMPILERDIR}/licenses) directory and add ${PREFIX}/${COMPILERDIR}/bin to your PATH." | fmt @${ECHO} - @${ECHO} "In order to be able to compile C++ source with icpc you have to install" - @${ECHO} "devel/stlport-icc." + @${ECHO} "On FreeBSD 5 with __FreeBSD_version >= 502108 icpc is set up to use the GNU libstdc++ from the base as STL by default. Alternatively you can use the \"-cxxlib-icc\" option with icpc to use devel/stlport-icc as STL instead. In order to be able to compile C++ source with icpc on FreeBSD 4 or FreeBSD 5 with __FreeBSD_version < 502108 you have to install devel/stlport-icc. No further options to icpc to use devel/stlport-icc are required there." | fmt @${ECHO} - @${ECHO} "If you use icc on a Pentium 4 make sure you have 'options CPU_ENABLE_SSE'" - @${ECHO} "in your kernel config (have a look at http://www.FreeBSD.org/handbook/" - @${ECHO} "if you do not know how to do this), else icc will hang forever." + @${ECHO} "If you use icc on a Pentium 4 you may have to use 'options CPU_ENABLE_SSE' (depending on the OS version, if in doubt try if it works) in your kernel config (have a look at http://www.FreeBSD.org/handbook/ if you do not know how to do this), else icc will hang forever." | fmt @${ECHO} - @${ECHO} "WARNING: If you use icc while having linux_devtools installed, icc will use" - @${ECHO} "the wrong includes and therefore will generate bogus (not working) binaries!" + @${ECHO} "WARNING: If you use icc while having linux_devtools installed, icc will use the wrong includes and therefore will generate bogus (not working) binaries!" | fmt @${ECHO} - @${ECHO} "If you encounter further problems with icc please consult the errata at" - @${ECHO} "http://support.intel.com/support/performancetools/c/C_Compiler_Errata.htm" - @${ECHO} "first." + @${ECHO} "If you encounter further problems with icc please consult the errata at http://support.intel.com/support/performancetools/c/C_Compiler_Errata.htm first." | fmt @${ECHO} @${ECHO} "Call for benchmarks:" - @${ECHO} "Intel is interested to see some benchmark numbers which compare gcc with icc." - @${ECHO} "If you have a CPU produced by Intel and are able to do benchmarks with" - @${ECHO} "either your own source or with one of our major ports (e.g. with" - @${ECHO} "a webserver, a mailserver, a database system, an important graphics" - @${ECHO} "suite/program or some important math tool, ...) please try to spend some time" - @${ECHO} "to do a benchmark and send me (${MAINTAINER}) the result. You should" - @${ECHO} "include your system specs (CPU: speed/model, RAM: amount/speed, used disks" - @${ECHO} "(if necessary), chipset/mainboard type, ...), the version of the used" - @${ECHO} "software (OS, gcc, icc, ...), non default tuning options (kernel, sysctl) and" - @${ECHO} "the used compiler switches. If you don't use some 'standard' benchmark" - @${ECHO} "(e.g. the official MySQL benchmark, or the performance test suite of your" - @${ECHO} "prefered scripting language), please include a description about the" - @${ECHO} "benchmark too." + @${ECHO} "Intel is interested to see some benchmark numbers which compare gcc with icc. If you have a CPU produced by Intel and are able to do benchmarks with either your own source or with one of our major ports (e.g. with a webserver, a mailserver, a database system, an important graphics suite/program or some important math tool, ...) please try to spend some time to do a benchmark and send me (${MAINTAINER}) the result. You should include your system specs (CPU: speed/model, RAM: amount/speed, used disks (if necessary), chipset/mainboard type, ...), the version of the used software (OS, gcc, icc, ...), non default tuning options (kernel, sysctl) and the used compiler switches. If you don't use some 'standard' benchmark (e.g. the official MySQL benchmark, or the performance test suite of your prefered scripting language), please include a description about the benchmark too." | fmt @${ECHO} - @${ECHO} "Please use FreeBSD as the name of your OS in communications with the support," - @${ECHO} "the larger the FreeBSD userbase is, the more work gets done on FreeBSD" - @${ECHO} "specific issues by Intel. And please thank them for the FreeBSD support," - @${ECHO} "they are already spending some time to improve icc on FreeBSD." + @${ECHO} "Please use FreeBSD as the name of your OS in communications with the support, the larger the FreeBSD userbase is, the more work gets done on FreeBSD specific issues by Intel. And please thank them for the FreeBSD support, they are already spending some time to improve icc on FreeBSD." | fmt @${ECHO} - @${ECHO} "To read the entire post install message again, just run" - @${ECHO} "'make post-install | less'." + @${ECHO} "To read the entire post install message again, just run 'make post-install | less'." | fmt .include <bsd.port.post.mk> diff --git a/lang/icc/distinfo b/lang/icc/distinfo index 406a87668ab3..57626b035351 100644 --- a/lang/icc/distinfo +++ b/lang/icc/distinfo @@ -1,2 +1,2 @@ -MD5 (l_cc_pc_8.1.022.tar.gz) = 0088a39a224e9e41c05cc83e5947c1b1 -SIZE (l_cc_pc_8.1.022.tar.gz) = 133028836 +MD5 (l_cc_pu_8.1.024.tar.gz) = a1b4ae4427c6151e419461f435806add +SIZE (l_cc_pu_8.1.024.tar.gz) = 133091963 diff --git a/lang/icc/files/_types.h b/lang/icc/files/_types.h new file mode 100644 index 000000000000..8133831e030f --- /dev/null +++ b/lang/icc/files/_types.h @@ -0,0 +1,50 @@ +/*- + * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 + * From: @(#)types.h 8.3 (Berkeley) 1/5/94 + * From: FreeBSD: src/sys/i386/include/_types.h,v 1.9 2004/03/20 20:41:40 marcel Exp + * $FreeBSD$ + */ + +#ifndef __INTEL_COMPILER_MACHINE__TYPES_H_ +#define __INTEL_COMPILER_MACHINE__TYPES_H_ + +#include_next <machine/_types.h> + +#if defined(__GNUC__) && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST) +#define __GNUC_VA_LIST +typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ +#endif + +#endif /* !__INTEL_COMPILER_MACHINE__TYPES_H_ */ diff --git a/lang/icc/files/exclude b/lang/icc/files/exclude index c304cf11c1be..40278da8a9ce 100644 --- a/lang/icc/files/exclude +++ b/lang/icc/files/exclude @@ -71,7 +71,6 @@ lib/libguide.a lib/libguide.so lib/libguide_stats.a lib/libguide_stats.so -lib/libimf.so lib/libompstub.a lib/libsvml.so lib/libunwind.so diff --git a/lang/icc/files/ld.c b/lang/icc/files/ld.c index 9df01de0660f..797fe7497610 100644 --- a/lang/icc/files/ld.c +++ b/lang/icc/files/ld.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2003 Marius Strobl + * Copyright (c) 2002-2004 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,12 +42,12 @@ __FBSDID("$FreeBSD$"); #define PATH_LD "/usr/bin/ld" -#define LDW_CPP (1<<0) +#define LDW_CXXICC (1<<0) #define LDW_DYN (1<<1) #define LDW_GPROF (1<<2) #define LDW_PIC (1<<3) -#define LDW_THR (1<<4) -#define LDW_LGCC (1<<5) +#define LDW_STLP (1<<4) +#define LDW_THR (1<<5) struct arglist { size_t argc; @@ -105,7 +105,7 @@ main(int argc, char *argv[], char *envp[]) #endif if (ARGCMP(i, "-CPLUSPLUS")) { - flags |= LDW_CPP; + flags |= LDW_CXXICC; continue; } @@ -134,6 +134,17 @@ main(int argc, char *argv[], char *envp[]) } /* + * The STLport library just can be linked once otherwise + * we get problems with constructors and destructors of + * global instances. + */ + if (!strncmp(argv[i], "-lstlport_icc", + sizeof("-lstlport_icc") - 1)) { + flags |= LDW_STLP; + continue; + } + + /* * Link against libc_p when "-qp" or "-p" were given, * "/usr/lib/gcrt1.o" indicates this. */ @@ -141,11 +152,6 @@ main(int argc, char *argv[], char *envp[]) flags |= LDW_GPROF; continue; } - - if (ARGCMP(i, "-lgcc")) { - flags |= LDW_LGCC; - continue; - } } /* @@ -174,7 +180,8 @@ main(int argc, char *argv[], char *envp[]) if (!(flags & LDW_GPROF)) libc = "-lc_pic"; else { - char *p; + char *p; + libc = "-lc_p"; asprintf(&p, "%s_p", libthr); if (p == NULL) @@ -190,12 +197,13 @@ main(int argc, char *argv[], char *envp[]) for (i = 0; i < argc; i++) { if (ARGCMP(i, "-CPLUSPLUS") || ARGCMP(i, "-MT") || - ARGCMP(i, "-PIC") || - (ARGCMP(i, "-m") && i<argc-1 && ARGCMP(i+1, "elf_i386")) || - (ARGCMP(i, "elf_i386") && i != 0 && ARGCMP(i-1, "-m"))) + ARGCMP(i, "-PIC")) continue; - /* prepend "-melf_i386" to the commandline */ + /* + * Prepend "-melf_i386" and "-melf_i386_fbsd" respectively + * to the commandline. + */ if (i == 0) { addarg(&al, argv[0]); #if __FreeBSD_version < 500042 @@ -206,8 +214,14 @@ main(int argc, char *argv[], char *envp[]) continue; } - /* Don't add obsolete flag "-Qy", don't add libgcc_s. */ - if (ARGCMP(i, "-Qy") || ARGCMP(i, "-lgcc_s")) + /* + * Don't add "-m elf_i386" ICC passed to us. Don't add + * libgcc_eh, libgcc_s or libgcc_s_32. + */ + if ((ARGCMP(i, "-m") && i < argc - 1 && ARGCMP(i + 1, + "elf_i386")) || (ARGCMP(i, "elf_i386") && i != 0 && + ARGCMP(i - 1, "-m")) || ARGCMP(i, "-lgcc_eh") || + ARGCMP(i, "-lgcc_s") || ARGCMP(i, "-lgcc_s_32")) continue; /* @@ -216,7 +230,13 @@ main(int argc, char *argv[], char *envp[]) * in both, the static and the dynamic, versions. */ if (ARGCMP(i, "-lcprts")) { - if (flags & LDW_CPP && !(flags & LDW_LGCC)) { + if (flags & LDW_CXXICC && !(flags & LDW_STLP)) { + char *p; + + asprintf(&p, "-L%s/lib", icc_localbase); + if (p == NULL) + err(1, NULL); + addarg(&al, p); addarg(&al, flags & LDW_DYN ? "-Bdynamic" : "-Bstatic"); addarg(&al, "-lstlport_icc"); @@ -225,16 +245,16 @@ main(int argc, char *argv[], char *envp[]) } /* + * Inject the compatibility library for ICC libs on FreeBSD. * Link against libthr when compiling multi-threaded or C++ - * code (libcxa and libunwind depend on a threads library - * when compiling C++ source). + * code and not using libstdc++ (libcxa and libunwind depend + * on a threads library). */ if (ARGCMP(i, "-lc")) { - if (al.argc > 0 && - strncmp(al.argv[al.argc - 1], "-B", 2)) - addarg(&al, - flags & LDW_DYN ? "-Bdynamic" : "-Bstatic"); - if (flags & (LDW_CPP | LDW_THR)) { + addarg(&al, "-Bstatic"); + addarg(&al, "-liccfbsd"); + addarg(&al, flags & LDW_DYN ? "-Bdynamic" : "-Bstatic"); + if (flags & (LDW_CXXICC | LDW_THR)) { addarg(&al, libthr); #if __FreeBSD_version >= 500016 addarg(&al, @@ -259,47 +279,29 @@ main(int argc, char *argv[], char *envp[]) addarg(&al, "-L/usr/libexec/elf"); addarg(&al, "-L/usr/libexec"); addarg(&al, "-L/usr/lib"); - if (flags & LDW_CPP && !(flags & LDW_LGCC)) { - char *p; - asprintf(&p, "-L%s/lib", icc_localbase); - if (p == NULL) - err(1, NULL); - addarg(&al, p); - } continue; } /* - * Force libcxa, libcxaguard, libsvml and libunwind to static - * linkage, since the dynamic versions have glibc dependencies. - * Don't add superfluous -Bdynamic. + * Force libcxa, libcxaguard, libimf, libsvml and libunwind + * to static linkage, since the dynamic versions have glibc + * dependencies. */ - if (ARGCMP(i, "-Bdynamic") && i < argc - 1) { - if (ARGCMP(i + 1, "-lcxa") || - ARGCMP(i + 1, "-lcxaguard") || - ARGCMP(i + 1, "-lsvml") || - ARGCMP(i + 1, "-lunwind")) { - addarg(&al, "-Bstatic"); - continue; - } - - if (ARGCMP(i + 1, "-lcprts") || - ARGCMP(i + 1, "-lgcc_s")) - continue; - } - - /* Don't add superfluous -Bstatic. */ - if (ARGCMP(i, "-Bstatic") && i < argc - 1 && - (ARGCMP(i + 1, "-lcprts") || ARGCMP(i + 1, "-lgcc_s") || - ARGCMP(i + 1, "-lsvml") || ARGCMP(i + 1, "-lunwind"))) + if (ARGCMP(i, "-Bdynamic") && i < argc - 1 && + (ARGCMP(i + 1, "-lcxa") || ARGCMP(i + 1, "-lcxaguard") || + ARGCMP(i + 1, "-limf") || ARGCMP(i + 1, "-lsvml") || + ARGCMP(i + 1, "-lunwind"))) { + addarg(&al, "-Bstatic"); continue; + } /* * Sanity check if every lib is prepended by a linkage option, * add if missing. */ - if (!strncmp(argv[i], "-l", 2) && al.argc > 0 && - strncmp(al.argv[al.argc - 1], "-B", 2)) { + if (!strncmp(argv[i], "-l", 2) && + ((i != 0 && strncmp(argv[i - 1], "-B", 2)) || + (al.argc > 0 && strncmp(al.argv[al.argc - 1], "-B", 2)))) { if (ARGCMP(i, "-lcxa") || ARGCMP(i, "-lcxaguard") || ARGCMP(i, "-limf") || ARGCMP(i, "-lirc") || ARGCMP(i, "-lirc_s") || ARGCMP(i, "-lsvml") || diff --git a/lang/icc/files/patch-bin::icpc b/lang/icc/files/patch-bin::icpc index 2c1f4483b729..04f3858d9aed 100644 --- a/lang/icc/files/patch-bin::icpc +++ b/lang/icc/files/patch-bin::icpc @@ -1,6 +1,6 @@ --- bin/icpc.orig Tue Dec 9 19:55:12 2003 +++ bin/icpc Tue Dec 9 20:12:01 2003 -@@ -1,6 +1,12 @@ +@@ -1,6 +1,18 @@ #!/bin/sh -if [ -z INTEL_LICENSE_FILE ] @@ -10,11 +10,17 @@ +GXX_ROOT=<INSTALLDIR>/lib +export GXX_ROOT + ++GXX_INCLUDE=%%GXX_INCLUDE%% ++if [ ! -z "$GXX_INCLUDE" ] ++then ++ export GXX_INCLUDE ++fi ++ +if [ -z "$INTEL_LICENSE_FILE" ] then INTEL_LICENSE_FILE=<INSTALLDIR>/licenses; else -@@ -8,7 +14,7 @@ +@@ -8,7 +20,7 @@ fi export INTEL_LICENSE_FILE; @@ -23,7 +29,7 @@ then LD_LIBRARY_PATH=<INSTALLDIR>/lib; else -@@ -16,7 +22,7 @@ +@@ -16,7 +28,7 @@ fi export LD_LIBRARY_PATH; @@ -32,7 +38,7 @@ then PATH=<INSTALLDIR>/bin; else -@@ -24,11 +30,39 @@ +@@ -24,11 +36,43 @@ fi export PATH; @@ -56,6 +62,10 @@ + 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" diff --git a/lang/icc/pkg-plist b/lang/icc/pkg-plist index 3d99b0382650..6170d089ae0a 100644 --- a/lang/icc/pkg-plist +++ b/lang/icc/pkg-plist @@ -913,6 +913,8 @@ %%COMPILERDIR%%/include/fvec.h %%COMPILERDIR%%/include/ivec.h %%COMPILERDIR%%/include/ia32intrin.h +%%MACHINE__TYPES_H%%%%COMPILERDIR%%/include/machine/_types.h +%%MACHINE__TYPES_H%%@dirrm %%COMPILERDIR%%/include/machine %%COMPILERDIR%%/include/mathimf.h %%COMPILERDIR%%/include/mmintrin.h %%COMPILERDIR%%/include/pgouser.h @@ -935,7 +937,9 @@ %%COMPILERDIR%%/lib/libcxa.a %%COMPILERDIR%%/lib/libcxaguard.a %%COMPILERDIR%%/lib/libgcc.a +%%COMPILERDIR%%/lib/libiccfbsd.a %%COMPILERDIR%%/lib/libimf.a +%%COMPILERDIR%%/lib/libimf.so %%COMPILERDIR%%/lib/libirc.a %%COMPILERDIR%%/lib/libirc_s.a %%COMPILERDIR%%/lib/libsvml.a |