Re: Intel 8.x, 9.x -cxxlib-nostd change, was: Re: [PATCH] crtxn.o (Intel C++ 9.0) -> crtend.o (Intel C++ 9.1)

2007-02-19 Thread Martin Sebor

Liviu Nicoara wrote:
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.


IIRC, -Xc was a conformance option in earlier versions. It's accepted
but ignored in 9.x so we could probably remove it. I'd need to go back
and pull up the old docs and the discussion with Intel where they point
it out.



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.


Looks good to me. Thanks!

Martin




Intel 8.x, 9.x -cxxlib-nostd change, was: Re: [PATCH] crtxn.o (Intel C++ 9.0) -> crtend.o (Intel C++ 9.1)

2007-02-19 Thread Liviu Nicoara
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
 



Re: [PATCH] crtxn.o (Intel C++ 9.0) -> crtend.o (Intel C++ 9.1)

2007-02-19 Thread Martin Sebor

Liviu Nicoara wrote:

Liviu Nicoara wrote:

Martin Sebor wrote:

Liviu Nicoara wrote:

The diff conditional got truncated in the copy & paste:
[...]

So does this mean Intel renamed crtxn.o to crtend.o between
9.0 and 9.1?

Intel tells me (in issue 355260) they have an undocumented
compiler option -cxxlib-nostd that will apparently let us
do away with all the special object files and libraries on
the link like. [...]


Do you think there is value in preserving the former linking for 
pre-9.x compilers?


Make that pre-8.1 compilers (as per the Intel incident).


I'd keep it unless it's *really* hard to do just in case
someone is using an old version of the compiler.

Martin



Re: [PATCH] crtxn.o (Intel C++ 9.0) -> crtend.o (Intel C++ 9.1)

2007-02-19 Thread Liviu Nicoara

Liviu Nicoara wrote:

Martin Sebor wrote:

Liviu Nicoara wrote:

The diff conditional got truncated in the copy & paste:
[...]

So does this mean Intel renamed crtxn.o to crtend.o between
9.0 and 9.1?

Intel tells me (in issue 355260) they have an undocumented
compiler option -cxxlib-nostd that will apparently let us
do away with all the special object files and libraries on
the link like. [...]


Do you think there is value in preserving the former linking for pre-9.x 
compilers?


Make that pre-8.1 compilers (as per the Intel incident).



Liviu






Re: [PATCH] crtxn.o (Intel C++ 9.0) -> crtend.o (Intel C++ 9.1)

2007-02-19 Thread Liviu Nicoara

Martin Sebor wrote:

Liviu Nicoara wrote:

The diff conditional got truncated in the copy & paste:
[...]

So does this mean Intel renamed crtxn.o to crtend.o between
9.0 and 9.1?

Intel tells me (in issue 355260) they have an undocumented
compiler option -cxxlib-nostd that will apparently let us
do away with all the special object files and libraries on
the link like. I tried it in a manual test a few months ago
and it seemed to work fine but I haven't changed icc.config
to use it yet. Would you mind checking it out and if it
really does work putting together a patch that enables it
for 9.0 and beyond?


Do you think there is value in preserving the former linking for pre-9.x 
compilers?


Liviu



Re: [PATCH] crtxn.o (Intel C++ 9.0) -> crtend.o (Intel C++ 9.1)

2007-02-15 Thread Martin Sebor

Liviu Nicoara wrote:

The diff conditional got truncated in the copy & paste:

Liviu Nicoara wrote:
[...] +ifeq ($(shell [ $(CXX_MAJOR) -ge 9 -o $(CXX_MAJOR) -eq 9 -a 
$(CXX_MINOR) -ge 1 ]


Here it is again:


So does this mean Intel renamed crtxn.o to crtend.o between
9.0 and 9.1?

Intel tells me (in issue 355260) they have an undocumented
compiler option -cxxlib-nostd that will apparently let us
do away with all the special object files and libraries on
the link like. I tried it in a manual test a few months ago
and it seemed to work fine but I haven't changed icc.config
to use it yet. Would you mind checking it out and if it
really does work putting together a patch that enables it
for 9.0 and beyond?

See issue 355260 for more detail:
https://premier.intel.com/premier/IssueDetail.aspx?IssueID=355260

Thanks
Martin



2007-02-15  lnicoara  <[EMAIL PROTECTED]>

* etc/config/icc.config
  Added conditional to handle name differences
  for crt object between Intel C++ 9.0 and 9.1.

Liviu





Re: [PATCH] crtxn.o (Intel C++ 9.0) -> crtend.o (Intel C++ 9.1)

2007-02-15 Thread Liviu Nicoara

The diff conditional got truncated in the copy & paste:

Liviu Nicoara wrote:
[...] 
+ifeq ($(shell [ $(CXX_MAJOR) -ge 9 -o $(CXX_MAJOR) -eq 9 -a $(CXX_MINOR) -ge 1 ]


Here it is again:

2007-02-15  lnicoara  <[EMAIL PROTECTED]>

* etc/config/icc.config
  Added conditional to handle name differences
  for crt object between Intel C++ 9.0 and 9.1.

Liviu
Index: etc/config/icc.config
===
--- etc/config/icc.config   (revision 507945)
+++ etc/config/icc.config   (working copy)
@@ -15,6 +15,10 @@
 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
 
@@ -29,7 +33,12 @@
 LD  = $(CXX) -no_cpprt $(ICCDIR)/crtxi.o
 LDFLAGS =
 LDSOFLAGS   = -shared
+
+ifeq ($(shell [ $(CXX_MAJOR) -gt 9 -o $(CXX_MAJOR) -eq 9 -a $(CXX_MINOR) -ge 1 
]), 0)
 LDLIBS  = -Bstatic -lcxa -lunwind -Bdynamic $(ICCDIR)/crtxn.o
+else
+LDLIBS  = -Bstatic -lcxa -lunwind -Bdynamic $(ICCDIR)/crtend.o
+endif
 
 # The flag(s) to use to embed a library search path into generated executables.
 RPATH   = -Wl,-R


[PATCH] crtxn.o (Intel C++ 9.0) -> crtend.o (Intel C++ 9.1)

2007-02-15 Thread Liviu Nicoara

2007-02-15  lnicoara  <[EMAIL PROTECTED]>

* etc/config/icc.config:
  Added conditional to handle name differences
  for crt object between Intel C++ 9.0 and 9.1.

Liviu

Index: etc/config/icc.config
===
--- etc/config/icc.config   (revision 507945)
+++ etc/config/icc.config   (working copy)
@@ -15,6 +15,10 @@
 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
 
@@ -29,7 +33,12 @@
 LD  = $(CXX) -no_cpprt $(ICCDIR)/crtxi.o
 LDFLAGS =
 LDSOFLAGS   = -shared
+
+ifeq ($(shell [ $(CXX_MAJOR) -ge 9 -o $(CXX_MAJOR) -eq 9 -a $(CXX_MINOR) -ge 1 
]
 LDLIBS  = -Bstatic -lcxa -lunwind -Bdynamic $(ICCDIR)/crtxn.o
+else
+LDLIBS  = -Bstatic -lcxa -lunwind -Bdynamic $(ICCDIR)/crtend.o
+endif
 
 # The flag(s) to use to embed a library search path into generated executables.
 RPATH   = -Wl,-R