From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 375 invoked by alias); 20 Jun 2013 12:11:56 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 359 invoked by uid 89); 20 Jun 2013 12:11:55 -0000 X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RCVD_IN_HOSTKARMA_YE,SPF_PASS,TW_BF autolearn=ham version=3.3.1 Received: from mail-bl2lp0204.outbound.protection.outlook.com (HELO na01-bl2-obe.outbound.protection.outlook.com) (207.46.163.204) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 20 Jun 2013 12:11:53 +0000 Received: from BY2PR03MB027.namprd03.prod.outlook.com (10.255.240.41) by BY2PR03MB620.namprd03.prod.outlook.com (10.255.93.42) with Microsoft SMTP Server (TLS) id 15.0.702.21; Thu, 20 Jun 2013 12:11:42 +0000 Received: from consult.ant.co.uk (212.44.45.165) by BY2PR03MB027.namprd03.prod.outlook.com (10.255.240.41) with Microsoft SMTP Server (TLS) id 15.0.702.21; Thu, 20 Jun 2013 12:11:39 +0000 Date: Thu, 20 Jun 2013 12:11:00 -0000 From: Stewart Brodie To: Subject: [PATCH] Add --disable-multi-os-directory configure option Message-ID: In-Reply-To: References: Mail-Followup-To: libffi-discuss@sourceware.org X-Organization: Espial UK User-Agent: Gemini/2.29m (Qt/3.3.8b) (Linux-x86_64) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-ClientProxiedBy: DB3PR01CA011.eurprd01.prod.exchangelabs.com (10.255.177.28) To BY2PR03MB027.namprd03.prod.outlook.com (10.255.240.41) X-Forefront-Antispam-Report: SFV:SKI;SFS:;DIR:OUT;SFP:;SCL:0;SRVR:BY2PR03MB027;H:consult.ant.co.uk;LANG:en;;SKIP:1; X-OriginatorOrg: Espial.com X-SW-Source: 2013/txt/msg00144.txt.bz2 Stewart Brodie wrote: > > I've been trying to compile libffi (latest cloned from git earlier today) > but hitting a problem with overriding where the library is installed. > [ patch in original e-mail ] I have since discovered that my patch only works if you build out-of-tree. autoconf has put something strange in the configure script to detect when $top_srcdir == $top_builddir and write completely different stuff out to the Makefile, which doesn't pass the required parameters to the recursive makes that it runs, as far as I can tell. So I just added a configuration option instead, which always works. The --disable-multi-os-directory option stops the configure script from asking gcc whether it should override the library installation directory. --- configure.ac | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 0dc0675..cc64876 100644 --- a/configure.ac +++ b/configure.ac @@ -535,6 +535,10 @@ AC_ARG_ENABLE(purify-safety, AC_DEFINE(USING_PURIFY, 1, [Define this if you are using Purify and want to suppress spurious messages.]) fi) +AC_ARG_ENABLE(multi-os-directory, +[ --disable-multi-os-directory + disable use of gcc --print-multi-os-directory to change the library installation directory]) + # These variables are only ever used when we cross-build to X86_WIN32. # And we only support this with GCC, so... if test "x$GCC" = "xyes"; then @@ -546,11 +550,13 @@ if test "x$GCC" = "xyes"; then 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 + if test x"$enable_multi_os_directory" != x"no"; then + multi_os_directory=`$CC -print-multi-os-directory` + case $multi_os_directory in + .) ;; # Avoid trailing /. + ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; + esac + fi AC_SUBST(toolexecdir) else toolexeclibdir='$(libdir)' -- 1.8.1.4 -- Stewart Brodie Senior Software Engineer Team Leader ANT Galio Browser Espial UK