From patchwork Wed Nov 14 16:21:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 198953 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 ECB062C0568 for ; Thu, 15 Nov 2012 03:22:13 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1353514934; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=j+9xvuY4m4rjHftNDxdH4Z0JhJc=; b=piSIeHybnJ9K6KOG36dbB/xbrfNevALXGRnf9MvlG/6poa3G2Nsisp4v+vuIBS Zp0gLe0/1m4MHgudWWhPMEZ7rZg0JNp/hg75DEnmhda+wcmtQHbQdOQl+UOq6/GC m45AfhdkN1WKXYEGIm2aDJfXo4gYJWOPUbKJ9OTPqkd+g= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=pfWBUg/XP2+ibQuAZTbZIIyPHb4+lHm4wuBVgYdX9osKqcsF4I+co2S6q+yYlI AbIBW/4Kx9ym4nq/im7bf8qfw8evW5fF4cb9i/an7kWMdBPtVTkDC/veiZeRbDc7 eU4WrS7E/DEp0BMW97yMYdzL21Nrii0u4wN4X+jfatgIc=; Received: (qmail 8604 invoked by alias); 14 Nov 2012 16:22:05 -0000 Received: (qmail 8596 invoked by uid 22791); 14 Nov 2012 16:22:04 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pb0-f47.google.com (HELO mail-pb0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Nov 2012 16:21:58 +0000 Received: by mail-pb0-f47.google.com with SMTP id ro12so444115pbb.20 for ; Wed, 14 Nov 2012 08:21:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.238.199 with SMTP id vm7mr78443404pbc.105.1352910117995; Wed, 14 Nov 2012 08:21:57 -0800 (PST) Received: by 10.68.19.138 with HTTP; Wed, 14 Nov 2012 08:21:57 -0800 (PST) In-Reply-To: <50A2DC42.7070305@gnu.org> References: <20121113163456.GA25438@gmail.com> <20121113164655.GA9969@gmail.com> <20121113165641.GZ1886@tucnak.redhat.com> <50A2C9EC.7080104@gnu.org> <50A2D1AF.9080605@gnu.org> <50A2D597.9050606@gnu.org> <50A2D83D.3070904@gnu.org> <50A2DC42.7070305@gnu.org> Date: Wed, 14 Nov 2012 08:21:57 -0800 Message-ID: Subject: Re: [PATCH] PR other/55291: Add support for GCC multilib run-time libraries to libsanitizer From: "H.J. Lu" To: Paolo Bonzini Cc: Jakub Jelinek , Alexandre Oliva , Dodji Seketeli , DJ Delorie , Ralf Wildenhues , gcc-patches@gcc.gnu.org X-IsSubscribed: yes 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 Tue, Nov 13, 2012 at 3:48 PM, Paolo Bonzini wrote: > Il 14/11/2012 00:43, H.J. Lu ha scritto: >> This works. > > Ok, then please test remove install-sh and friends and do > autoconf/automake again. If it works, commit the result (I don't care > if you make it one or two commits). > > Then, wait 24 hours for breakages and commit the multilib patch. > > Paolo This is the multilib patch I will commit later. diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac index 0b6cdef..27a7f95 100644 --- a/libsanitizer/configure.ac +++ b/libsanitizer/configure.ac @@ -4,7 +4,56 @@ AC_PREREQ([2.64]) AC_INIT(package-unused, version-unused, libsanitizer) AC_CONFIG_SRCDIR([include/sanitizer/common_interface_defs.h]) + +AC_MSG_CHECKING([for --enable-version-specific-runtime-libs]) +AC_ARG_ENABLE(version-specific-runtime-libs, +[ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ], +[case "$enableval" in + yes) version_specific_libs=yes ;; + no) version_specific_libs=no ;; + *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);; + esac], +[version_specific_libs=no]) +AC_MSG_RESULT($version_specific_libs) + +# Do not delete or change the following two lines. For why, see +# http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html +AC_CANONICAL_SYSTEM +target_alias=${target_alias-$host_alias} +AC_SUBST(target_alias) + AM_INIT_AUTOMAKE(foreign) +AM_ENABLE_MULTILIB(, ..) + +# Calculate toolexeclibdir +# Also toolexecdir, though it's only used in toolexeclibdir +case ${version_specific_libs} in + yes) + # Need the gcc compiler version to know where to install libraries + # and header files if --enable-version-specific-runtime-libs option + # is selected. + toolexecdir='$(libdir)/gcc/$(target_alias)' + toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)' + ;; + no) + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_alias)' + toolexeclibdir='$(toolexecdir)/lib' + else + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' + fi + multi_os_directory=`$CC -print-multi-os-directory` + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; + esac + ;; +esac +AC_SUBST(toolexecdir) +AC_SUBST(toolexeclibdir)