Commit 7013e7cd by Anthony Green Committed by Anthony Green

libgcjdata.c: New file.

1999-12-19  Anthony Green  <green@cygnus.com>

        * libgcjdata.c: New file.
        * libgcj.spec.in: Use @LIBDATASTARTSPEC@ in startfile.
        * configure: Rebuilt.
        * configure.in (LIBDATASTARTSPEC): Force data with a known name
        into the program.
        * Makefile.in: Rebuilt.
        * Makefile.am: Build libgcjdata.a.

        * libgcj.spec.in: Use @FORCELIBGCCSPEC@ in startfile.
        * configure: Rebuilt.
        * configure.in (FORCELIBGCCSPEC): Force important parts of libgcc
        into every program.

From-SVN: r31027
parent ecf3151a
1999-12-19 Anthony Green <green@cygnus.com>
* libgcjdata.c: New file.
* libgcj.spec.in: Use @LIBDATASTARTSPEC@ in startfile.
* configure: Rebuilt.
* configure.in (LIBDATASTARTSPEC): Force data with a known name
into the program.
* Makefile.in: Rebuilt.
* Makefile.am: Build libgcjdata.a.
* libgcj.spec.in: Use @FORCELIBGCCSPEC@ in startfile.
* configure: Rebuilt.
* configure.in (FORCELIBGCCSPEC): Force important parts of libgcc
into every program.
1999-12-17 Tom Tromey <tromey@cygnus.com>
* java/lang/reflect/Method.java (toString): Call getType if
......
......@@ -27,6 +27,11 @@ toolexeclib_LTLIBRARIES = libgcj.la
toolexeclib_DATA = libgcj.spec
data_DATA = libgcj.zip
if NEEDS_DATA_START
toolexeclib_LIBRARIES = libgcjdata.a
libgcjdata_a_SOURCES = libgcjdata.c
endif
## For now, only on native systems. FIXME.
if NATIVE
bin_PROGRAMS = jv-convert gij
......
......@@ -78,6 +78,22 @@ if test "$libgcj_sjlj" = yes; then
AC_DEFINE(SJLJ_EXCEPTIONS)
fi
FORCELIBGCCSPEC=
dnl Work around libgcc design flaw.
if test "$ac_cv_prog_gnu_ld" = yes; then
FORCELIBGCCSPEC="-u __rethrow -lgcc"
fi
AC_MSG_CHECKING([for data_start])
LIBDATASTARTSPEC=
NEEDS_DATA_START=
AC_TRY_LINK([extern int data_start;], [return ((int) &data_start);],
[AC_MSG_RESULT(found it)],
[LIBDATASTARTSPEC="-lgcjdata"
NEEDS_DATA_START=yes
AC_MSG_RESULT(missing)])
AC_SUBST(LIBDATASTARTSPEC)
dnl See if the user wants to disable java.net. This is the mildly
dnl ugly way that we admit that target-side configuration sucks.
AC_ARG_ENABLE(java-net,
......@@ -538,11 +554,13 @@ AC_SUBST(ZDEPS)
AC_SUBST(ZINCS)
AC_SUBST(DIVIDESPEC)
AC_SUBST(EXCEPTIONSPEC)
AC_SUBST(FORCELIBGCCSPEC)
AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
AM_CONDITIONAL(NULL_TARGET, test "$NULL_TARGET" = yes)
AM_CONDITIONAL(NATIVE, test "$NATIVE" = yes || test "$NULL_TARGET" = yes)
AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
AM_CONDITIONAL(NEEDS_DATA_START, test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes)
AC_SUBST(EH_COMMON_INCLUDE)
# Determine gcj version number.
......
......@@ -8,3 +8,11 @@
*jc1: @DIVIDESPEC@ @EXCEPTIONSPEC@
#
# libgcc should really be a shared library. This is a design flaw
# that causes no end of mysterious problems. If we are using the
# GNU linker, force parts of libgcc into the program file rather
# than picking bits up from various shared libraries.
#
%rename startfile startfileorig
*startfile: %(startfileorig) @LIBDATASTARTSPEC@ @FORCELIBGCCSPEC@
/* Copyright (C) 1998, 1999 Cygnus Solutions
This file is part of libgcj.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
/* Some systems need data_start defined so the GC be built as a shared
library. */
int data_start = 0;
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