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?
Paolo, do you happen to have an idea how to handle this cleanly?
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?
(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.
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
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.
The patch needs a fat comment saying what's going on, then it should be okay.
Mine.
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
Fixed for 4.6.0.
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
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