Squelch Java use of HOST_FLOAT_WORDS_BIG_ENDIAN (take two)
Zack Weinberg
zack@codesourcery.com
Sun Mar 23 06:45:00 GMT 2003
"John David Anglin" <dave@hiauly1.hia.nrc.ca> writes:
> /usr/ccs/bin/ld: Unsatisfied symbols:
> frexp (first referenced in java/jcf-dump.o) (code)
> ldexp (first referenced in java/jcf-dump.o) (code)
>
> These two routines are in libm but we don't appear to be linking against it.
Please try this patch.
zw
* configure.in: Check whether it is necessary to link against
libm to use ldexp.
* Makefile.in: Add LDEXP_LIB substitution variable.
* java/Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
===================================================================
Index: configure.in
--- configure.in 21 Mar 2003 17:19:32 -0000 1.654
+++ configure.in 23 Mar 2003 06:34:23 -0000
@@ -752,6 +752,15 @@ GNAT_LIBEXC="$LIBS"
LIBS="$save_LIBS"
AC_SUBST(GNAT_LIBEXC)
+# Some systems put ldexp and frexp in libm instead of libc; assume
+# they're both in the same place. jcf-dump needs them.
+save_LIBS="$LIBS"
+LIBS=
+AC_SEARCH_LIBS(ldexp, m)
+LDEXP_LIB="$LIBS"
+LIBS="$save_LIBS"
+AC_SUBST(LDEXP_LIB)
+
# See if the stage1 system preprocessor understands the ANSI C
# preprocessor stringification operator. (Used by symcat.h.)
AC_C_STRINGIZE
===================================================================
Index: Makefile.in
--- Makefile.in 22 Mar 2003 03:28:32 -0000 1.1025
+++ Makefile.in 23 Mar 2003 06:34:22 -0000
@@ -695,6 +695,9 @@ LIBS = $(INTLLIBS) @LIBS@ $(LIBIBERTY)
# Any system libraries needed just for GNAT.
SYSLIBS = @GNAT_LIBEXC@
+# Libs needed (at present) just for jcf-dump.
+LDEXP_LIB = @LDEXP_LIB@
+
# Likewise, for use in the tools that must run on this machine
# even if we are cross-building GCC.
BUILD_LIBS = $(BUILD_LIBIBERTY)
===================================================================
Index: java/Make-lang.in
--- java/Make-lang.in 20 Mar 2003 03:11:25 -0000 1.105
+++ java/Make-lang.in 23 Mar 2003 06:34:24 -0000
@@ -142,7 +142,8 @@ jv-scan$(exeext): $(JVSCAN_OBJS) $(LIBDE
jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIBDEPS)
rm -f $@
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) $(ZLIB) $(LIBS)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) \
+ $(ZLIB) $(LDEXP_LIB) $(LIBS)
jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS)
rm -f $@
More information about the Gcc-patches
mailing list