public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/51450] New: configure's test for -fno-rtti -fno-exceptions broken
@ 2011-12-07 14:14 christophe.lyon at st dot com
  2012-01-28 20:41 ` [Bug bootstrap/51450] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: christophe.lyon at st dot com @ 2011-12-07 14:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51450

             Bug #: 51450
           Summary: configure's test for -fno-rtti -fno-exceptions broken
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: christophe.lyon@st.com


I have noticed that configure decides that my build GCC does not support
-fno-rtti -fno-exceptions when building a new GCC.

I traced this down to a problem in libtool.m4 where _LT_COMPILER_NO_RTTI uses
_LT_COMPILER_OPTION to check whether these 2 options are supported.

The latter compiles & links $lt_simple_compile_test_code which contains:
lt_simple_compile_test_code="int some_variable = 0;"

The link phase fails because there is no main(), and then configure decides
-fno-rtti -fno-exceptions are not supported.

I am not sure about how to fix this:
- change _LT_COMPILER_OPTION to use $lt_simple_link_test_code instead?
- use a modified _LT_LINKER_OPTION (given that the options tests belong to
CFLAGS rather than LDFLAGS)?
- other?

Maybe this bug should be reported elsewhere?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug bootstrap/51450] configure's test for -fno-rtti -fno-exceptions broken
  2011-12-07 14:14 [Bug other/51450] New: configure's test for -fno-rtti -fno-exceptions broken christophe.lyon at st dot com
@ 2012-01-28 20:41 ` pinskia at gcc dot gnu.org
  2012-01-30  9:28 ` christophe.lyon at st dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-28 20:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51450

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-01-28
     Ever Confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-28 19:41:20 UTC ---
The configure which is the subversion on the trunk has the correct int main(){}
test in it.

Are you regenerating configure at all?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug bootstrap/51450] configure's test for -fno-rtti -fno-exceptions broken
  2011-12-07 14:14 [Bug other/51450] New: configure's test for -fno-rtti -fno-exceptions broken christophe.lyon at st dot com
  2012-01-28 20:41 ` [Bug bootstrap/51450] " pinskia at gcc dot gnu.org
@ 2012-01-30  9:28 ` christophe.lyon at st dot com
  2012-01-30 20:54 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: christophe.lyon at st dot com @ 2012-01-30  9:28 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51450

--- Comment #2 from christophe.lyon at st dot com 2012-01-30 09:23:27 UTC ---
I noticed this about an official release; I am not sure which one it was when I
entered this report, but it is at least true for GCC-4.6.2.

I have just checked
http://gcc.gnu.org/viewcvs/trunk/gcc/configure?revision=183406&view=markup
which seems to be the current trunk version of GCC's configure and can still
see:
lt_simple_compile_test_code="int some_variable = 0;"
at line 14904

So, when this is used when testing for -fno-rtti -fno-exceptions, it makes the
test fail.

I am not regenerating configure.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug bootstrap/51450] configure's test for -fno-rtti -fno-exceptions broken
  2011-12-07 14:14 [Bug other/51450] New: configure's test for -fno-rtti -fno-exceptions broken christophe.lyon at st dot com
  2012-01-28 20:41 ` [Bug bootstrap/51450] " pinskia at gcc dot gnu.org
  2012-01-30  9:28 ` christophe.lyon at st dot com
@ 2012-01-30 20:54 ` pinskia at gcc dot gnu.org
  2012-05-22  7:22 ` pinskia at gcc dot gnu.org
  2024-04-14 21:15 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-30 20:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51450

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-30 20:18:31 UTC ---
Looks like there are two different places in configure which test -fno-rtti and
-fno-exceptions:
One around line 28658 (which does not use lt_simple_compile_test_code
And one around line 14958 (which does use it).

I was looking at the first one rather than the second one.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug bootstrap/51450] configure's test for -fno-rtti -fno-exceptions broken
  2011-12-07 14:14 [Bug other/51450] New: configure's test for -fno-rtti -fno-exceptions broken christophe.lyon at st dot com
                   ` (2 preceding siblings ...)
  2012-01-30 20:54 ` pinskia at gcc dot gnu.org
@ 2012-05-22  7:22 ` pinskia at gcc dot gnu.org
  2024-04-14 21:15 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-22  7:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51450

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug bootstrap/51450] configure's test for -fno-rtti -fno-exceptions broken
  2011-12-07 14:14 [Bug other/51450] New: configure's test for -fno-rtti -fno-exceptions broken christophe.lyon at st dot com
                   ` (3 preceding siblings ...)
  2012-05-22  7:22 ` pinskia at gcc dot gnu.org
@ 2024-04-14 21:15 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-14 21:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51450

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
configure:18495: checking if gcc supports -fno-rtti -fno-exceptions
configure:18513: gcc -c -g   -fno-rtti -fno-exceptions conftest.c >&5
cc1: warning: command-line option '-fno-rtti' is valid for C++/D/ObjC++ but not
for C
configure:18517: $? = 0
configure:18530: result: no


It should have used g++ here ...

Note the previous one works though:
configure:7500: checking whether gcc supports -fno-rtti
configure:7517: gcc -c -fno-rtti  conftest.c >&5
cc1: warning: command-line option '-fno-rtti' is valid for C++/D/ObjC++ but not
for C
configure:7517: $? = 0
configure:7526: result: yes




https://lists.gnu.org/archive/html/libtool/2003-08/msg00003.html

Looks like the issue upstream in libtool now the question comes is this fixed
upstream or not.

Note the test here is not an issue for GCC's builds in general due to the extra
testing for -fno-rtti -fno-exceptions that gcc does but still an issue for the
libtool that is included with gcc.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-14 21:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-07 14:14 [Bug other/51450] New: configure's test for -fno-rtti -fno-exceptions broken christophe.lyon at st dot com
2012-01-28 20:41 ` [Bug bootstrap/51450] " pinskia at gcc dot gnu.org
2012-01-30  9:28 ` christophe.lyon at st dot com
2012-01-30 20:54 ` pinskia at gcc dot gnu.org
2012-05-22  7:22 ` pinskia at gcc dot gnu.org
2024-04-14 21:15 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).