This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

[build, libjava] Ignore IRIX 6.5 ld warning for --no-merge-exidx-entries (PR libgcj/44216)


Currently, the whole libjava testsuite fails on IRIX 6.5: the vendor
linker doesn't recognize --no-merge-exidx-entries, but warns about the
unknown option with no way to turn the warning into an error.  To work
around this, I'm turning on AC_LANG_WERROR for the
--no-merge-exidx-entries configure test, which fixes the problem.
Unfortunately, as of autoconf 2.64 there's no documented way to turn
AC_LANG_WERROR off again, so I'm using a code snippet from AC_PATH_XTRA
to do so.

Bootstrapped on mips-sgi-irix6.5, approved by Paolo in the PR,
installed.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


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.

diff -r 858ad6f08680 libjava/configure.ac
--- a/libjava/configure.ac	Thu May 20 19:48:05 2010 +0200
+++ b/libjava/configure.ac	Tue May 25 18:45:55 2010 +0200
@@ -932,9 +932,17 @@
 AC_CACHE_CHECK([for --no-merge-exidx-entries], [libgcj_cv_exidx],
   [saved_ldflags="$LDFLAGS"
    LDFLAGS="${LDFLAGS} -Wl,--no-merge-exidx-entries"
+   # The IRIX 6 ld doesn't recognize --no-merge-exidx-entries, but only
+   # warns about unknown options, which breaks the testsuite.  So enable
+   # AC_LANG_WERROR, but there's currently (autoconf 2.64) no way to turn
+   # it off again.  As a workaround, save and restore werror flag like
+   # AC_PATH_XTRA.
+   ac_xsave_[]_AC_LANG_ABBREV[]_werror_flag=$ac_[]_AC_LANG_ABBREV[]_werror_flag
+   AC_LANG_WERROR
    AC_LINK_IFELSE([int main(void){ return 0;} ],
 		      [eval "libgcj_cv_exidx=yes"],
 		      [eval "libgcj_cv_exidx=no"])
+   ac_[]_AC_LANG_ABBREV[]_werror_flag=$ac_xsave_[]_AC_LANG_ABBREV[]_werror_flag
    LDFLAGS="${saved_ldflags}"]
 )
 if test "${libgcj_cv_exidx}" = "yes"; then


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