From patchwork Fri Oct 4 21:31:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tulio Magno Quites Machado Filho X-Patchwork-Id: 1172050 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-510319-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="dUSKyvUD"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46lNPc5d6Yz9sN1 for ; Sat, 5 Oct 2019 07:32:18 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=QvgOX//EbWpA9Kc7Ij5t1ZCSnNoJdhn4GxbHSzMb8MkvqAWWCHYyX rKwG0aRM0GxGjl+1A2IkkzefPjTJ1Px3xQHwq8BiczWn56Zph5I4L1614JnpthVa ZRkSKgJEqAMhe1llz4lk3ZZoZ1N4MKPyUEKHuBmYVXplc5FIE+6jF0= 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:from :to:cc:subject:date:message-id:in-reply-to:references; s= default; bh=ftinOXCzaNNe8i2BFwZe+KNjMkE=; b=dUSKyvUD+EfQLusesTFN yavKI+0Zl1zyKiu9MPciPQV9YBx+JqmGllsF3f9KqQUPrlGDivuuJ7drUtq+U6sQ YtYGhVHJotJDhwhGdx3FnFn6GG2SHin8SWNcMxJ5OPwyeWKilWMLbyHICls2iPU9 eLDM72XPcJ/LP4gtBB3jIYg= Received: (qmail 66354 invoked by alias); 4 Oct 2019 21:32:11 -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 66346 invoked by uid 89); 4 Oct 2019 21:32:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 04 Oct 2019 21:32:09 +0000 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x94LW5F1106231; Fri, 4 Oct 2019 17:32:06 -0400 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vedgsgwuh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Oct 2019 17:32:05 -0400 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x94LUUxt008714; Fri, 4 Oct 2019 21:32:07 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma01wdc.us.ibm.com with ESMTP id 2v9y587t5g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Oct 2019 21:32:07 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x94LW3Ck61407548 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Oct 2019 21:32:03 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BB4D1BE04F; Fri, 4 Oct 2019 21:32:03 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CBE1BBE051; Fri, 4 Oct 2019 21:32:01 +0000 (GMT) Received: from shinano (unknown [9.80.207.77]) by b03ledav005.gho.boulder.ibm.com (Postfix) with SMTP; Fri, 4 Oct 2019 21:32:01 +0000 (GMT) Received: by shinano (sSMTP sendmail emulation); Fri, 04 Oct 2019 18:32:00 -0300 From: Tulio Magno Quites Machado Filho To: Michael Meissner , gcc-patches@gcc.gnu.org Cc: segher@kernel.crashing.org Subject: [PATCHv2] Change the library search path when using --with-advance-toolchain Date: Fri, 4 Oct 2019 18:31:34 -0300 Message-Id: <20191004213134.8417-1-tuliom@linux.ibm.com> In-Reply-To: <20191003233220.GA7034@ibm-toto.the-meissners.org> References: <20191003233220.GA7034@ibm-toto.the-meissners.org> Michael Meissner writes: > And then I built Spec 2006 and 2017 with my normal options on a power8 system > running Ubuntu and an older set of host libraries. If I have this patch > installed, it breaks linking some/all of the C++ and Fortran benchmarks, > because it finds the host C++/Fortran libraries before the AT 12.0 libraries. You have an usecase where the compiler has a different prefix. That requires an extra library directory, but it still has to come after the user lib directory. ---8<--- Remove all -L directories from LINK_OS_EXTRA_SPEC32 and LINK_OS_EXTRA_SPEC64 so that user directories specified at build time have higher preference over the advance toolchain libraries. Set MD_STARTFILE_PREFIX to $prefix/lib/ and MD_STARTFILE_PREFIX_1 to $at/lib/ so that a compiler library has preference over the Advance Toolchain libraries. 2019-10-04 Tulio Magno Quites Machado Filho * config.gcc: Move -L usage from LINK_OS_EXTRA_SPEC32 and LINK_OS_EXTRA_SPEC64 to MD_STARTFILE_PREFIX and MD_STARTFILE_PREFIX_1 when using --with-advance-toolchain. --- gcc/config.gcc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index 481bc9586a7..511aeb454bf 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -4782,14 +4782,12 @@ case "${target}" in echo "#undef LINK_OS_EXTRA_SPEC32" echo "#define LINK_OS_EXTRA_SPEC32" \ "\"%(link_os_new_dtags)" \ - "-rpath $prefix/lib -rpath $at/lib" \ - "-L $prefix/lib -L $at/lib\"" + "-rpath $prefix/lib -rpath $at/lib\"" echo echo "#undef LINK_OS_EXTRA_SPEC64" echo "#define LINK_OS_EXTRA_SPEC64" \ "\"%(link_os_new_dtags)" \ - "-rpath $prefix/lib64 -rpath $at/lib64" \ - "-L $prefix/lib64 -L $at/lib64\"" + "-rpath $prefix/lib64 -rpath $at/lib64\"" echo echo "#undef LINK_OS_NEW_DTAGS_SPEC" echo "#define LINK_OS_NEW_DTAGS_SPEC" \ @@ -4802,7 +4800,10 @@ case "${target}" in echo "#define MD_EXEC_PREFIX \"$at/bin/\"" echo echo "#undef MD_STARTFILE_PREFIX" - echo "#define MD_STARTFILE_PREFIX \"$at/lib/\"") \ + echo "#define MD_STARTFILE_PREFIX \"$prefix/lib/\"" + echo + echo "#undef MD_STARTFILE_PREFIX_1" + echo "#define MD_STARTFILE_PREFIX_1 \"$at/lib/\"") \ > advance-toolchain.h else echo "Unknown advance-toolchain $with_advance_toolchain"