summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2001-04-12 09:32:50 +0000
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2001-04-12 09:32:50 +0000
commitdb6ca0af3c4b4acb55303e3c5e23aa141d7a3711 (patch)
tree127d25971ad8807e7f3fe74108e3b8b1196b86e0
parentfce49af15699413e11762a9da82e3ba4a4c89c07 (diff)
downloadgcc-db6ca0af3c4b4acb55303e3c5e23aa141d7a3711.tar.gz
libffi:
* Makefile.am: Make a libtool convenience library. * Makefile.in: Rebuilt. libjava: * java/io/File.java (normalizePath): New private method. (File (String)): Use normalizePath(). (File (String, String)): Likewise. * Makefile.am (libffi_files): Removed. (libgcj.la): Link libffi as a convenience library instead of refering to its object files directly. * Makefile.in: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41298 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libffi/ChangeLog5
-rw-r--r--libffi/Makefile.am11
-rw-r--r--libffi/Makefile.in86
-rw-r--r--libjava/ChangeLog11
-rw-r--r--libjava/Makefile.am18
-rw-r--r--libjava/Makefile.in73
-rw-r--r--libjava/java/io/File.java61
7 files changed, 191 insertions, 74 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 00cd4b9bf6b..e6d5cc1a95b 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-12 Bryce McKinlay <bryce@albatross.co.nz>
+
+ * Makefile.am: Make a libtool convenience library.
+ * Makefile.in: Rebuilt.
+
2001-03-29 Bryce McKinlay <bryce@albatross.co.nz>
* configure.in: Use different syntax for subdirectory creation.
diff --git a/libffi/Makefile.am b/libffi/Makefile.am
index b96cb352011..ad55c5eb64d 100644
--- a/libffi/Makefile.am
+++ b/libffi/Makefile.am
@@ -80,6 +80,7 @@ toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
endif
toolexeclib_LTLIBRARIES = libffi.la
+noinst_LTLIBRARIES = libfficonvenience.la
noinst_PROGRAMS = ffitest
@@ -104,33 +105,43 @@ libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
src/raw_api.c src/java_raw_api.c
if MIPS_GCC
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
+libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
endif
if MIPS_SGI
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
+libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
endif
if X86
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
+libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
endif
if X86_WIN32
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
+libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
endif
if SPARC
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
+libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
endif
if ALPHA
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
+libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
endif
if IA64
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
+libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
endif
if M68K
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
+libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
endif
if POWERPC
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
+libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
endif
if ARM
libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
+libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
endif
AM_CFLAGS = -fexceptions
diff --git a/libffi/Makefile.in b/libffi/Makefile.in
index 242acc5fe51..372be2b90c1 100644
--- a/libffi/Makefile.in
+++ b/libffi/Makefile.in
@@ -151,6 +151,7 @@ MULTICLEAN = true
@USE_LIBDIR_FALSE@toolexecdir = @USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
toolexeclib_LTLIBRARIES = libffi.la
+noinst_LTLIBRARIES = libfficonvenience.la
noinst_PROGRAMS = ffitest
@@ -182,6 +183,16 @@ libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
@M68K_TRUE@libffi_la_SOURCES = @M68K_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
@POWERPC_TRUE@libffi_la_SOURCES = @POWERPC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
@ARM_TRUE@libffi_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
+@MIPS_GCC_TRUE@libfficonvenience_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
+@MIPS_SGI_TRUE@libfficonvenience_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
+@X86_TRUE@libfficonvenience_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
+@X86_WIN32_TRUE@libfficonvenience_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
+@SPARC_TRUE@libfficonvenience_la_SOURCES = @SPARC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
+@ALPHA_TRUE@libfficonvenience_la_SOURCES = @ALPHA_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
+@IA64_TRUE@libfficonvenience_la_SOURCES = @IA64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
+@M68K_TRUE@libfficonvenience_la_SOURCES = @M68K_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
+@POWERPC_TRUE@libfficonvenience_la_SOURCES = @POWERPC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
+@ARM_TRUE@libfficonvenience_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
AM_CFLAGS = -fexceptions
@@ -192,13 +203,48 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = fficonfig.h
CONFIG_CLEAN_FILES =
-LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
+LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir) -I.
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
+libfficonvenience_la_LDFLAGS =
+libfficonvenience_la_LIBADD =
+@SPARC_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
+@SPARC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
+@SPARC_TRUE@src/sparc/ffi.lo src/sparc/v8.lo src/sparc/v9.lo
+@MIPS_SGI_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo \
+@MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
+@MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
+@MIPS_SGI_TRUE@src/mips/n32.lo
+@IA64_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
+@IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
+@IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo
+@MIPS_GCC_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo \
+@MIPS_GCC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
+@MIPS_GCC_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
+@MIPS_GCC_TRUE@src/mips/n32.lo
+@M68K_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
+@M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
+@M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
+@ALPHA_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
+@ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
+@ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo
+@X86_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
+@X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
+@X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo
+@ARM_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
+@ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
+@ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo
+@POWERPC_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo \
+@POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
+@POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \
+@POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo
+@X86_WIN32_TRUE@libfficonvenience_la_OBJECTS = src/debug.lo \
+@X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
+@X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo
libffi_la_LIBADD =
@SPARC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
@SPARC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
@@ -250,8 +296,8 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
-SOURCES = $(libffi_la_SOURCES) $(ffitest_SOURCES)
-OBJECTS = $(libffi_la_OBJECTS) $(ffitest_OBJECTS)
+SOURCES = $(libfficonvenience_la_SOURCES) $(libffi_la_SOURCES) $(ffitest_SOURCES)
+OBJECTS = $(libfficonvenience_la_OBJECTS) $(libffi_la_OBJECTS) $(ffitest_OBJECTS)
all: all-redirect
.SUFFIXES:
@@ -299,6 +345,15 @@ distclean-hdr:
maintainer-clean-hdr:
+mostlyclean-noinstLTLIBRARIES:
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+
+distclean-noinstLTLIBRARIES:
+
+maintainer-clean-noinstLTLIBRARIES:
+
mostlyclean-toolexeclibLTLIBRARIES:
clean-toolexeclibLTLIBRARIES:
@@ -350,6 +405,9 @@ distclean-libtool:
maintainer-clean-libtool:
+libfficonvenience.la: $(libfficonvenience_la_OBJECTS) $(libfficonvenience_la_DEPENDENCIES)
+ $(LINK) $(libfficonvenience_la_LDFLAGS) $(libfficonvenience_la_OBJECTS) $(libfficonvenience_la_LIBADD) $(LIBS)
+
libffi.la: $(libffi_la_OBJECTS) $(libffi_la_DEPENDENCIES)
$(LINK) -rpath $(toolexeclibdir) $(libffi_la_LDFLAGS) $(libffi_la_OBJECTS) $(libffi_la_LIBADD) $(LIBS)
@@ -559,29 +617,31 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-mostlyclean-am: mostlyclean-hdr mostlyclean-toolexeclibLTLIBRARIES \
- mostlyclean-compile mostlyclean-libtool \
- mostlyclean-noinstPROGRAMS mostlyclean-tags \
- mostlyclean-generic
+mostlyclean-am: mostlyclean-hdr mostlyclean-noinstLTLIBRARIES \
+ mostlyclean-toolexeclibLTLIBRARIES mostlyclean-compile \
+ mostlyclean-libtool mostlyclean-noinstPROGRAMS \
+ mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-recursive
-clean-am: clean-hdr clean-toolexeclibLTLIBRARIES clean-compile \
+clean-am: clean-hdr clean-noinstLTLIBRARIES \
+ clean-toolexeclibLTLIBRARIES clean-compile \
clean-libtool clean-noinstPROGRAMS clean-tags \
clean-generic mostlyclean-am
clean: clean-recursive
-distclean-am: distclean-hdr distclean-toolexeclibLTLIBRARIES \
- distclean-compile distclean-libtool \
- distclean-noinstPROGRAMS distclean-tags \
- distclean-generic clean-am
+distclean-am: distclean-hdr distclean-noinstLTLIBRARIES \
+ distclean-toolexeclibLTLIBRARIES distclean-compile \
+ distclean-libtool distclean-noinstPROGRAMS \
+ distclean-tags distclean-generic clean-am
-rm -f libtool
distclean: distclean-recursive
-rm -f config.status
maintainer-clean-am: maintainer-clean-hdr \
+ maintainer-clean-noinstLTLIBRARIES \
maintainer-clean-toolexeclibLTLIBRARIES \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-noinstPROGRAMS maintainer-clean-tags \
@@ -593,6 +653,8 @@ maintainer-clean: maintainer-clean-recursive
-rm -f config.status
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \
+clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \
mostlyclean-toolexeclibLTLIBRARIES distclean-toolexeclibLTLIBRARIES \
clean-toolexeclibLTLIBRARIES maintainer-clean-toolexeclibLTLIBRARIES \
uninstall-toolexeclibLTLIBRARIES install-toolexeclibLTLIBRARIES \
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 3d2ae9dc035..02c1acb9c2b 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,14 @@
+2001-04-12 Bryce McKinlay <bryce@albatross.co.nz>
+
+ * java/io/File.java (normalizePath): New private method.
+ (File (String)): Use normalizePath().
+ (File (String, String)): Likewise.
+
+ * Makefile.am (libffi_files): Removed.
+ (libgcj.la): Link libffi as a convenience library instead of
+ refering to its object files directly.
+ * Makefile.in: Rebuilt.
+
2001-04-08 Per Bothner <per@bothner.com>
* java/lang/natString.cc (_Jv_NewStringUtf8Const): Register finalizer.
diff --git a/libjava/Makefile.am b/libjava/Makefile.am
index d89d65697e5..c6d7ca28b11 100644
--- a/libjava/Makefile.am
+++ b/libjava/Makefile.am
@@ -128,9 +128,6 @@ javao_files = $(java_source_files:.java=.lo) \
$(built_java_source_files:.java=.lo)
x_javao_files = $(x_java_source_files:.java=.lo)
-## Extract the libffi object file names.
-libffi_files = `find ../libffi/ \-name '*.lo'`
-
libgcj_la_SOURCES = prims.cc posix.cc jni.cc exception.cc \
resolve.cc defineclass.cc interpret.cc name-finder.cc \
$(nat_source_files)
@@ -140,11 +137,10 @@ libgcj_la_DEPENDENCIES = libgcj.jar $(javao_files) \
$(c_files) $(GCOBJS) $(THREADOBJS) $(LIBLTDL)
libgcj_la_LIBADD = $(javao_files) $(c_files) $(GCOBJS) \
- $(THREADOBJS) $(libffi_files)
+ $(THREADOBJS)
# Include THREADLIBS here to ensure that the correct version of
# certain linuxthread functions get linked:
-libgcj_la_LDFLAGS = -L$(here)/../libstdc++-v3/libsupc++ -lsupc++ \
- -rpath $(toolexeclibdir) $(THREADLIBS) $(LIBLTDL) \
+libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLIBS) $(LIBLTDL) \
## The mysterious backslash is consumed by make.
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
libgcj_la_LINK = $(LIBLINK)
@@ -154,7 +150,6 @@ EXTRA_libgcjx_la_SOURCES = $(x_java_source_files)
libgcjx_la_DEPENDENCIES = libgcj.jar $(x_javao_files)
libgcjx_la_LIBADD = $(x_javao_files)
libgcjx_la_LDFLAGS = @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
- -L$(here)/../libstdc++-v3/libsupc++ -lsupc++ \
-rpath $(toolexeclibdir) \
## The mysterious backslash is consumed by make.
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
@@ -264,13 +259,16 @@ $(javao_files) $(x_javao_files): %.lo: %.java
libgcj.la: $(libgcj_la_OBJECTS) $(libgcj_la_DEPENDENCIES)
@echo $(libgcj_la_OBJECTS) > libgcj.objectlist;
@echo $(libgcj_la_LIBADD) >> libgcj.objectlist;
- $(libgcj_la_LINK) -objectlist libgcj.objectlist -rpath $(toolexeclibdir) $(libgcj_la_LDFLAGS) $(LIBS)
+ $(libgcj_la_LINK) -objectlist libgcj.objectlist \
+ ../libstdc++-v3/libsupc++/libsupc++convenience.la \
+ ../libffi/libfficonvenience.la \
+ -rpath $(toolexeclibdir) $(libgcj_la_LDFLAGS) $(LIBS)
libgcjx.la: $(libgcjx_la_OBJECTS) $(libgcjx_la_DEPENDENCIES)
@echo $(libgcjx_la_OBJECTS) > libgcjx.objectlist;
@echo $(libgcjx_la_LIBADD) >> libgcjx.objectlist;
- $(libgcjx_la_LINK) -objectlist libgcjx.objectlist -rpath $(toolexeclibdir) $(libgcjx_la_LDFLAGS) $(LIBS)
-
+ $(libgcjx_la_LINK) -objectlist libgcjx.objectlist \
+ -rpath $(toolexeclibdir) $(libgcjx_la_LDFLAGS) $(LIBS)
## ################################################################
diff --git a/libjava/Makefile.in b/libjava/Makefile.in
index a8536824e4c..5f237d81e7c 100644
--- a/libjava/Makefile.in
+++ b/libjava/Makefile.in
@@ -119,43 +119,29 @@ here = @here@
libgcj_basedir = @libgcj_basedir@
AUTOMAKE_OPTIONS = foreign
-@TESTSUBDIR_TRUE@SUBDIRS = \
-@TESTSUBDIR_TRUE@$(DIRLTDL) testsuite gcj include
-@TESTSUBDIR_FALSE@SUBDIRS = \
-@TESTSUBDIR_FALSE@$(DIRLTDL) gcj include
-@USE_LIBDIR_TRUE@toolexeclibdir = \
-@USE_LIBDIR_TRUE@$(libdir)$(MULTISUBDIR)
-@USE_LIBDIR_FALSE@toolexeclibdir = \
-@USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
-@USE_LIBDIR_FALSE@toolexecdir = \
-@USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
-@XLIB_AWT_TRUE@cond_x_ltlibrary = \
-@XLIB_AWT_TRUE@libgcjx.la
-@XLIB_AWT_FALSE@cond_x_ltlibrary = \
+@TESTSUBDIR_TRUE@SUBDIRS = @TESTSUBDIR_TRUE@$(DIRLTDL) testsuite gcj include
+@TESTSUBDIR_FALSE@SUBDIRS = @TESTSUBDIR_FALSE@$(DIRLTDL) gcj include
+@USE_LIBDIR_TRUE@toolexeclibdir = @USE_LIBDIR_TRUE@$(libdir)$(MULTISUBDIR)
+@USE_LIBDIR_FALSE@toolexeclibdir = @USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
+@USE_LIBDIR_FALSE@toolexecdir = @USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
+@XLIB_AWT_TRUE@cond_x_ltlibrary = @XLIB_AWT_TRUE@libgcjx.la
+@XLIB_AWT_FALSE@cond_x_ltlibrary =
toolexeclib_LTLIBRARIES = libgcj.la $(cond_x_ltlibrary)
toolexeclib_DATA = libgcj.spec
data_DATA = libgcj.jar
-@NEEDS_DATA_START_TRUE@toolexeclib_LIBRARIES = \
-@NEEDS_DATA_START_TRUE@libgcjdata.a
-@NEEDS_DATA_START_TRUE@libgcjdata_a_SOURCES = \
-@NEEDS_DATA_START_TRUE@libgcjdata.c
+@NEEDS_DATA_START_TRUE@toolexeclib_LIBRARIES = @NEEDS_DATA_START_TRUE@libgcjdata.a
+@NEEDS_DATA_START_TRUE@libgcjdata_a_SOURCES = @NEEDS_DATA_START_TRUE@libgcjdata.c
-@NATIVE_TRUE@bin_PROGRAMS = \
-@NATIVE_TRUE@jv-convert gij
+@NATIVE_TRUE@bin_PROGRAMS = @NATIVE_TRUE@jv-convert gij
bin_SCRIPTS = addr2name.awk
-@CANADIAN_TRUE@@NULL_TARGET_TRUE@ZIP = \
-@CANADIAN_TRUE@@NULL_TARGET_TRUE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar$(EXEEXT)
-@CANADIAN_TRUE@@NULL_TARGET_FALSE@ZIP = \
-@CANADIAN_TRUE@@NULL_TARGET_FALSE@fastjar
-@CANADIAN_FALSE@ZIP = \
-@CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar$(EXEEXT)
-@CANADIAN_TRUE@GCJH = \
-@CANADIAN_TRUE@gcjh
-@CANADIAN_FALSE@GCJH = \
-@CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh$(EXEEXT)
+@CANADIAN_TRUE@@NULL_TARGET_TRUE@ZIP = @CANADIAN_TRUE@@NULL_TARGET_TRUE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar$(EXEEXT)
+@CANADIAN_TRUE@@NULL_TARGET_FALSE@ZIP = @CANADIAN_TRUE@@NULL_TARGET_FALSE@fastjar
+@CANADIAN_FALSE@ZIP = @CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar$(EXEEXT)
+@CANADIAN_TRUE@GCJH = @CANADIAN_TRUE@gcjh
+@CANADIAN_FALSE@GCJH = @CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh$(EXEEXT)
GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8
@@ -174,10 +160,8 @@ AM_CXXFLAGS = -fno-rtti -fvtable-thunks -fnon-call-exceptions \
-fdollars-in-identifiers \
@LIBGCJ_CXXFLAGS@ @X_CFLAGS@ $(WARNINGS) -D_GNU_SOURCE
-@USING_GCC_TRUE@AM_CFLAGS = \
-@USING_GCC_TRUE@@LIBGCJ_CFLAGS@ $(WARNINGS)
-@USING_GCC_FALSE@AM_CFLAGS = \
-@USING_GCC_FALSE@@LIBGCJ_CFLAGS@
+@USING_GCC_TRUE@AM_CFLAGS = @USING_GCC_TRUE@@LIBGCJ_CFLAGS@ $(WARNINGS)
+@USING_GCC_FALSE@AM_CFLAGS = @USING_GCC_FALSE@@LIBGCJ_CFLAGS@
JCFLAGS = -g
JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
@@ -197,8 +181,6 @@ javao_files = $(java_source_files:.java=.lo) \
x_javao_files = $(x_java_source_files:.java=.lo)
-libffi_files = `find ../libffi/ \-name '*.lo'`
-
libgcj_la_SOURCES = prims.cc posix.cc jni.cc exception.cc \
resolve.cc defineclass.cc interpret.cc name-finder.cc \
$(nat_source_files)
@@ -211,12 +193,11 @@ libgcj_la_DEPENDENCIES = libgcj.jar $(javao_files) \
libgcj_la_LIBADD = $(javao_files) $(c_files) $(GCOBJS) \
- $(THREADOBJS) $(libffi_files)
+ $(THREADOBJS)
# Include THREADLIBS here to ensure that the correct version of
# certain linuxthread functions get linked:
-libgcj_la_LDFLAGS = -L$(here)/../libstdc++-v3/libsupc++ -lsupc++ \
- -rpath $(toolexeclibdir) $(THREADLIBS) $(LIBLTDL) \
+libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLIBS) $(LIBLTDL) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
libgcj_la_LINK = $(LIBLINK)
@@ -226,7 +207,6 @@ EXTRA_libgcjx_la_SOURCES = $(x_java_source_files)
libgcjx_la_DEPENDENCIES = libgcj.jar $(x_javao_files)
libgcjx_la_LIBADD = $(x_javao_files)
libgcjx_la_LDFLAGS = @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
- -L$(here)/../libstdc++-v3/libsupc++ -lsupc++ \
-rpath $(toolexeclibdir) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
@@ -249,8 +229,7 @@ extra_headers = java/lang/Object.h java/lang/Class.h
NM = nm
-@NATIVE_TRUE@@MAINTAINER_MODE_TRUE@noinst_PROGRAMS = \
-@NATIVE_TRUE@@MAINTAINER_MODE_TRUE@gen-from-JIS
+@NATIVE_TRUE@@MAINTAINER_MODE_TRUE@noinst_PROGRAMS = @NATIVE_TRUE@@MAINTAINER_MODE_TRUE@gen-from-JIS
CONVERT_DIR = gnu/gcj/convert
@@ -1215,7 +1194,7 @@ libgcj-test.spec.in libgcj.spec.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = tar
+TAR = gtar
GZIP_ENV = --best
DIST_SUBDIRS = @DIRLTDL@ testsuite gcj include @DIRLTDL@ gcj include
DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
@@ -2113,7 +2092,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
+ cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@@ -2363,12 +2342,16 @@ $(javao_files) $(x_javao_files): %.lo: %.java
libgcj.la: $(libgcj_la_OBJECTS) $(libgcj_la_DEPENDENCIES)
@echo $(libgcj_la_OBJECTS) > libgcj.objectlist;
@echo $(libgcj_la_LIBADD) >> libgcj.objectlist;
- $(libgcj_la_LINK) -objectlist libgcj.objectlist -rpath $(toolexeclibdir) $(libgcj_la_LDFLAGS) $(LIBS)
+ $(libgcj_la_LINK) -objectlist libgcj.objectlist \
+ ../libstdc++-v3/libsupc++/libsupc++convenience.la \
+ ../libffi/libfficonvenience.la \
+ -rpath $(toolexeclibdir) $(libgcj_la_LDFLAGS) $(LIBS)
libgcjx.la: $(libgcjx_la_OBJECTS) $(libgcjx_la_DEPENDENCIES)
@echo $(libgcjx_la_OBJECTS) > libgcjx.objectlist;
@echo $(libgcjx_la_LIBADD) >> libgcjx.objectlist;
- $(libgcjx_la_LINK) -objectlist libgcjx.objectlist -rpath $(toolexeclibdir) $(libgcjx_la_LDFLAGS) $(LIBS)
+ $(libgcjx_la_LINK) -objectlist libgcjx.objectlist \
+ -rpath $(toolexeclibdir) $(libgcjx_la_LDFLAGS) $(LIBS)
.class.h:
$(GCJH) -classpath $(top_builddir) $(basename $<)
diff --git a/libjava/java/io/File.java b/libjava/java/io/File.java
index 71da2556555..cfa778286a3 100644
--- a/libjava/java/io/File.java
+++ b/libjava/java/io/File.java
@@ -76,11 +76,56 @@ public class File implements Serializable, Comparable
public File (String p)
{
- if (p == null)
- throw new NullPointerException ();
- path = p;
+ path = normalizePath(p);
}
+ // Remove duplicate and redundant separator characters.
+ private String normalizePath(String p)
+ {
+ int dupIndex = p.indexOf(dupSeparator);
+ int plen = p.length();
+
+ // Special case: permit Windows UNC path prefix.
+ if (dupSeparator == "\\" && dupIndex == 0)
+ dupIndex = p.indexOf(dupSeparator, 1);
+
+ if (dupIndex == -1)
+ {
+ // Ignore trailing separator.
+ if (plen > 1 && p.charAt(plen - 1) == separatorChar)
+ return p.substring(0, plen - 1);
+ else
+ return p;
+ }
+
+ StringBuffer newpath = new StringBuffer(plen);
+ int last = 0;
+ while (dupIndex != -1)
+ {
+ newpath.append(p.substring(last, dupIndex));
+ // Ignore the duplicate path characters.
+ while (p.charAt(dupIndex) == separatorChar)
+ {
+ dupIndex++;
+ if (dupIndex == plen)
+ return newpath.toString();
+ }
+ newpath.append(separatorChar);
+ last = dupIndex;
+ dupIndex = p.indexOf(dupSeparator, last);
+ }
+
+ // Again, ignore possible trailing separator.
+ int end;
+ if (plen > 1 && p.charAt(plen - 1) == separatorChar)
+ end = plen - 1;
+ else
+ end = plen;
+ newpath.append(p.substring(last, end));
+
+ return newpath.toString();
+ }
+
public File (String dirPath, String name)
{
if (name == null)
@@ -88,13 +133,14 @@ public class File implements Serializable, Comparable
if (dirPath != null && dirPath.length() > 0)
{
// Try to be smart about the number of separator characters.
- if (dirPath.charAt(dirPath.length() - 1) == separatorChar)
- path = dirPath + name;
+ if (dirPath.charAt(dirPath.length() - 1) == separatorChar
+ || name.length() == 0)
+ path = normalizePath(dirPath + name);
else
- path = dirPath + separatorChar + name;
+ path = normalizePath(dirPath + separatorChar + name);
}
else
- path = name;
+ path = normalizePath(name);
}
public File (File dir, String name)
@@ -439,6 +485,7 @@ public class File implements Serializable, Comparable
static final String tmpdir = System.getProperty("java.io.tmpdir");
static int maxPathLen;
static boolean caseSensitive;
+ static String dupSeparator = separator + separator;
static
{