This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/54659] [4.8 Regression] Bootstrap with --disable-nls broken under Windows


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-21 11:35:46 UTC ---
(In reply to comment #4)
> On Fri, 26 Oct 2012, dnovillo at google dot com wrote:
> 
> > 
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54659
> > 
> > --- Comment #3 from dnovillo at google dot com <dnovillo at google dot com> 2012-10-26 12:34:53 UTC ---
> > On Fri, Oct 26, 2012 at 8:05 AM, rguenther at suse dot de
> > <gcc-bugzilla@gcc.gnu.org> wrote:
> > 
> > > Fact is that all this stuff happens because gmp.h is not included
> > > from system.h ...
> > 
> > I broke Ada when I tried it.  I don't remember the details, but it
> > seemed tedious to fix.
> 
> I know ... but it's the only way that is designed to avoid this
> kind of issues.

Trying to see what happens ...

The issue is r176210 wrapping everything in

#ifdef __cplusplus
extern "C" {
#endif

...

#ifdef __cplusplus
}
#endif

_including_ #include statements, including the inclusion of system.h.

That of course is totally bogus.

What it wants is to make sure exports have C linkage (I assume).

A fix is to undo this ... like with the following hack:

Index: gcc/system.h
===================================================================
--- gcc/system.h        (revision 194658)
+++ gcc/system.h        (working copy)
@@ -24,6 +24,11 @@ along with GCC; see the file COPYING3.
 #ifndef GCC_SYSTEM_H
 #define GCC_SYSTEM_H

+/* Undo extern "C" wrappings done by including files (Ada).  */
+#ifdef __cplusplus
+extern "C++" {
+#endif
+
 /* We must include stdarg.h before stdio.h.  */
 #include <stdarg.h>

@@ -1051,4 +1056,8 @@ helper_const_non_const_cast (const char
 #define DEBUG_VARIABLE
 #endif

+#ifdef __cplusplus
+}
+#endif
+
 #endif /* ! GCC_SYSTEM_H */

but of course even better would be to fix the reason for this hack - why
are those Ada files built with a C++ compiler in the first place?!  Why
does it need to wrap _everything_ inside extern "C"??

Ada people?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]