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: unassig...@gcc.gnu.org ReportedBy: jay.kr...@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