re PR libgcj/40860 (regressions in libjava testsuite on arm-linux)

2010-04-19  Andrew Haley  <aph@redhat.com>

	PR libgcj/40860
	* configure.ac: Handle --no-merge-exidx-entries.

From-SVN: r158611
This commit is contained in:
Andrew Haley 2010-04-21 16:34:01 +00:00 committed by Andrew Haley
parent dd6d1ad715
commit 6cf3abb170
3 changed files with 53 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2010-04-19 Andrew Haley <aph@redhat.com>
PR libgcj/40860
* configure.ac: Handle --no-merge-exidx-entries.
2010-04-07 Jakub Jelinek <jakub@redhat.com>
* exception.cc (_Jv_Throw): Avoid set but not used warning.

33
libjava/configure vendored
View File

@ -20520,6 +20520,39 @@ arm*linux*eabi)
;;
esac
# Check for --no-merge-exidx-entries, an ARM-specific linker option.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --no-merge-exidx-entries" >&5
$as_echo_n "checking for --no-merge-exidx-entries... " >&6; }
if test "${libgcj_cv_exidx+set}" = set; then :
$as_echo_n "(cached) " >&6
else
saved_ldflags="$LDFLAGS"
LDFLAGS="${LDFLAGS} -Wl,--no-merge-exidx-entries"
if test x$gcc_no_link = xyes; then
as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(void){ return 0;}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
eval "libgcj_cv_exidx=yes"
else
eval "libgcj_cv_exidx=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS="${saved_ldflags}"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcj_cv_exidx" >&5
$as_echo "$libgcj_cv_exidx" >&6; }
if test "${libgcj_cv_exidx}" = "yes"; then
SYSTEMSPEC="${SYSTEMSPEC} --no-merge-exidx-entries"
extra_ldflags="${extra_ldflags} -Wl,--no-merge-exidx-entries"
fi

View File

@ -927,6 +927,21 @@ arm*linux*eabi)
extra_ldflags_libjava=-liconv
;;
esac
# Check for --no-merge-exidx-entries, an ARM-specific linker option.
AC_CACHE_CHECK([for --no-merge-exidx-entries], [libgcj_cv_exidx],
[saved_ldflags="$LDFLAGS"
LDFLAGS="${LDFLAGS} -Wl,--no-merge-exidx-entries"
AC_LINK_IFELSE([int main(void){ return 0;} ],
[eval "libgcj_cv_exidx=yes"],
[eval "libgcj_cv_exidx=no"])
LDFLAGS="${saved_ldflags}"]
)
if test "${libgcj_cv_exidx}" = "yes"; then
SYSTEMSPEC="${SYSTEMSPEC} --no-merge-exidx-entries"
extra_ldflags="${extra_ldflags} -Wl,--no-merge-exidx-entries"
fi
AC_SUBST(extra_ldflags_libjava)
AC_SUBST(extra_ldflags)
AC_SUBST(LIBSTDCXXSPEC)