public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] Disable static build for libjava
@ 2011-07-07 16:28 Matthias Klose
  2011-07-07 16:51 ` David Daney
  0 siblings, 1 reply; 11+ messages in thread
From: Matthias Klose @ 2011-07-07 16:28 UTC (permalink / raw)
  To: GCJ-patches; +Cc: GCC Patches, Andrew Haley, David Daney

As discussed at the Google GCC gathering, disable the build of static libraries
in libjava, which should cut the build time of libjava by 50%.  The static
libjava build isn't useful out of the box, and I don't see it packaged by Linux
distributions either.

The AC_PROG_LIBTOOL check is needed to get access to the enable_shared macro.
I'm unsure about the check in the switch construct. Taken from libtool.m4, and
determining the value of enable_shared_with_static_runtimes.

Ok for the trunk?

2011-07-07  Matthias Klose  <doko@ubuntu.com>

        * Makefile.def (target_modules/libjava): Pass
        $(libjava_disable_static).
        * configure.ac: Check for libtool, pass --disable-static
        in libjava_disable_static.
        * Makefile.in: Regenerate.
        * configure: Likewise.

Index: Makefile.def
===================================================================
--- Makefile.def	(revision 175963)
+++ Makefile.def	(working copy)
@@ -132,7 +132,8 @@
 target_modules = { module= winsup; };
 target_modules = { module= libgloss; no_check=true; };
 target_modules = { module= libffi; };
-target_modules = { module= libjava; raw_cxx=true; };
+target_modules = { module= libjava; raw_cxx=true;
+                   extra_configure_flags="$(libjava_disable_static)"; };
 target_modules = { module= zlib; };
 target_modules = { module= boehm-gc; };
 target_modules = { module= rda; };
Index: configure.ac
===================================================================
--- configure.ac	(revision 175963)
+++ configure.ac	(working copy)
@@ -443,6 +443,16 @@
   ;;
 esac

+AC_PROG_LIBTOOL
+if test x$enable_shared = xyes ; then
+  case $host_cpu in
+  cygwin* | mingw* | pw32* | cegcc*)
+    ;;
+  *)
+    libjava_disable_static=--disable-static
+  esac
+fi
+AC_SUBST(libjava_disable_static)

 # Disable libmudflap on some systems.
 if test x$enable_libmudflap = x ; then

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-07-16  6:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-07 16:28 [patch] Disable static build for libjava Matthias Klose
2011-07-07 16:51 ` David Daney
2011-07-07 16:58   ` Matthias Klose
2011-07-07 17:02     ` David Daney
2011-07-07 17:56       ` Andrew Haley
2011-07-07 20:22         ` Matthias Klose
2011-07-07 20:27           ` Jakub Jelinek
2011-07-07 20:36             ` Ralf Wildenhues
2011-07-09 15:38               ` Matthias Klose
2011-07-11 12:47                 ` Andrew Haley
2011-07-16  6:07                 ` Ralf Wildenhues

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).