From patchwork Wed May 22 21:41:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Burgess X-Patchwork-Id: 245723 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 20A1D2C00A3 for ; Thu, 23 May 2013 07:41:59 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version; q=dns; s=default; b=aSX4T0mS6lHaVTN4 84xjtgZ5fOyhhFMPui6CtwsFEFJKxnTbKjG0Q+nr/X6n6jG9oyheWm/xMIZXVKJF hB1D/dNwAfK80rI9oivmKNQhrTFS+pvmOmY/YhEHYDFH+T4KGMKxAoT4s3NQpUvv epgZrZUmjBg9r5EWn+6Qr8/ULl0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version; s=default; bh=Fb3/7euAmujtz4pGa1olL6 3qf14=; b=Y1y/Cyy18ODgRBSF7dIwA3a0nRh4hUc85NCEGFErQ0R52PB1l9FF5m D2qaOB5RHPnncFsMheGwnRlZ5UionfzTiMRh8BTTWT5i0jAmqPGalAm1INym1J00 dTzaljzf/FDtZxrssDZhKkbuh9zTFv0Oze3ZAD7pkwoRCqmTmuo50= Received: (qmail 29087 invoked by alias); 22 May 2013 21:41:53 -0000 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 Received: (qmail 29076 invoked by uid 89); 22 May 2013 21:41:53 -0000 X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from quantum.linuxfromscratch.org (HELO quantum.linuxfromscratch.org) (216.171.237.234) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 22 May 2013 21:41:52 +0000 Received: by quantum.linuxfromscratch.org (Postfix, from userid 108) id 12DAF140A1; Wed, 22 May 2013 15:41:50 -0600 (MDT) Received: from [192.168.0.209] (unknown [94.7.168.178]) by quantum.linuxfromscratch.org (Postfix) with ESMTPA id 4C7891409F; Wed, 22 May 2013 15:41:41 -0600 (MDT) Message-ID: <1369258897.2122.9.camel@kyoto.localdomain> Subject: Re: [Patch] Fix PR56780: --disable-install-libiberty still installs libiberty.a From: Matt Burgess To: gcc-patches@gcc.gnu.org Cc: iant@google.com, matthew@linuxfromscratch.org Date: Wed, 22 May 2013 22:41:37 +0100 In-Reply-To: References: <1364997809.24016.13.camel@kyoto.localdomain> Mime-Version: 1.0 X-Virus-Found: No Hi Ian, Thanks for the review. Here's v2, which I think addresses both of your comments. Kind Regards, Matt. 2013-05-22 Matt Burgess other/PR56780 * libiberty/configure.ac: Move test for --enable-install-libiberty outside of the 'with_target_subdir' test so that it actually gets run. Add output messages to show the test result. * libiberty/configure: Regenerate. * libiberty/Makefile.in (install_to_libdir): Place the installation of the libiberty library in the same guard as that used for the headers to prevent it being installed unless requested via --enable-install-libiberty. Index: libiberty/Makefile.in =================================================================== --- libiberty/Makefile.in (revision 197373) +++ libiberty/Makefile.in (working copy) @@ -355,19 +355,19 @@ # since it will be passed the multilib flags. MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` install_to_libdir: all - ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR) - $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n - ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ) - mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB) if test -n "${target_header_dir}"; then \ - case "${target_header_dir}" in \ - /*) thd=${target_header_dir};; \ - *) thd=${includedir}/${target_header_dir};; \ - esac; \ - ${mkinstalldirs} $(DESTDIR)$${thd}; \ - for h in ${INSTALLED_HEADERS}; do \ - ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ - done; \ + ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \ + $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \ + ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \ + mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \ + case "${target_header_dir}" in \ + /*) thd=${target_header_dir};; \ + *) thd=${includedir}/${target_header_dir};; \ + esac; \ + ${mkinstalldirs} $(DESTDIR)$${thd}; \ + for h in ${INSTALLED_HEADERS}; do \ + ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ + done; \ fi @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install Index: libiberty/configure.ac =================================================================== --- libiberty/configure.ac (revision 197373) +++ libiberty/configure.ac (working copy) @@ -128,6 +128,31 @@ cross_compiling=maybe fi +# We may wish to install the target headers somewhere. +AC_MSG_CHECKING([whether to install libiberty headers and static library]) +dnl install-libiberty is disabled by default + +AC_ARG_ENABLE(install-libiberty, +[ --enable-install-libiberty Install headers and library for end users], +enable_install_libiberty=$enableval, +enable_install_libiberty=no)dnl + +# Option parsed, now set things appropriately. +case x"$enable_install_libiberty" in + xyes|x) + target_header_dir=libiberty + ;; + xno) + target_header_dir= + ;; + *) + # This could be sanity-checked in various ways... + target_header_dir="${enable_install_libiberty}" + ;; +esac +AC_MSG_RESULT($enable_install_libiberty) +AC_MSG_NOTICE([target_header_dir = $target_header_dir]) + GCC_NO_EXECUTABLES AC_PROG_CC AC_SYS_LARGEFILE @@ -492,27 +517,6 @@ esac - # We may wish to install the target headers somewhere. - AC_ARG_ENABLE(install-libiberty, - [ --enable-install-libiberty Install headers for end users], - enable_install_libiberty=$enableval, - enable_install_libiberty=no)dnl - - # Option parsed, now set things appropriately. - case x"$enable_install_libiberty" in - xyes|x) - target_header_dir=libiberty - ;; - xno) - target_header_dir= - ;; - *) - # This could be sanity-checked in various ways... - target_header_dir="${enable_install_libiberty}" - ;; - esac - - else # Not a target library, so we set things up to run the test suite.