From patchwork Sat Jul 9 15:37:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Klose X-Patchwork-Id: 103983 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 394E6B6F9F for ; Sun, 10 Jul 2011 01:38:11 +1000 (EST) Received: (qmail 31945 invoked by alias); 9 Jul 2011 15:38:09 -0000 Received: (qmail 31929 invoked by uid 22791); 9 Jul 2011 15:38:08 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, TW_GC, TW_IB, TW_JW X-Spam-Check-By: sourceware.org Received: from einhorn.in-berlin.de (HELO einhorn.in-berlin.de) (192.109.42.8) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 09 Jul 2011 15:37:51 +0000 X-Envelope-From: doko@ubuntu.com Received: from [192.168.42.17] (dslb-088-073-073-034.pools.arcor-ip.net [88.73.73.34]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id p69FbnUZ003014; Sat, 9 Jul 2011 17:37:49 +0200 Message-ID: <4E1875CA.9050309@ubuntu.com> Date: Sat, 09 Jul 2011 17:37:46 +0200 From: Matthias Klose User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10 MIME-Version: 1.0 To: Ralf Wildenhues CC: Jakub Jelinek , java-patches@gcc.gnu.org, GCC Patches Subject: Re: [patch] Disable static build for libjava References: <4E15DE84.5030809@ubuntu.com> <4E15E3F6.3050502@cavium.com> <4E15E56E.4070209@ubuntu.com> <4E15E6AF.4050508@cavium.com> <4E15F34D.7050800@redhat.com> <4E16158D.3060206@ubuntu.com> <20110707202659.GT2687@tyan-ft48-01.lab.bos.redhat.com> <20110707203554.280270@gmx.net> In-Reply-To: <20110707203554.280270@gmx.net> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On 07/07/2011 10:35 PM, Ralf Wildenhues wrote: > Hi Matthias, > > On Thu, Jul 07, 2011 at 10:26:59PM +0200, Jakub Jelinek wrote: >> On Thu, Jul 07, 2011 at 10:22:37PM +0200, Matthias Klose wrote: >>> +AC_PROG_LIBTOOL > > This tests the wrong compiler and toolchain. The compiler you want > to test doesn't exist yet at the time this configure script is run. > So you might as well deduce the switch you need from a fixed set or > other GCC configure data. > > Or you put AC_PROG_LIBTOOL in libjava/ but pass down the value of > enable_static_libjava as --en/disable-static there. here is the updated patch. AC_PROG_LIBTOOL is already called in libjava/ ok to install? Matthias 2011-07-09 Matthias Klose * Makefile.tpl (EXTRA_CONFIGARGS_LIBJAVA): Define. * Makefile.def (target_modules/libjava): Pass $(EXTRA_CONFIGARGS_LIBJAVA). * configure.ac: Pass --disable-static in EXTRA_CONFIGARGS_LIBJAVA, if not configured with --enable-static-libjava. * Makefile.in: Regenerate. * configure: Likewise. gcc/ 2011-07-09 Matthias Klose * doc/install.texi: Document --enable-static-libjava. Index: Makefile.tpl =================================================================== --- Makefile.tpl (revision 176072) +++ Makefile.tpl (working copy) @@ -319,6 +319,8 @@ HOST_LIBELFLIBS = @libelflibs@ HOST_LIBELFINC = @libelfinc@ +EXTRA_CONFIGARGS_LIBJAVA = @EXTRA_CONFIGARGS_LIBJAVA@ + # ---------------------------------------------- # Programs producing files for the BUILD machine # ---------------------------------------------- Index: Makefile.def =================================================================== --- Makefile.def (revision 176072) +++ 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="$(EXTRA_CONFIGARGS_LIBJAVA)"; }; target_modules = { module= zlib; }; target_modules = { module= boehm-gc; }; target_modules = { module= rda; }; Index: configure.ac =================================================================== --- configure.ac (revision 176072) +++ configure.ac (working copy) @@ -443,7 +443,21 @@ ;; esac +AC_ARG_ENABLE(static-libjava, +[AS_HELP_STRING([[--enable-static-libjava[=ARG]]], + [build static libjava @<:@default=no@:>@])], +ENABLE_STATIC_LIBJAVA=$enableval, +ENABLE_STATIC_LIBJAVA=no) +enable_static_libjava= +if test "${ENABLE_STATIC_LIBJAVA}" = "yes" ; then + enable_static_libjava=yes +fi +if test x$enable_static_libjava != xyes ; then + EXTRA_CONFIGARGS_LIBJAVA=--disable-static +fi +AC_SUBST(EXTRA_CONFIGARGS_LIBJAVA) + # Disable libmudflap on some systems. if test x$enable_libmudflap = x ; then case "${target}" in Index: gcc/doc/install.texi =================================================================== --- gcc/doc/install.texi (revision 176072) +++ gcc/doc/install.texi (working copy) @@ -1968,6 +1968,10 @@ @item --enable-browser-plugin Build the gcjwebplugin web browser plugin. +@item --enable-static-libjava +Build static libraries in libjava. The default is to only build shared +libraries. + @table @code @item ansi Use the single-byte @code{char} and the Win32 A functions natively,