This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/56364] New: autoconf compiler switches are also used to link and they can fail (-fno-rtti -fno-exceptions Solaris cc/ld)
- From: "jay.krell at cornell dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 17 Feb 2013 11:49:47 +0000
- Subject: [Bug bootstrap/56364] New: autoconf compiler switches are also used to link and they can fail (-fno-rtti -fno-exceptions Solaris cc/ld)
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56364
Bug #: 56364
Summary: autoconf compiler switches are also used to link and
they can fail (-fno-rtti -fno-exceptions Solaris
cc/ld)
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jay.krell@cornell.edu
Solaris cc and CC accept with warning -fno-rtti and -fno-exceptions.
But they are passed on to the Solaris linker, and it rejects them with an
error.
In 4.7.2/gcc/configure, -fno-rtti -fno-exceptions are tested
only for compilation, but if that works, they are also used for linking (in
gcc/Makefile).
Suggested fixes, one of:
1) just never use -fno-rtti -fno-exceptions
Not a bad idea I think. Is there really noticable overhead these days?
Less autoconf, more portability, is good.
2) only use -fno-rtti -fno-exceptions if using gcc
pretty easy and safe and no-change for most folks
3) only compile with -fno-rtti -fno-exceptions, but don't link with them
4) test -fno-rtti -fno-exceptions with compiling and linking use
them where they work and not where they don't; i.e. w/ and w/o "-c"
- Jay