From patchwork Thu May 2 10:38:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manjunath Matti X-Patchwork-Id: 1930581 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=FBBjhBut; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VVVlZ55f9z20fb for ; Thu, 2 May 2024 20:38:34 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E270B385828E for ; Thu, 2 May 2024 10:38:32 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 99ADF3858C50 for ; Thu, 2 May 2024 10:38:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 99ADF3858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 99ADF3858C50 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714646297; cv=none; b=AbdApdp3VhAJDK1AYkPhQKtnuESu1gNDGxs9hXCC37gR9oyrU3EeCQI0/UsTSeBNSie7pxVzIwzvMpJQXYIQ4Byc3L1gG8IgEpfd7vGC/vGIpKT2kJTR8IIZ978ysGNtAv5ugJgAE1+54kKNTZ64YcHrRhs9iLDInvwEOoUVj34= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714646297; c=relaxed/simple; bh=N+zapkQxqfcerFZP3qPltWsTnM3BQmj4HnYH5Tycf3Y=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=FRUyejLI772McTUQR2SfiNchK9A37tT8vz9xyC0U0F3HQm90TFsun9DqQLvMjjHRefR3UxC4jp1rAUJ54B9MP4WKvfo3uqiZLFo7qN70RzibsnFJRDezzyHUrPn3DI9uS7k2SiTPUefwyNJymNlD7EFn1sCuQdsw7iYPlDiRvew= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 442AX5QI025454 for ; Thu, 2 May 2024 10:38:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=J5SsZoDD/cRFoGBjMDzfqHCIRnsW7g0spkwRuoylN/Y=; b=FBBjhButeW/JQEOLLaFF8bR3X0w0fN7tdOqzSc7USCMiSe53Qmm5g1kZ/Fk7EA6hj3Xj NNXGrnbtpZdu/Zo9oena2GOdHEuDVrWluveL7GyzhOpWonyluITYdI58l/bF8MCPT5O5 r2lEOjYQ93RK0kSBX9x6+T/VJvv9uHREQLD2n2DBHKNxslvaF7Mhiq7Q4fwf1ndFDe+0 k9tULsXMu3kHQho5BbIvEtmoRWbQrJCU2UNCGTJ/FqX6GscQyxnDqAErrXiq2YaOaJlD gb0YjwMNcWOT3ab1LfCabQJxu2yktt+6AMFfVz6SmEUhl2meOa+Mbl/tLC4XjyCa1Cza kA== Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xv964g0cb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 02 May 2024 10:38:14 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 44277HkT027546 for ; Thu, 2 May 2024 10:38:14 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3xsc30qn9h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 02 May 2024 10:38:14 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 442Ac8E456164688 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 2 May 2024 10:38:10 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8849820040; Thu, 2 May 2024 10:38:08 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8222920049; Thu, 2 May 2024 10:38:07 +0000 (GMT) Received: from ltcd97-lp3.. (unknown [9.40.194.171]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 2 May 2024 10:38:07 +0000 (GMT) From: Manjunath Matti To: libc-alpha@sourceware.org Cc: bergner@linux.ibm.com, smonga@linux.ibm.com, jeevitha@linux.ibm.com, Manjunath Matti Subject: [PATCH] powerpc64: Fix by using the configure value $libc_cv_cc_submachine [BZ #31629] Date: Thu, 2 May 2024 06:38:03 -0400 Message-ID: <20240502103803.3022740-1-mmatti@linux.ibm.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: XMKEeQ0iX3Ylei8r3ldcD-hE4Kev_x6M X-Proofpoint-GUID: XMKEeQ0iX3Ylei8r3ldcD-hE4Kev_x6M X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-01_16,2024-05-02_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 spamscore=0 adultscore=0 mlxlogscore=830 mlxscore=0 suspectscore=0 clxscore=1011 malwarescore=0 priorityscore=1501 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2405020066 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org This patch ensures that $libc_cv_cc_submachine, which is set from "--with-cpu", overrides $CFLAGS for configure time tests. Suggested-by: Peter Bergner Reviewed-by: Peter Bergner --- sysdeps/powerpc/powerpc64/configure | 4 ++-- sysdeps/powerpc/powerpc64/configure.ac | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/powerpc/powerpc64/configure b/sysdeps/powerpc/powerpc64/configure index 6d8153ed50..9df2ceaa1f 100644 --- a/sysdeps/powerpc/powerpc64/configure +++ b/sysdeps/powerpc/powerpc64/configure @@ -12,7 +12,7 @@ then : else $as_nop libc_cv_overlapping_opd=no echo 'void foo (void) {}' > conftest.c -if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c -o conftest.s 1>&5' +if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $libc_cv_cc_submachine -S conftest.c -o conftest.s 1>&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -51,7 +51,7 @@ int bar (void); int foo (void) { return bar () + 1; } EOF libc_cv_ppc64_notoc=no - if { ac_try='${CC-cc} $libc_cv_cc_submachine $CFLAGS $CPPFLAGS -S -o conftest.s conftest.c' + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $libc_cv_cc_submachine -S -o conftest.s conftest.c' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? diff --git a/sysdeps/powerpc/powerpc64/configure.ac b/sysdeps/powerpc/powerpc64/configure.ac index 575745af3e..225d66ef1a 100644 --- a/sysdeps/powerpc/powerpc64/configure.ac +++ b/sysdeps/powerpc/powerpc64/configure.ac @@ -7,7 +7,7 @@ AC_CACHE_CHECK(for support for overlapping .opd entries, libc_cv_overlapping_opd, [dnl libc_cv_overlapping_opd=no echo 'void foo (void) {}' > conftest.c -if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then +if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $libc_cv_cc_submachine -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then changequote(,)dnl if grep '\.TOC\.@tocbase' conftest.s > /dev/null; then if grep '\.TOC\.@tocbase[ ]*,[ ]*0' conftest.s > /dev/null; then @@ -35,7 +35,7 @@ int bar (void); int foo (void) { return bar () + 1; } EOF libc_cv_ppc64_notoc=no - if AC_TRY_COMMAND([${CC-cc} $libc_cv_cc_submachine $CFLAGS $CPPFLAGS -S -o conftest.s conftest.c]) \ + if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $libc_cv_cc_submachine -S -o conftest.s conftest.c]) \ && AC_TRY_COMMAND([grep -q -E 'bar@notoc' conftest.s]) then libc_cv_ppc64_notoc=yes