* [PATCH] powerpc64: Fix by using the configure value $libc_cv_cc_submachine [BZ #31629]
@ 2024-05-02 10:38 Manjunath Matti
2024-05-16 22:35 ` Peter Bergner
0 siblings, 1 reply; 2+ messages in thread
From: Manjunath Matti @ 2024-05-02 10:38 UTC (permalink / raw)
To: libc-alpha; +Cc: bergner, smonga, jeevitha, Manjunath Matti
This patch ensures that $libc_cv_cc_submachine, which is set from
"--with-cpu", overrides $CFLAGS for configure time tests.
Suggested-by: Peter Bergner <bergner@linux.ibm.com>
---
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
--
2.44.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc64: Fix by using the configure value $libc_cv_cc_submachine [BZ #31629]
2024-05-02 10:38 [PATCH] powerpc64: Fix by using the configure value $libc_cv_cc_submachine [BZ #31629] Manjunath Matti
@ 2024-05-16 22:35 ` Peter Bergner
0 siblings, 0 replies; 2+ messages in thread
From: Peter Bergner @ 2024-05-16 22:35 UTC (permalink / raw)
To: Manjunath Matti, libc-alpha; +Cc: smonga, jeevitha
On 5/2/24 5:38 AM, Manjunath Matti wrote:
> This patch ensures that $libc_cv_cc_submachine, which is set from
> "--with-cpu", overrides $CFLAGS for configure time tests.
>
> Suggested-by: Peter Bergner <bergner@linux.ibm.com>
LGTM.
Reviewed-by: Peter Bergner <bergner@linux.ibm.com>
Thanks for fixing this. I pushed this to trunk for you.
Peter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-16 22:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-02 10:38 [PATCH] powerpc64: Fix by using the configure value $libc_cv_cc_submachine [BZ #31629] Manjunath Matti
2024-05-16 22:35 ` Peter Bergner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).