configure.ac (THREADLIBS): Don't set on Darwin.

2010-08-18  Jack Howarth <howarth@bromo.med.uc.edu>

	    * libjava/configure.ac (THREADLIBS): Don't set on Darwin.
	    (THREADSPEC): Likwise.
	    * libjava/configure: Regenerate.
	    * libjava/Makefile.am: Define LIBJAVA_LDFLAGS_LIBMATH as
	    -lm only if USING_DARWIN_CRT undefined.
	    (libgcj_tools_la_LIBADD): Replace '-lm' with $(LIBJAVA_LDFLAGS_LIBMATH).
	    * libjava/Makefile.in: Regenerate.

From-SVN: r163329
This commit is contained in:
Jack Howarth 2010-08-18 08:51:57 +00:00 committed by Iain Sandoe
parent 029e79eb86
commit 618d48304d
5 changed files with 32 additions and 2 deletions

View File

@ -1,3 +1,13 @@
2010-08-18 Jack Howarth <howarth@bromo.med.uc.edu>
* libjava/configure.ac (THREADLIBS): Don't set on Darwin.
(THREADSPEC): Likwise.
* libjava/configure: Regenerate.
* libjava/Makefile.am: Define LIBJAVA_LDFLAGS_LIBMATH as
-lm only if USING_DARWIN_CRT undefined.
(libgcj_tools_la_LIBADD): Replace '-lm' with $(LIBJAVA_LDFLAGS_LIBMATH).
* libjava/Makefile.in: Regenerate.
2010-08-17 Iain Sandoe <iains@gcc.gnu.org>
* include/posix.h: Make substitution of

View File

@ -465,6 +465,9 @@ endif
if USING_DARWIN_CRT
libgcj_la_SOURCES += darwin.cc
LIBJAVA_LDFLAGS_LIBMATH =
else
LIBJAVA_LDFLAGS_LIBMATH = -lm
endif
if USING_POSIX_THREADS
@ -544,7 +547,9 @@ libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \
-fsource-filename=$(here)/classpath/tools/all-classes.lst
libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version` \
$(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF) -lm
$(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF) \
$(LIBJAVA_LDFLAGS_LIBMATH)
libgcj_tools_la_LIBADD = libgcj.la
libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec \
$(libgcj_tools_la_version_dep)

View File

@ -1051,6 +1051,8 @@ libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc link.cc \
$(nat_source_files) $(am__append_11) $(am__append_12) \
$(am__append_13) $(am__append_14) $(am__append_15) \
$(am__append_16) $(am__append_17) $(am__append_18)
@USING_DARWIN_CRT_FALSE@LIBJAVA_LDFLAGS_LIBMATH = -lm
@USING_DARWIN_CRT_TRUE@LIBJAVA_LDFLAGS_LIBMATH =
nat_files = $(nat_source_files:.cc=.lo)
xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
@ -1101,7 +1103,8 @@ libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \
libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version` \
$(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF) -lm
$(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF) \
$(LIBJAVA_LDFLAGS_LIBMATH)
libgcj_tools_la_LIBADD = libgcj.la
libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec \

6
libjava/configure vendored
View File

@ -20725,6 +20725,10 @@ case "$THREADS" in
THREADLIBS='-lpthread -lthread'
THREADSPEC='-lpthread -lthread'
;;
*-*-darwin*)
# Don't set THREADLIBS or THREADSPEC as Darwin already
# provides pthread via libSystem.
;;
*)
THREADLIBS=-lpthread
THREADSPEC=-lpthread
@ -23102,6 +23106,8 @@ fi
# libgcj.spec is used, so override here
SYSTEMSPEC="$SYSTEMSPEC %{!mabi=64:-ldl}"
;;
*-*-darwin*)
;;
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldl" >&5
$as_echo_n "checking for main in -ldl... " >&6; }

View File

@ -1077,6 +1077,10 @@ case "$THREADS" in
THREADLIBS='-lpthread -lthread'
THREADSPEC='-lpthread -lthread'
;;
*-*-darwin*)
# Don't set THREADLIBS or THREADSPEC as Darwin already
# provides pthread via libSystem.
;;
*)
THREADLIBS=-lpthread
THREADSPEC=-lpthread
@ -1445,6 +1449,8 @@ else
# libgcj.spec is used, so override here
SYSTEMSPEC="$SYSTEMSPEC %{!mabi=64:-ldl}"
;;
*-*-darwin*)
;;
*)
AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl")
;;