This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: fix PR27890


Hi,

I committed this patch which fixes PR27890 and a quoting problem with config.status. To fix PR27890, the patch removes libgcj's libgcj.security and logging.properties files which are replaced by GNU Classpath's classpath.security and logging.properties files, and substitutes TOOLEXECLIBDIR instead of LIBDIR in natSystemProperties.cc. To fix the config.status quoting problem, I moved the native-libdir calculation from gcc/libjava/configure.ac to gcc/libjava/classpath/configure.ac and gcc/libjava/classpath/m4/acinclude.m4.

For multilib platforms, this patch causes two versions of logging.properties to be installed (one for 32-bit properties, one for 64-bit properties). Likewise for classpath.security (one for 32-bit modules and one for 64-bit modules).

Tom

2006-08-22 Thomas Fitzsimmons <fitzsim@redhat.com>

	PR libgcj/27890
	* gnu/classpath/natSystemProperties.cc (insertSystemProperties):
	Set gnu.classpath.home.url to TOOLEXECLIBDIR.
	* configure.ac: Do not add --with-native-libdir to
	ac_configure_args.
	* java/security/libgcj.security: Remove file.
	* java/util/logging/logging.properties: Likewise.
	* classpath/m4/acinclude.m4 (CLASSPATH_TOOLEXECLIBDIR): New macro.
	* classpath/resource/Makefile.am (loggingdir): Define to
	toolexeclibdir.
	(securitydir): Likewise.
	* classpath/configure.ac: Call CLASSPATH_TOOLEXECLIBDIR.
	Set default nativeexeclibdir using toolexeclibdir.
	* HACKING: Fix classpath aclocal arguments.
	* Makefile.am (secdir): Remove variable.
	(propdir): Likewise.
	(AM_CXXFLAGS): Replace LIBDIR definition with TOOLEXECLIBDIR
	definition.
	(all_property_files): Remove variable.
	(install-data-local): Do not install libgcj.security or
	logging.properties.
	* configure, Makefile.in, classpath/configure,
	classpath/Makefile.in, classpath/native/jni/java-lang/Makefile.in,
	classpath/native/jni/midi-alsa/Makefile.in,
	classpath/native/jni/classpath/Makefile.in,
	classpath/native/jni/midi-dssi/Makefile.in,
	classpath/native/jni/Makefile.in,
	classpath/native/jni/java-nio/Makefile.in,
	classpath/native/jni/java-net/Makefile.in,
	classpath/native/jni/gconf-peer/Makefile.in,
	classpath/native/jni/java-io/Makefile.in,
	classpath/native/jni/xmlj/Makefile.in,
	classpath/native/jni/java-util/Makefile.in,
	classpath/native/jni/qt-peer/Makefile.in,
	classpath/native/jni/gtk-peer/Makefile.in,
	classpath/native/Makefile.in, classpath/native/jawt/Makefile.in,
	classpath/native/target/Linux/Makefile.in,
	classpath/native/target/Makefile.in,
	classpath/native/target/generic/Makefile.in,
	classpath/native/fdlibm/Makefile.in,
	classpath/native/plugin/Makefile.in,
	classpath/resource/Makefile.in, classpath/scripts/Makefile.in,
	classpath/tools/Makefile.in, classpath/doc/Makefile.in,
	classpath/doc/api/Makefile.in, classpath/lib/Makefile.in,
	classpath/external/Makefile.in,
	classpath/external/sax/Makefile.in,
	classpath/external/w3c_dom/Makefile.in,
	classpath/external/relaxngDatatype/Makefile.in,
	classpath/include/Makefile.in, classpath/aclocal.m4,
	classpath/examples/Makefile.in, aclocal.m4: Regenerate.
Index: gnu/classpath/natSystemProperties.cc
===================================================================
--- gnu/classpath/natSystemProperties.cc	(revision 116155)
+++ gnu/classpath/natSystemProperties.cc	(working copy)
@@ -183,11 +183,11 @@
   // redefine `java.home' with `-D' if necessary.
   SET ("java.home", JAVA_HOME);
   SET ("gnu.classpath.home", PREFIX);
