aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@albatross.co.nz>2001-02-05 05:46:16 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2001-02-05 05:46:16 +0000
commitca5b1ff89a993a91f7e5fbcc2e4e525f9334f15c (patch)
tree7a59ae9924c07e8d49fffaa39fde785e968d8a99 /gcc/java
parentc4636dd18891a3e24592f399e79d8a4c0539dfc1 (diff)
downloadgcc-ca5b1ff89a993a91f7e5fbcc2e4e525f9334f15c.zip
gcc-ca5b1ff89a993a91f7e5fbcc2e4e525f9334f15c.tar.gz
gcc-ca5b1ff89a993a91f7e5fbcc2e4e525f9334f15c.tar.bz2
Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list of macros used when compiling jvspec.c.
gcc/java: * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list of macros used when compiling jvspec.c. * jvspec.c (lang_specific_driver): Link with the shared libgcc by default. libjava: * libgcj.spec.in: Don't force static libgcc into the executable. * configure.in (FORCELIBGCCSPEC): Removed. From-SVN: r39449
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog7
-rw-r--r--gcc/java/Make-lang.in2
-rw-r--r--gcc/java/jvspec.c19
3 files changed, 26 insertions, 2 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index ad17577..7b22997 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,10 @@
+2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
+
+ * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
+ of macros used when compiling jvspec.c.
+ * jvspec.c (lang_specific_driver): Link with the shared
+ libgcc by default.
+
Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* check-init.c (check_init): Call internal_error instead of fatal.
diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in
index 4c57d9f..74cf36f 100644
--- a/gcc/java/Make-lang.in
+++ b/gcc/java/Make-lang.in
@@ -61,7 +61,7 @@ JAVA_TARGET_INDEPENDENT_BIN_TOOLS = gcjh jv-scan jcf-dump
.PHONY: java
jvspec.o: $(srcdir)/java/jvspec.c system.h $(GCC_H) $(CONFIG_H)
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
$(INCLUDES) $(srcdir)/java/jvspec.c $(OUTPUT_OPTION)
# Create the compiler driver for $(GCJ).
diff --git a/gcc/java/jvspec.c b/gcc/java/jvspec.c
index 6f2c79c..749fd13 100644
--- a/gcc/java/jvspec.c
+++ b/gcc/java/jvspec.c
@@ -1,6 +1,6 @@
/* Specific flags and argument handling of the front-end of the
GNU compiler for the Java(TM) language.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -44,6 +44,9 @@ static char *find_spec_file PARAMS ((const char *));
static const char *main_class_name = NULL;
int lang_specific_extra_outfiles = 0;
+/* True if we should add -shared-libgcc to the command-line. */
+int shared_libgcc = 1;
+
/* Once we have the proper support in jc1 (and gcc.c) working,
set COMBINE_INPUTS to one. This enables combining multiple *.java
and *.class input files to be passed to a single jc1 invocation. */
@@ -305,6 +308,9 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
will_link = 0;
continue;
}
+ else if (strcmp (argv[i], "-static-libgcc") == 0
+ || strcmp (argv[i], "-static") == 0)
+ shared_libgcc = 0;
else
/* Pass other options through. */
continue;
@@ -394,6 +400,14 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
num_args++;
num_args++;
+ /* There's no point adding -shared-libgcc if we don't have a shared
+ libgcc. */
+#ifndef ENABLE_SHARED_LIBGCC
+ shared_libgcc = 0;
+#endif
+
+ num_args += shared_libgcc;
+
arglist = (const char **) xmalloc ((num_args + 1) * sizeof (char *));
for (i = 0, j = 0; i < argc; i++, j++)
@@ -485,6 +499,9 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
arglist[j++] = "NONE";
#endif
}
+
+ if (shared_libgcc)
+ arglist[j++] = "-shared-libgcc";
arglist[j] = NULL;