diff options
author | Bryce McKinlay <bryce@albatross.co.nz> | 2001-02-05 05:46:16 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2001-02-05 05:46:16 +0000 |
commit | ca5b1ff89a993a91f7e5fbcc2e4e525f9334f15c (patch) | |
tree | 7a59ae9924c07e8d49fffaa39fde785e968d8a99 /gcc/java/jvspec.c | |
parent | c4636dd18891a3e24592f399e79d8a4c0539dfc1 (diff) | |
download | gcc-ca5b1ff89a993a91f7e5fbcc2e4e525f9334f15c.tar.gz |
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/jvspec.c')
-rw-r--r-- | gcc/java/jvspec.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/java/jvspec.c b/gcc/java/jvspec.c index 6f2c79cd42b..749fd133b0b 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; |