-  // This is set to $(libdir) because we use this to find .security
-  // files at runtime.
-  char val2[sizeof ("file://") + sizeof (LIBDIR) + 1];
+  // This is set to $(toolexeclibdir) because we use this to find
+  // .security files at runtime.
+  char val2[sizeof ("file://") + sizeof (TOOLEXECLIBDIR) + 1];
   strcpy (val2, "file://");
-  strcat (val2, LIBDIR);
+  strcat (val2, TOOLEXECLIBDIR);
   SET ("gnu.classpath.home.url", val2);
 
   SET ("file.encoding", default_file_encoding);
Index: configure.ac
===================================================================
--- configure.ac	(revision 116155)
+++ configure.ac	(working copy)
@@ -1288,11 +1288,9 @@
 case $multi_os_directory in
   .)
    dbexecdir='$(libdir)/gcj-$(gcc_version)' # Avoid /.
-   ac_configure_args="$ac_configure_args --with-native-libdir=\$\(libdir\)/gcj-`cat $srcdir/../gcc/BASE-VER`"
    ;;
   *)
    dbexecdir='$(libdir)/'$multi_os_directory'/gcj-$(gcc_version)'
-   ac_configure_args="$ac_configure_args --with-native-libdir=\$\(libdir\)/$multi_os_directory/gcj-`cat $srcdir/../gcc/BASE-VER`"
    ;;
 esac
 AC_SUBST(dbexecdir)
Index: java/security/libgcj.security
===================================================================
--- java/security/libgcj.security	(revision 116155)
+++ java/security/libgcj.security	(working copy)
@@ -1,2 +0,0 @@
-# This properties file is used when looking for gcj-specific
-# security providers.  By default there are none such.
Index: java/util/logging/logging.properties
===================================================================
--- java/util/logging/logging.properties	(revision 116155)
+++ java/util/logging/logging.properties	(working copy)
@@ -1,8 +0,0 @@
-# Default logging properties.
-# See javadoc in java.util.logging.LogManager to information on
-# overriding these settings.  Most of the defaults are compiled in, so
-# this file is fairly minimal.
-
-# Send log records to System.err, default to INFO per documentation.
-handlers = java.util.logging.ConsoleHandler
-.level = INFO
Index: classpath/m4/acinclude.m4
===================================================================
--- classpath/m4/acinclude.m4	(revision 116155)
+++ classpath/m4/acinclude.m4	(working copy)
@@ -458,3 +458,16 @@
     AC_PATH_PROG(ECJ, "ecj")
   fi
 ])
+
+dnl -----------------------------------------------------------
+dnl GCJ LOCAL: Calculate toolexeclibdir
+dnl -----------------------------------------------------------
+AC_DEFUN([CLASSPATH_TOOLEXECLIBDIR],
+[
+  multi_os_directory=`$CC -print-multi-os-directory`
+  case $multi_os_directory in
+    .) toolexeclibdir=${libdir} ;; # Avoid trailing /.
+    *) toolexeclibdir=${libdir}/${multi_os_directory} ;;
+  esac
+  AC_SUBST(toolexeclibdir)
+])
Index: classpath/resource/Makefile.am
===================================================================
--- classpath/resource/Makefile.am	(revision 116155)
+++ classpath/resource/Makefile.am	(working copy)
@@ -1,7 +1,7 @@
 ## used by automake to generate Makefile.in
 
 logging_DATA = java/util/logging/logging.properties
-loggingdir = $(prefix)/lib
+loggingdir = $(toolexeclibdir)
 
 security_DATA = java/security/classpath.security
-securitydir = $(prefix)/lib/security
+securitydir = $(toolexeclibdir)/security
Index: classpath/configure.ac
===================================================================
--- classpath/configure.ac	(revision 116155)
+++ classpath/configure.ac	(working copy)
@@ -222,15 +222,24 @@
 AM_CONDITIONAL(CREATE_PLUGIN, test "x${COMPILE_PLUGIN}" = xyes)
 
 dnl -----------------------------------------------------------
