summaryrefslogtreecommitdiffstats
path: root/libjava
diff options
context:
space:
mode:
authorgreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-25 00:38:43 +0000
committergreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-25 00:38:43 +0000
commit90dc9267422e12f549bccd0cd84e407d45a6bc19 (patch)
treed5fad0adecf376ff1dbdfe3f240a480ab44643b5 /libjava
parentd2f49aead488254eb7102883f09cb53a10dc08eb (diff)
downloadppe42-gcc-90dc9267422e12f549bccd0cd84e407d45a6bc19.tar.gz
ppe42-gcc-90dc9267422e12f549bccd0cd84e407d45a6bc19.zip
From libjava...
2005-03-24 Anthony Green <green@redhat.com> * gnu/gcj/tools/gcj_dbtool/Main.java: Accept libdir argument with -p option. (usage): Add [LIBDIR] to help output. * gnu/gcj/tools/gcj_dbtool/natMain.cc: New file. * Makefile.am (AM_CXXFLAGS): Define LIBGCJ_DEFAULT_DATABASE_PATH_TAIL. (db_pathtail): New macro. From gcc/java... 2005-03-24 Anthony Green <green@redhat.com> * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to 'gcj-dbtool -p'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97028 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog10
-rw-r--r--libjava/Makefile.am8
-rw-r--r--libjava/Makefile.in16
-rw-r--r--libjava/gnu/gcj/tools/gcj_dbtool/Main.java17
4 files changed, 42 insertions, 9 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 1ab2473eb64..e7de3629373 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,13 @@
+2005-03-24 Anthony Green <green@redhat.com>
+
+ * gnu/gcj/tools/gcj_dbtool/Main.java: Accept libdir argument with
+ -p option.
+ (usage): Add [LIBDIR] to help output.
+ * gnu/gcj/tools/gcj_dbtool/natMain.cc: New file.
+ * Makefile.am (AM_CXXFLAGS): Define
+ LIBGCJ_DEFAULT_DATABASE_PATH_TAIL.
+ (db_pathtail): New macro.
+
2005-03-24 Tom Tromey <tromey@redhat.com>
* gnu/gcj/runtime/BootClassLoader.java (BootClassLoader): Don't
diff --git a/libjava/Makefile.am b/libjava/Makefile.am
index 933926824ce..30513e60268 100644
--- a/libjava/Makefile.am
+++ b/libjava/Makefile.am
@@ -130,6 +130,8 @@ propdir = $(libdir)
dbexecdir = $(libdir)/gcj-$(gcc_version)
## Name of the default .db.
db_name = classmap.db
+## Compiler specific component of the .db file
+db_pathtail = gcj-@gcc_version@/$(db_name)
## For now, only on native systems. FIXME.
if NATIVE
@@ -185,6 +187,7 @@ AM_CXXFLAGS = \
-DBOOT_CLASS_PATH="\"$(jardir)/$(jar_DATA)\"" \
-DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
-DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
+ -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\"" \
-DTOOLEXECLIBDIR="\"$(toolexeclibdir)\""
AM_GCJFLAGS = \
@@ -715,7 +718,7 @@ inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
gnu/java/nio/PipeImpl$$SourceChannelImpl.h \
$(PLATFORM_INNER_NAT_HDRS)
-nat_headers = $(ordinary_nat_headers) $(inner_nat_headers)
+nat_headers = $(ordinary_nat_headers) $(inner_nat_headers) gnu/gcj/tools/gcj_dbtool/Main.h
nat_headers_install = $(ordinary_nat_headers)
xlib_nat_headers = $(xlib_java_source_files:.java=.h)
@@ -1028,7 +1031,8 @@ jv_convert_LDADD = -L$(here)/.libs libgcj.la
## linking this program.
jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
-gcj_dbtool_SOURCES = gnu/gcj/tools/gcj_dbtool/Main.java
+gcj_dbtool_SOURCES = gnu/gcj/tools/gcj_dbtool/Main.java \
+ gnu/gcj/tools/gcj_dbtool/natMain.cc
## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
## need this because we are explicitly using libtool to link using the
## `.la' file.
diff --git a/libjava/Makefile.in b/libjava/Makefile.in
index 508c4d56183..1fc97bb276c 100644
--- a/libjava/Makefile.in
+++ b/libjava/Makefile.in
@@ -4188,7 +4188,8 @@ libjawt_la_OBJECTS = $(am_libjawt_la_OBJECTS)
@GTK_AWT_TRUE@am_libjawt_la_rpath = -rpath $(toolexeclibdir)
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
-am_gcj_dbtool_OBJECTS = gnu/gcj/tools/gcj_dbtool/Main.$(OBJEXT)
+am_gcj_dbtool_OBJECTS = gnu/gcj/tools/gcj_dbtool/Main.$(OBJEXT) \
+ gnu/gcj/tools/gcj_dbtool/natMain.$(OBJEXT)
gcj_dbtool_OBJECTS = $(am_gcj_dbtool_OBJECTS)
am__gen_from_JIS_SOURCES_DIST = gnu/gcj/convert/gen-from-JIS.c \
gnu/gcj/convert/make-trie.c
@@ -4544,6 +4545,7 @@ secdir = $(libdir)/security
propdir = $(libdir)
dbexecdir = $(libdir)/gcj-$(gcc_version)
db_name = classmap.db
+db_pathtail = gcj-@gcc_version@/$(db_name)
@NATIVE_TRUE@dbexec_DATA = $(db_name)
bin_SCRIPTS = addr2name.awk
GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
@@ -4567,6 +4569,7 @@ AM_CXXFLAGS = \
-DBOOT_CLASS_PATH="\"$(jardir)/$(jar_DATA)\"" \
-DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
-DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
+ -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\"" \
-DTOOLEXECLIBDIR="\"$(toolexeclibdir)\""
AM_GCJFLAGS = \
@@ -4813,7 +4816,7 @@ inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
gnu/java/nio/PipeImpl$$SourceChannelImpl.h \
$(PLATFORM_INNER_NAT_HDRS)
-nat_headers = $(ordinary_nat_headers) $(inner_nat_headers)
+nat_headers = $(ordinary_nat_headers) $(inner_nat_headers) gnu/gcj/tools/gcj_dbtool/Main.h
nat_headers_install = $(ordinary_nat_headers)
xlib_nat_headers = $(xlib_java_source_files:.java=.h)
extra_headers = java/lang/Object.h java/lang/Class.h
@@ -4834,7 +4837,9 @@ jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
jv_convert_LINK = $(GCJLINK)
jv_convert_LDADD = -L$(here)/.libs libgcj.la
jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
-gcj_dbtool_SOURCES = gnu/gcj/tools/gcj_dbtool/Main.java
+gcj_dbtool_SOURCES = gnu/gcj/tools/gcj_dbtool/Main.java \
+ gnu/gcj/tools/gcj_dbtool/natMain.cc
+
gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
@@ -14672,6 +14677,9 @@ gnu/gcj/tools/gcj_dbtool/$(DEPDIR)/$(am__dirstamp):
gnu/gcj/tools/gcj_dbtool/Main.$(OBJEXT): \
gnu/gcj/tools/gcj_dbtool/$(am__dirstamp) \
gnu/gcj/tools/gcj_dbtool/$(DEPDIR)/$(am__dirstamp)
+gnu/gcj/tools/gcj_dbtool/natMain.$(OBJEXT): \
+ gnu/gcj/tools/gcj_dbtool/$(am__dirstamp) \
+ gnu/gcj/tools/gcj_dbtool/$(DEPDIR)/$(am__dirstamp)
gcj-dbtool$(EXEEXT): $(gcj_dbtool_OBJECTS) $(gcj_dbtool_DEPENDENCIES)
@rm -f gcj-dbtool$(EXEEXT)
$(gcj_dbtool_LINK) $(gcj_dbtool_LDFLAGS) $(gcj_dbtool_OBJECTS) $(gcj_dbtool_LDADD) $(LIBS)
@@ -14866,6 +14874,7 @@ mostlyclean-compile:
-rm -f gnu/gcj/runtime/natVMClassLoader.$(OBJEXT)
-rm -f gnu/gcj/runtime/natVMClassLoader.lo
-rm -f gnu/gcj/tools/gcj_dbtool/Main.$(OBJEXT)
+ -rm -f gnu/gcj/tools/gcj_dbtool/natMain.$(OBJEXT)
-rm -f gnu/gcj/util/Debug.$(OBJEXT)
-rm -f gnu/gcj/util/Debug.lo
-rm -f gnu/gcj/util/natDebug.$(OBJEXT)
@@ -19826,6 +19835,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/natStringBuffer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/natVMClassLoader.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/tools/gcj_dbtool/$(DEPDIR)/Main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/tools/gcj_dbtool/$(DEPDIR)/natMain.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/util/$(DEPDIR)/Debug.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/util/$(DEPDIR)/natDebug.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/xlib/$(DEPDIR)/Clip.Plo@am__quote@
diff --git a/libjava/gnu/gcj/tools/gcj_dbtool/Main.java b/libjava/gnu/gcj/tools/gcj_dbtool/Main.java
index b4b0329f523..cfd22bd3cc1 100644
--- a/libjava/gnu/gcj/tools/gcj_dbtool/Main.java
+++ b/libjava/gnu/gcj/tools/gcj_dbtool/Main.java
@@ -259,9 +259,16 @@ public class Main
if (s[0].equals("-p"))
{
- insist (s.length == 1);
- String result = System.getProperty("gnu.gcj.precompiled.db.path",
- "");
+ insist (s.length == 1 || s.length == 2);
+ String result;
+
+ if (s.length == 1)
+ result = System.getProperty("gnu.gcj.precompiled.db.path", "");
+ else
+ result = (s[1]
+ + (s[1].endsWith(File.separator) ? "" : File.separator)
+ + getDbPathTail ());
+
System.out.println (result);
return;
}
@@ -270,6 +277,8 @@ public class Main
System.exit(1);
}
+ private static native String getDbPathTail ();
+
private static void insist(boolean ok)
{
if (! ok)
@@ -296,7 +305,7 @@ public class Main
+ " - Merge gcj map databases into dest\n"
+ " Replaces dest\n"
+ " To add to dest, include dest in the list of sources\n"
- + " gcj-dbtool -p - Print default database name");
+ + " gcj-dbtool -p [LIBDIR] - Print default database name");
}
// Add a jar to a map. This copies the map first and returns a
OpenPOWER on IntegriCloud