Bug 44216 - [4.6 regression] All libjava tests fail on IRIX 6.5: ld warns about -no-merge-exidx-entries
Summary: [4.6 regression] All libjava tests fail on IRIX 6.5: ld warns about -no-merge...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.6.0
Assignee: Rainer Orth
URL: http://gcc.gnu.org/ml/gcc-patches/201...
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-05-20 18:21 UTC by Rainer Orth
Modified: 2010-05-25 17:01 UTC (History)
4 users (show)

See Also:
Host: mips-sgi-irix6.5
Target: mips-sgi-irix6.5
Build: mips-sgi-irix6.5
Known to work:
Known to fail:
Last reconfirmed: 2010-05-25 16:55:37


Attachments
proposed patch (417 bytes, patch)
2010-05-25 16:14 UTC, Rainer Orth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Orth 2010-05-20 18:21:31 UTC
Since the introduction of the configure check for the --no-merge-exidx-entries
linker option, all libjava tests fail on IRIX 6.5:

output is:
(null): WARNING 1  : Unknown option: -no-merge-exidx-entries (ignored).


FAIL: linking PR9577

The problem is that the SGI ld warns about unknown options as above, but still
exists with status 0.  None of the options to suppress errors/warnings has an
effect on this, neither -LD_MSG:error=1 nor -LD_MSG:off=1 nor -woff 1.

I've found no good way to handle this generically, since the AC_LINK_IFELSE
macro only logs stderr of the link command to conftest,err and the warning
goes to stdout.  I could of course simply set libgcj_cv_exidx=no for
mips-sgi-irix6.5, but perhaps there's a cleaner solution I'm just not seeing?
Comment 1 Rainer Orth 2010-05-20 18:23:32 UTC
Paolo, do you happen to have an idea how to handle this cleanly?
Comment 2 Paolo Bonzini 2010-05-21 07:27:02 UTC
What if you call AC_LANG_WERROR just before the test?  This wouldn't be a final patch because then you need to restore the previous value, but it's a start.

Ralf, maybe we want in Autoconf (and hence in override.m4) a mechanism to push/pop the AC_LANG_WERROR state?
Comment 3 Ralf Wildenhues 2010-05-21 08:15:19 UTC
(In reply to comment #2)
> Ralf, maybe we want in Autoconf (and hence in override.m4) a mechanism to
> push/pop the AC_LANG_WERROR state?

Isn't there such a mechanism already?  If not, then there was at least a proposed patch (series) to add such a while ago, I don't recall whether/why that wasn't merged.
Comment 4 ro@CeBiTec.Uni-Bielefeld.DE 2010-05-21 09:26:58 UTC
Subject: Re:  [4.6 regression] All libjava tests fail on IRIX 6.5: ld warns about -no-merge-exidx-entries

> ------- Comment #3 from rwild at gcc dot gnu dot org  2010-05-21 08:15 -------
> (In reply to comment #2)
>> Ralf, maybe we want in Autoconf (and hence in override.m4) a mechanism to
>> push/pop the AC_LANG_WERROR state?
>
> Isn't there such a mechanism already?  If not, then there was at least a
> proposed patch (series) to add such a while ago, I don't recall whether/why
> that wasn't merged.

At least not in Autoconf 2.64.  I've found a single instance in the
implementation of AC_PATH_XTRA.

I'll give it a try.

	Rainer
Comment 5 Rainer Orth 2010-05-25 16:14:24 UTC
Created attachment 20745 [details]
proposed patch

This patch worked for me.  It's a hack in that it does the save and restore
using lowlevel autoconf implementation details, but it gets the job done.
Comment 6 Paolo Bonzini 2010-05-25 16:21:29 UTC
The patch needs a fat comment saying what's going on, then it should be okay.
Comment 7 Rainer Orth 2010-05-25 16:55:37 UTC
Mine.
Comment 8 Rainer Orth 2010-05-25 17:00:00 UTC
Subject: Bug 44216

Author: ro
Date: Tue May 25 16:59:45 2010
New Revision: 159833

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159833
Log:
	PR libgcj/44216
	* configure.ac (libgcj_cv_exidx): Enable AC_LANG_WERROR.
	Save and restore werror flag.
	* configure: Regenerate.

Modified:
    trunk/libjava/ChangeLog
    trunk/libjava/configure
    trunk/libjava/configure.ac

Comment 9 Rainer Orth 2010-05-25 17:01:34 UTC
Fixed for 4.6.0.
Comment 10 Rainer Orth 2010-06-11 11:46:23 UTC
Subject: Bug 44216

Author: ro
Date: Fri Jun 11 11:45:59 2010
New Revision: 160602

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160602
Log:
	Backport from mainline:
	2010-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR libgcj/44216
	* configure.ac (libgcj_cv_exidx): Enable AC_LANG_WERROR.
	Save and restore werror flag.
	* configure: Regenerate.

Modified:
    branches/gcc-4_5-branch/libjava/ChangeLog
    branches/gcc-4_5-branch/libjava/configure
    branches/gcc-4_5-branch/libjava/configure.ac

Comment 11 Rainer Orth 2010-06-11 11:49:52 UTC
Subject: Bug 44216

Author: ro
Date: Fri Jun 11 11:49:16 2010
New Revision: 160603

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160603
Log:
	config:
	* override.m4 (AC_LANG_WERROR): Redefine to autoconf 2.62 version.

	libjava:
	Backport from mainline:
	2010-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR libgcj/44216
	* configure.ac (libgcj_cv_exidx): Enable AC_LANG_WERROR.
	Save and restore werror flag.
	* configure: Regenerate.

Modified:
    branches/gcc-4_4-branch/config/ChangeLog
    branches/gcc-4_4-branch/config/override.m4
    branches/gcc-4_4-branch/libjava/ChangeLog
    branches/gcc-4_4-branch/libjava/configure
    branches/gcc-4_4-branch/libjava/configure.ac