+dnl GCJ LOCAL: Calculates and substitutes toolexeclibdir.  $libdir is
+dnl defined to the same value for all multilibs.  We define toolexeclibdir
+dnl so that we can refer to the multilib installation directories from
+dnl classpath's build files.
+dnl -----------------------------------------------------------
+CLASSPATH_TOOLEXECLIBDIR
+
+dnl -----------------------------------------------------------
 dnl Sets the native libraries installation dir
 dnl -----------------------------------------------------------
+dnl GCJ LOCAL: default to ${toolexeclibdir}/gcj-${gcc_version}
 AC_ARG_WITH([native-libdir],
 	    [AS_HELP_STRING(--with-native-libdir,sets the installation directory for native libraries [default='${libdir}/${PACKAGE}'])],
 	    [
 	     nativeexeclibdir=${withval}
 	    ],
 	    [
-	     nativeexeclibdir='${libdir}/${PACKAGE}'
+	     nativeexeclibdir='${toolexeclibdir}/gcj-'`cat ${srcdir}/../../gcc/BASE-VER`
 	    ])
 
 AC_SUBST(nativeexeclibdir)
Index: HACKING
===================================================================
--- HACKING	(revision 116155)
+++ HACKING	(working copy)
@@ -53,7 +53,7 @@
   cd .../classpath
   cp ../../lt* .
   cp ../../config.sub ../../config.guess .
-  aclocal -I m4 -I ../..
+  aclocal -I m4 -I ../.. -I ../../config
   autoconf
   autoheader
   automake
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 116155)
+++ Makefile.am	(working copy)
@@ -56,11 +56,6 @@
 BOOT_CLASS_PATH_DIR = $(jardir)/libgcj-$(gcc_version).jar
 endif
 
-## FIXME: Using libdir violates GNU coding standards.
-secdir = $(libdir)/security
-## Where to install default logging property file.
-propdir = $(libdir)
-
 ## Name of the default .db.
 db_name = classmap.db
 ## Compiler specific component of the .db file
@@ -120,7 +115,7 @@
 	$(WARNINGS) \
 	-D_GNU_SOURCE \
 	-DPREFIX="\"$(prefix)\"" \
-	-DLIBDIR="\"$(libdir)\"" \
+	-DTOOLEXECLIBDIR="\"$(toolexeclibdir)\"" \
         -DJAVA_HOME="\"$(JAVA_HOME_DIR)\"" \
         -DBOOT_CLASS_PATH="\"$(BOOT_CLASS_PATH_DIR)\"" \
 	-DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
@@ -162,9 +157,6 @@
 
 ## ################################################################
 
-all_property_files = $(property_files) \
-    java/util/logging/logging.properties
-
 ##
 ## How to build libgcj.a and libgcj.jar
 ##
@@ -523,14 +515,6 @@
 	  $(INSTALL_DATA) $$p $(DESTDIR)$(gxx_include_dir)/$$f; \
 	done
 	-@rm -f tmp-ilist
-## FIXME: the obvious approach using lib_DATA doesn't work with
-## automake 1.4.
-	$(mkinstalldirs) $(DESTDIR)$(secdir)
-	@for f in libgcj.security; do \
-	  echo " $(INSTALL_DATA) $(srcdir)/java/security/$$f $(DESTDIR)$(secdir)/$$f"; \
-	  $(INSTALL_DATA) $(srcdir)/java/security/$$f $(DESTDIR)$(secdir)/$$f; \
-	done
-	$(INSTALL_DATA) $(srcdir)/java/util/logging/logging.properties $(DESTDIR)$(propdir)/logging.properties
 ## Install inner class headers.
 	$(INSTALL_DATA) 'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
 	$(INSTALL_DATA) 'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(gxx_include_dir)/java/io/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]