public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/40702] New: lto-elf.c fails to compile on Solaris
@ 2009-07-09 19:10 ro at gcc dot gnu dot org
2009-10-03 22:12 ` [Bug lto/40702] " rguenth at gcc dot gnu dot org
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: ro at gcc dot gnu dot org @ 2009-07-09 19:10 UTC (permalink / raw)
To: gcc-bugs
Trying to build the lto branch as of 20090709 on Solaris (both SPARC and x86)
fails compiling lto-elf.c:
cc1: warnings being treated as errors
In file included from /vol/gcc/src/gcc-lto/gcc/lto/lto-elf.c:21:0:
/vol/gcc/include/libelf/gelf.h:102:1: error: function declaration isn't a
prototype
This happens because for some reason __STDC__ isn't defined at all (as revealed
by rebuilding with -g3 -save-temps), so libelf/libelf.h defines __P() as empty.
I've hacked around this by adding || defined(__sun) to the first __P definition
in libelf/gelf.h and libelf/libelf.h, but this needs to be properly
investigated.
--
Summary: lto-elf.c fails to compile on Solaris
Product: gcc
Version: lto
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at gcc dot gnu dot org
GCC build triplet: sparc-sun-solaris2.11
GCC host triplet: sparc-sun-solaris2.11
GCC target triplet: sparc-sun-solaris2.11
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40702
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/40702] lto-elf.c fails to compile on Solaris
2009-07-09 19:10 [Bug bootstrap/40702] New: lto-elf.c fails to compile on Solaris ro at gcc dot gnu dot org
@ 2009-10-03 22:12 ` rguenth at gcc dot gnu dot org
2009-10-05 12:56 ` ro at techfak dot uni-bielefeld dot de
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-03 22:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2009-10-03 22:12 -------
Waiting for someone with access to that host to investigate.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Component|bootstrap |lto
Keywords| |build
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40702
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/40702] lto-elf.c fails to compile on Solaris
2009-07-09 19:10 [Bug bootstrap/40702] New: lto-elf.c fails to compile on Solaris ro at gcc dot gnu dot org
2009-10-03 22:12 ` [Bug lto/40702] " rguenth at gcc dot gnu dot org
@ 2009-10-05 12:56 ` ro at techfak dot uni-bielefeld dot de
2009-10-05 13:13 ` rguenth at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ro at techfak dot uni-bielefeld dot de @ 2009-10-05 12:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from ro at techfak dot uni-bielefeld dot de 2009-10-05 12:56 -------
Subject: Re: lto-elf.c fails to compile on Solaris
> ------- Comment #1 from rguenth at gcc dot gnu dot org 2009-10-03 22:12 -------
> Waiting for someone with access to that host to investigate.
I've finally understood what was going on: Solaris 2 is one of the few
STDC_0_IN_SYSTEM_HEADERS targets, thus the definition of __STDC__ in the
-g3 -save-temps output changes on where in the file one is (and no
definition is actually emitted, which caused massive confusion for me).
The actual fix is simple: just test for defined(__STDC__) in libelf gelf.h
and libelf.h, as the following fix does:
===================================================================
RCS file: RCS/gelf.h,v
retrieving revision 1.1
diff -up -r1.1 gelf.h
--- gelf.h 2009/09/28 17:51:38 1.1
+++ gelf.h 2009/09/28 18:54:27
@@ -39,7 +39,7 @@ extern "C" {
#endif /* __cplusplus */
#ifndef __P
-# if (__STDC__ + 0) || defined(__cplusplus) || defined(_WIN32)
+# if defined(__STDC__) || defined(__cplusplus) || defined(_WIN32)
# define __P(args) args
# else /* __STDC__ || defined(__cplusplus) */
# define __P(args) ()
===================================================================
RCS file: RCS/libelf.h,v
retrieving revision 1.1
diff -up -r1.1 libelf.h
--- libelf.h 2009/09/28 17:51:38 1.1
+++ libelf.h 2009/09/28 18:54:16
@@ -42,7 +42,7 @@ extern "C" {
#endif /* __cplusplus */
#ifndef __P
-# if (__STDC__ + 0) || defined(__cplusplus) || defined(_WIN32)
+# if defined(__STDC__) || defined(__cplusplus) || defined(_WIN32)
# define __P(args) args
# else /* __STDC__ || defined(__cplusplus) */
# define __P(args) ()
This allowed me too bootstrap on Solaris 11/SPARC and Solaris 10/x86.
Rainer
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40702
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/40702] lto-elf.c fails to compile on Solaris
2009-07-09 19:10 [Bug bootstrap/40702] New: lto-elf.c fails to compile on Solaris ro at gcc dot gnu dot org
2009-10-03 22:12 ` [Bug lto/40702] " rguenth at gcc dot gnu dot org
2009-10-05 12:56 ` ro at techfak dot uni-bielefeld dot de
@ 2009-10-05 13:13 ` rguenth at gcc dot gnu dot org
2009-10-05 14:05 ` ro at techfak dot uni-bielefeld dot de
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-05 13:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2009-10-05 13:13 -------
That's weird. So is this a libelf bug after all or can we somehow workaround
it
in gcc?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40702
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/40702] lto-elf.c fails to compile on Solaris
2009-07-09 19:10 [Bug bootstrap/40702] New: lto-elf.c fails to compile on Solaris ro at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-10-05 13:13 ` rguenth at gcc dot gnu dot org
@ 2009-10-05 14:05 ` ro at techfak dot uni-bielefeld dot de
2010-04-23 14:34 ` rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ro at techfak dot uni-bielefeld dot de @ 2009-10-05 14:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from ro at techfak dot uni-bielefeld dot de 2009-10-05 14:05 -------
Subject: Re: lto-elf.c fails to compile on Solaris
> ------- Comment #3 from rguenth at gcc dot gnu dot org 2009-10-05 13:13 -------
> That's weird. So is this a libelf bug after all or can we somehow workaround
> it
> in gcc?
I think it's a libelf bug. I'll report it upstream. In addition, I'll
check if STDC_0_IN_SYSTEM_HEADERS is still necessary on Solaris 2.
Rainer
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40702
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/40702] lto-elf.c fails to compile on Solaris
2009-07-09 19:10 [Bug bootstrap/40702] New: lto-elf.c fails to compile on Solaris ro at gcc dot gnu dot org
` (3 preceding siblings ...)
2009-10-05 14:05 ` ro at techfak dot uni-bielefeld dot de
@ 2010-04-23 14:34 ` rguenth at gcc dot gnu dot org
2010-04-23 18:09 ` ebotcazou at gcc dot gnu dot org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-23 14:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2010-04-23 14:34 -------
What's the status of this bug?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40702
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/40702] lto-elf.c fails to compile on Solaris
2009-07-09 19:10 [Bug bootstrap/40702] New: lto-elf.c fails to compile on Solaris ro at gcc dot gnu dot org
` (4 preceding siblings ...)
2010-04-23 14:34 ` rguenth at gcc dot gnu dot org
@ 2010-04-23 18:09 ` ebotcazou at gcc dot gnu dot org
2010-04-28 11:16 ` ro at CeBiTec dot Uni-Bielefeld dot DE
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2010-04-23 18:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ebotcazou at gcc dot gnu dot org 2010-04-23 18:08 -------
This at least works for me on SPARC/Solaris 8, 9 and 10.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40702
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/40702] lto-elf.c fails to compile on Solaris
2009-07-09 19:10 [Bug bootstrap/40702] New: lto-elf.c fails to compile on Solaris ro at gcc dot gnu dot org
` (5 preceding siblings ...)
2010-04-23 18:09 ` ebotcazou at gcc dot gnu dot org
@ 2010-04-28 11:16 ` ro at CeBiTec dot Uni-Bielefeld dot DE
2010-04-28 11:55 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld dot DE @ 2010-04-28 11:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from ro at CeBiTec dot Uni-Bielefeld dot DE 2010-04-28 11:16 -------
Subject: Re: lto-elf.c fails to compile on Solaris
> ------- Comment #5 from rguenth at gcc dot gnu dot org 2010-04-23 14:34 -------
> What's the status of this bug?
I haven't checked anything before Solaris 10 yet (still have to set up
my test sustems), but mainline is fine since the native libelf can be
used. I haven't pushed the libelf 0.8.12 patch upstream yet, but there
isn't much use if the native library can be used.
The 4.5 branch is still affected until the elf_getshdrstrndx has been
backported. Btw., what's the status with Honza's problem with that? I
haven't heard anything yet, but would like to have this sorted out
before backporting.
Rainer
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40702
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/40702] lto-elf.c fails to compile on Solaris
2009-07-09 19:10 [Bug bootstrap/40702] New: lto-elf.c fails to compile on Solaris ro at gcc dot gnu dot org
` (6 preceding siblings ...)
2010-04-28 11:16 ` ro at CeBiTec dot Uni-Bielefeld dot DE
@ 2010-04-28 11:55 ` rguenth at gcc dot gnu dot org
2010-04-28 13:02 ` hubicka at gcc dot gnu dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-28 11:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2010-04-28 11:55 -------
I'm not sure, let's as honza.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40702
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/40702] lto-elf.c fails to compile on Solaris
2009-07-09 19:10 [Bug bootstrap/40702] New: lto-elf.c fails to compile on Solaris ro at gcc dot gnu dot org
` (7 preceding siblings ...)
2010-04-28 11:55 ` rguenth at gcc dot gnu dot org
@ 2010-04-28 13:02 ` hubicka at gcc dot gnu dot org
2010-04-28 14:41 ` ro at CeBiTec dot Uni-Bielefeld dot DE
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2010-04-28 13:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from hubicka at gcc dot gnu dot org 2010-04-28 13:01 -------
Hmm, I am not at all sure what problem I should have with this?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40702
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/40702] lto-elf.c fails to compile on Solaris
2009-07-09 19:10 [Bug bootstrap/40702] New: lto-elf.c fails to compile on Solaris ro at gcc dot gnu dot org
` (8 preceding siblings ...)
2010-04-28 13:02 ` hubicka at gcc dot gnu dot org
@ 2010-04-28 14:41 ` ro at CeBiTec dot Uni-Bielefeld dot DE
2010-06-03 13:47 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld dot DE @ 2010-04-28 14:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from ro at CeBiTec dot Uni-Bielefeld dot DE 2010-04-28 14:40 -------
Subject: Re: lto-elf.c fails to compile on Solaris
> ------- Comment #9 from hubicka at gcc dot gnu dot org 2010-04-28 13:01 -------
> Hmm, I am not at all sure what problem I should have with this?
In
http://gcc.gnu.org/ml/gcc-patches/2010-04/msg01179.html
Richard reported that you had a problem with the patch that introduced
an elf_getshdrstrndx replacement for the benefit of older Solaris
releases, but I wonder how the error reported can happen.
Thanks.
Rainer
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40702
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/40702] lto-elf.c fails to compile on Solaris
2009-07-09 19:10 [Bug bootstrap/40702] New: lto-elf.c fails to compile on Solaris ro at gcc dot gnu dot org
` (9 preceding siblings ...)
2010-04-28 14:41 ` ro at CeBiTec dot Uni-Bielefeld dot DE
@ 2010-06-03 13:47 ` rguenth at gcc dot gnu dot org
2010-06-04 15:21 ` ro at CeBiTec dot Uni-Bielefeld dot DE
2010-07-24 16:24 ` rguenth at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-03 13:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from rguenth at gcc dot gnu dot org 2010-06-03 13:47 -------
The problem seems to have vanished, so eventually the fix can be backported
(together with the typo fix in the configure script obviously).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40702
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/40702] lto-elf.c fails to compile on Solaris
2009-07-09 19:10 [Bug bootstrap/40702] New: lto-elf.c fails to compile on Solaris ro at gcc dot gnu dot org
` (10 preceding siblings ...)
2010-06-03 13:47 ` rguenth at gcc dot gnu dot org
@ 2010-06-04 15:21 ` ro at CeBiTec dot Uni-Bielefeld dot DE
2010-07-24 16:24 ` rguenth at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld dot DE @ 2010-06-04 15:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from ro at CeBiTec dot Uni-Bielefeld dot DE 2010-06-04 15:21 -------
Subject: Re: lto-elf.c fails to compile on Solaris
> ------- Comment #11 from rguenth at gcc dot gnu dot org 2010-06-03 13:47 -------
> The problem seems to have vanished, so eventually the fix can be backported
> (together with the typo fix in the configure script obviously).
Done: I've run toplevel configure and make configure-gcc on both
i386-pc-solaris2.11 (which has the new elf_getshdrstrndx) and
i386-pc-solaris2.10 (which only has the non-conformant version of
elf_getshstrndx) and got the expected results (and no error in
gcc/config.log), so I've check this in.
Should we ever receive more information for bootstrap/44079, we can
either fix the configure tests or document the required version of
elfutils libelf.
Rainer
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40702
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/40702] lto-elf.c fails to compile on Solaris
2009-07-09 19:10 [Bug bootstrap/40702] New: lto-elf.c fails to compile on Solaris ro at gcc dot gnu dot org
` (11 preceding siblings ...)
2010-06-04 15:21 ` ro at CeBiTec dot Uni-Bielefeld dot DE
@ 2010-07-24 16:24 ` rguenth at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-24 16:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from rguenth at gcc dot gnu dot org 2010-07-24 16:24 -------
Fixed then.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.5.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40702
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2010-07-24 16:24 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-09 19:10 [Bug bootstrap/40702] New: lto-elf.c fails to compile on Solaris ro at gcc dot gnu dot org
2009-10-03 22:12 ` [Bug lto/40702] " rguenth at gcc dot gnu dot org
2009-10-05 12:56 ` ro at techfak dot uni-bielefeld dot de
2009-10-05 13:13 ` rguenth at gcc dot gnu dot org
2009-10-05 14:05 ` ro at techfak dot uni-bielefeld dot de
2010-04-23 14:34 ` rguenth at gcc dot gnu dot org
2010-04-23 18:09 ` ebotcazou at gcc dot gnu dot org
2010-04-28 11:16 ` ro at CeBiTec dot Uni-Bielefeld dot DE
2010-04-28 11:55 ` rguenth at gcc dot gnu dot org
2010-04-28 13:02 ` hubicka at gcc dot gnu dot org
2010-04-28 14:41 ` ro at CeBiTec dot Uni-Bielefeld dot DE
2010-06-03 13:47 ` rguenth at gcc dot gnu dot org
2010-06-04 15:21 ` ro at CeBiTec dot Uni-Bielefeld dot DE
2010-07-24 16:24 ` rguenth at gcc dot gnu dot 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).