Here it is. I have grouped the options which required change together. I
could not test the change with 8.1 and 9.0 compilers but I will do that
as soon as our sysadmins resolve my account issues.
On a side note: I could not detect any changes brought in by the -Xc
option which I believe to be misspelled and ignored by the compiler
driver. OTOH -X is omitting the standard include paths.
2007-02-19 lnicoara <[EMAIL PROTECTED]>
* etc/config/icc.config
Changed build process for post-8.1 compilers to
use the yet undocumented -cxxlib-nostd option.
Liviu
Index: etc/config/icc.config
===================================================================
--- etc/config/icc.config (revision 509218)
+++ etc/config/icc.config (working copy)
@@ -15,8 +15,11 @@
endif
CCVER := $(shell $(CXX) -V foo.c 2>&1 | sed -n "s/.*Version
*\([0-9.]*\).*/\1/p")
+CXX_MAJOR := $(shell echo "$(CCVER)" | sed "s/^\([1-9][0-9]*\).*/\1/")
+CXX_MINOR := $(shell echo "$(CCVER)" | sed "s/[1-9]*\.\([0-9]*\).*/\1/")
+
+
CPPFLAGS = -I$(TOPDIR)/include/ansi
-CXXFLAGS = -Xc -no_cpprt
WARNFLAGS = -w1
PHWARNFLAGS =
@@ -26,11 +29,22 @@
ICCDIR = `which $(CXX) | sed 's:bin/$(CXX):lib:'`
-LD = $(CXX) -no_cpprt $(ICCDIR)/crtxi.o
-LDFLAGS =
LDSOFLAGS = -shared
-LDLIBS = -Bstatic -lcxa -lunwind -Bdynamic $(ICCDIR)/crtxn.o
+# -cxxlib-nostd, present in all compilers since 8.1, will be documented in 10.x
+ifeq ($(shell [ $(CXX_MAJOR) -gt 8 -o $(CXX_MAJOR) -eq 8 -a $(CXX_MINOR) -ge 1
]), 0)
+ LD = $(CXX) -no_cpprt $(ICCDIR)/crtxi.o
+ CXXFLAGS = -Xc -no_cpprt
+ LDFLAGS =
+ LDLIBS = -Bstatic -lcxa -lunwind -Bdynamic $(ICCDIR)/crtxn.o
+else
+ LD = $(CXX)
+ CXXFLAGS = -cxxlib-nostd
+ LDFLAGS = -cxxlib-nostd
+ LDLIBS = -lcxaguard -lsupc++
+endif
+
+
# The flag(s) to use to embed a library search path into generated executables.
RPATH = -Wl,-R