===================================================================
@@ -928,6 +928,16 @@
;;
esac
+LIBMATHSPEC=
+# extra LD Flags which are required for targets
+case "${host}" in
+*-*-darwin*)
+ ;;
+*)
+ LIBMATHSPEC=-lm
+ ;;
+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"
@@ -953,6 +963,7 @@
AC_SUBST(extra_ldflags_libjava)
AC_SUBST(extra_ldflags)
AC_SUBST(LIBSTDCXXSPEC)
+AC_SUBST(LIBMATHSPEC)
AC_SUBST(LIBGCJTESTSPEC)
===================================================================
@@ -7,6 +7,6 @@
*startfile: @THREADSTARTFILESPEC@ %(startfileorig)
%rename lib liborig
-*lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ -lm @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) @LIBSTDCXXSPEC@ %(liborig)
+*lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ @LIBMATHSPEC@ @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) @LIBSTDCXXSPEC@ %(liborig)
*jc1: @HASH_SYNC_SPEC@ @DIVIDESPEC@ @CHECKREFSPEC@ @JC1GCSPEC@ @EXCEPTIONSPEC@ @BACKTRACESPEC@ @IEEESPEC@ @ATOMICSPEC@ @LIBGCJ_BC_SPEC@ -fkeep-inline-functions