Commit 00368bdd by Tom Tromey Committed by Tom Tromey

jvspec.c (lang_specific_driver): Use libgcj, not libjava.

	* jvspec.c (lang_specific_driver): Use libgcj, not libjava.
	* Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
	(libgcj_zip): Renamed.
	* jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
	LIBJAVA_ZIP_FILE.
	(jcf_path_init): Use LIBGCJ_ZIP_FILE.

From-SVN: r25136
parent 0ffe9eea
1999-02-10 Tom Tromey <tromey@cygnus.com> 1999-02-10 Tom Tromey <tromey@cygnus.com>
* jvspec.c (lang_specific_driver): Use libgcj, not libjava.
* Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
(libgcj_zip): Renamed.
* jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
LIBJAVA_ZIP_FILE.
(jcf_path_init): Use LIBGCJ_ZIP_FILE.
* jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop. * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
(GC_NAME): Renamed -lgc to -lgcjgc. (GC_NAME): Renamed -lgc to -lgcjgc.
......
...@@ -99,10 +99,10 @@ objdir = . ...@@ -99,10 +99,10 @@ objdir = .
srcdir = @srcdir@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
# Directory holding libjava.zip. # Directory holding libgcj.zip.
prefix = @prefix@ prefix = @prefix@
datadir = @datadir@ datadir = @datadir@
libjava_zip = $(datadir)/libjava.zip libgcj_zip = $(datadir)/libgcj.zip
# Additional system libraries to link with. # Additional system libraries to link with.
CLIB= CLIB=
...@@ -252,7 +252,7 @@ keyword.h: keyword.gperf ...@@ -252,7 +252,7 @@ keyword.h: keyword.gperf
jcf-path.o : jcf-path.c $(CONFIG_H) $(srcdir)/../system.h jcf.h jcf-path.o : jcf-path.c $(CONFIG_H) $(srcdir)/../system.h jcf.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DLIBJAVA_ZIP_FILE='"$(libjava_zip)"' $(srcdir)/jcf-path.c -DLIBGCJ_ZIP_FILE='"$(libgcj_zip)"' $(srcdir)/jcf-path.c
# These exist for maintenance purposes. # These exist for maintenance purposes.
......
/* Handle CLASSPATH, -classpath, and path searching. /* Handle CLASSPATH, -classpath, and path searching.
Copyright (C) 1998 Free Software Foundation, Inc. Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -60,7 +60,7 @@ struct entry ...@@ -60,7 +60,7 @@ struct entry
/* We support several different ways to set the class path. /* We support several different ways to set the class path.
built-in system directory (only libjava.zip) built-in system directory (only libgcj.zip)
CLASSPATH environment variable CLASSPATH environment variable
-CLASSPATH overrides CLASSPATH -CLASSPATH overrides CLASSPATH
-classpath option - overrides CLASSPATH, -CLASSPATH, and built-in -classpath option - overrides CLASSPATH, -CLASSPATH, and built-in
...@@ -146,10 +146,10 @@ add_entry (entp, filename, is_system) ...@@ -146,10 +146,10 @@ add_entry (entp, filename, is_system)
{ {
n->flags |= FLAG_ZIP; n->flags |= FLAG_ZIP;
/* If the user uses -classpath then he'll have to include /* If the user uses -classpath then he'll have to include
libjava.zip in the value. We check for this in a simplistic libgcj.zip in the value. We check for this in a simplistic
way. Symlinks will fool this test. This is only used for way. Symlinks will fool this test. This is only used for
-MM and -MMD, so it probably isn't terribly important. */ -MM and -MMD, so it probably isn't terribly important. */
if (! strcmp (filename, LIBJAVA_ZIP_FILE)) if (! strcmp (filename, LIBGCJ_ZIP_FILE))
n->flags |= FLAG_SYSTEM; n->flags |= FLAG_SYSTEM;
} }
...@@ -220,7 +220,7 @@ jcf_path_init () ...@@ -220,7 +220,7 @@ jcf_path_init ()
char *cp; char *cp;
add_entry (&sys_dirs, ".", 0); add_entry (&sys_dirs, ".", 0);
add_entry (&sys_dirs, LIBJAVA_ZIP_FILE, 1); add_entry (&sys_dirs, LIBGCJ_ZIP_FILE, 1);
GET_ENV_PATH_LIST (cp, "CLASSPATH"); GET_ENV_PATH_LIST (cp, "CLASSPATH");
add_path (&classpath_env, cp, 0); add_path (&classpath_env, cp, 0);
......
/* Specific flags and argument handling of the front-end of the /* Specific flags and argument handling of the front-end of the
GNU compiler for the Java(TM) language. GNU compiler for the Java(TM) language.
Copyright (C) 1996, 97-98, 1999 Free Software Foundation, Inc. Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -61,7 +61,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ ...@@ -61,7 +61,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#define MATH_LIBRARY "-lm" #define MATH_LIBRARY "-lm"
#endif #endif
extern GENERIC_PTR xmalloc PROTO((size_t)); extern char *xmalloc PROTO((size_t));
extern int do_spec PROTO((char *)); extern int do_spec PROTO((char *));
extern char *input_filename; extern char *input_filename;
extern size_t input_filename_length; extern size_t input_filename_length;
...@@ -98,7 +98,7 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries) ...@@ -98,7 +98,7 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
int saw_verbose_flag = 0; int saw_verbose_flag = 0;
/* This will be 0 if we encounter a situation where we should not /* This will be 0 if we encounter a situation where we should not
link in libjava. */ link in libgcj. */
int library = 1; int library = 1;
#if COMBINE_INPUTS #if COMBINE_INPUTS
...@@ -154,8 +154,8 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries) ...@@ -154,8 +154,8 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
/* Saw `-l' option for the thread library. */ /* Saw `-l' option for the thread library. */
char *saw_threadlib = 0; char *saw_threadlib = 0;
/* Saw `-ljava' on command line. */ /* Saw `-lgcj' on command line. */
int saw_libjava = 0; int saw_libgcj = 0;
/* Saw -C or -o option, respectively. */ /* Saw -C or -o option, respectively. */
int saw_C = 0; int saw_C = 0;
...@@ -238,8 +238,8 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries) ...@@ -238,8 +238,8 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
main_class_name = argv[i] + 7; main_class_name = argv[i] + 7;
added--; added--;
} }
else if (strcmp (argv[i], "-ljava") == 0) else if (strcmp (argv[i], "-lgcj") == 0)
saw_libjava = 1; saw_libgcj = 1;
else if (strcmp (argv[i], "-lc") == 0) else if (strcmp (argv[i], "-lc") == 0)
args[i] |= WITHLIBC; args[i] |= WITHLIBC;
#ifdef GC_NAME #ifdef GC_NAME
...@@ -262,7 +262,7 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries) ...@@ -262,7 +262,7 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
if (argc == 2) if (argc == 2)
{ {
/* If they only gave us `-v', don't try to link /* If they only gave us `-v', don't try to link
in libjava. */ in libgcj. */
library = 0; library = 0;
} }
} }
...@@ -438,7 +438,7 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries) ...@@ -438,7 +438,7 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
continue; continue;
} }
/* Make sure -ljava is before the math library, since libjava /* Make sure -lgcj is before the math library, since libgcj
itself uses those math routines. */ itself uses those math routines. */
if (!saw_math && (args[i] & MATHLIB) && library) if (!saw_math && (args[i] & MATHLIB) && library)
{ {
...@@ -446,21 +446,21 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries) ...@@ -446,21 +446,21 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
saw_math = argv[i]; saw_math = argv[i];
} }
/* Likewise -ljava must come before -lc. */ /* Likewise -lgcj must come before -lc. */
if (!saw_libc && (args[i] & WITHLIBC) && library) if (!saw_libc && (args[i] & WITHLIBC) && library)
{ {
--j; --j;
saw_libc = argv[i]; saw_libc = argv[i];
} }
/* And -ljava must come before -lgcjgc. */ /* And -lgcj must come before -lgcjgc. */
if (!saw_gc && (args[i] & GCLIB) && library) if (!saw_gc && (args[i] & GCLIB) && library)
{ {
--j; --j;
saw_gc = argv[i]; saw_gc = argv[i];
} }
/* And -ljava must come before thread library. */ /* And -lgcj must come before thread library. */
if (!saw_threadlib && (args[i] & THREADLIB) && library) if (!saw_threadlib && (args[i] & THREADLIB) && library)
{ {
--j; --j;
...@@ -501,10 +501,10 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries) ...@@ -501,10 +501,10 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
if (saw_g + saw_O == 0) if (saw_g + saw_O == 0)
arglist[j++] = "-g1"; arglist[j++] = "-g1";
/* Add `-ljava' if we haven't already done so. */ /* Add `-lgcj' if we haven't already done so. */
if (library && ! saw_libjava) if (library && ! saw_libgcj)
{ {
arglist[j++] = "-ljava"; arglist[j++] = "-lgcj";
added_libraries++; added_libraries++;
} }
...@@ -527,7 +527,7 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries) ...@@ -527,7 +527,7 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
#endif #endif
/* Thread library must come after GC library as well as after /* Thread library must come after GC library as well as after
-ljava. */ -lgcj. */
if (saw_threadlib) if (saw_threadlib)
arglist[j++] = saw_threadlib; arglist[j++] = saw_threadlib;
#ifdef THREAD_NAME #ifdef THREAD_NAME
......
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