Commit 618d4830 by Jack Howarth Committed by Iain Sandoe

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
parent 029e79eb
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> 2010-08-17 Iain Sandoe <iains@gcc.gnu.org>
* include/posix.h: Make substitution of * include/posix.h: Make substitution of
......
...@@ -465,6 +465,9 @@ endif ...@@ -465,6 +465,9 @@ endif
if USING_DARWIN_CRT if USING_DARWIN_CRT
libgcj_la_SOURCES += darwin.cc libgcj_la_SOURCES += darwin.cc
LIBJAVA_LDFLAGS_LIBMATH =
else
LIBJAVA_LDFLAGS_LIBMATH = -lm
endif endif
if USING_POSIX_THREADS if USING_POSIX_THREADS
...@@ -544,7 +547,9 @@ libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \ ...@@ -544,7 +547,9 @@ libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \
-fsource-filename=$(here)/classpath/tools/all-classes.lst -fsource-filename=$(here)/classpath/tools/all-classes.lst
libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \ libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version` \ -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_LIBADD = libgcj.la
libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec \ libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec \
$(libgcj_tools_la_version_dep) $(libgcj_tools_la_version_dep)
......
...@@ -1051,6 +1051,8 @@ libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc link.cc \ ...@@ -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) \ $(nat_source_files) $(am__append_11) $(am__append_12) \
$(am__append_13) $(am__append_14) $(am__append_15) \ $(am__append_13) $(am__append_14) $(am__append_15) \
$(am__append_16) $(am__append_17) $(am__append_18) $(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) nat_files = $(nat_source_files:.cc=.lo)
xlib_nat_files = $(xlib_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 \ ...@@ -1101,7 +1103,8 @@ libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \
libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \ libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version` \ -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_LIBADD = libgcj.la
libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec \ libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec \
......
...@@ -20725,6 +20725,10 @@ case "$THREADS" in ...@@ -20725,6 +20725,10 @@ case "$THREADS" in
THREADLIBS='-lpthread -lthread' THREADLIBS='-lpthread -lthread'
THREADSPEC='-lpthread -lthread' THREADSPEC='-lpthread -lthread'
;; ;;
*-*-darwin*)
# Don't set THREADLIBS or THREADSPEC as Darwin already
# provides pthread via libSystem.
;;
*) *)
THREADLIBS=-lpthread THREADLIBS=-lpthread
THREADSPEC=-lpthread THREADSPEC=-lpthread
...@@ -23102,6 +23106,8 @@ fi ...@@ -23102,6 +23106,8 @@ fi
# libgcj.spec is used, so override here # libgcj.spec is used, so override here
SYSTEMSPEC="$SYSTEMSPEC %{!mabi=64:-ldl}" SYSTEMSPEC="$SYSTEMSPEC %{!mabi=64:-ldl}"
;; ;;
*-*-darwin*)
;;
*) *)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldl" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldl" >&5
$as_echo_n "checking for main in -ldl... " >&6; } $as_echo_n "checking for main in -ldl... " >&6; }
......
...@@ -1077,6 +1077,10 @@ case "$THREADS" in ...@@ -1077,6 +1077,10 @@ case "$THREADS" in
THREADLIBS='-lpthread -lthread' THREADLIBS='-lpthread -lthread'
THREADSPEC='-lpthread -lthread' THREADSPEC='-lpthread -lthread'
;; ;;
*-*-darwin*)
# Don't set THREADLIBS or THREADSPEC as Darwin already
# provides pthread via libSystem.
;;
*) *)
THREADLIBS=-lpthread THREADLIBS=-lpthread
THREADSPEC=-lpthread THREADSPEC=-lpthread
...@@ -1445,6 +1449,8 @@ else ...@@ -1445,6 +1449,8 @@ else
# libgcj.spec is used, so override here # libgcj.spec is used, so override here
SYSTEMSPEC="$SYSTEMSPEC %{!mabi=64:-ldl}" SYSTEMSPEC="$SYSTEMSPEC %{!mabi=64:-ldl}"
;; ;;
*-*-darwin*)
;;
*) *)
AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl") AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl")
;; ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment