public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: newlib@sourceware.org
Subject: [PATCH 2/2] newlib: rename libc_cv_ prefix to newlib_cv_
Date: Tue,  1 Feb 2022 21:52:56 -0500	[thread overview]
Message-ID: <20220202025256.32179-2-vapier@gentoo.org> (raw)
In-Reply-To: <20220202025256.32179-1-vapier@gentoo.org>

We've been using both libc_cv_ and newlib_cv_ for our cache vars.
Let's consolidate on newlib_cv_ to avoid conflicts with glibc which
is already using the libc_cv_ prefix.
---
 newlib/configure      | 26 +++++++++++++-------------
 newlib/configure.ac   | 18 +++++++++---------
 newlib/configure.host |  2 +-
 3 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/newlib/configure b/newlib/configure
index ca8953933cda..a39a3e51afcd 100755
--- a/newlib/configure
+++ b/newlib/configure
@@ -13269,7 +13269,7 @@ $as_echo "#define _ICONV_FROM_ENCODING_WIN_1258 1" >>confdefs.h
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for .preinit_array/.init_array/.fini_array support" >&5
 $as_echo_n "checking for .preinit_array/.init_array/.fini_array support... " >&6; }
-if ${libc_cv_initfinit_array+:} false; then :
+if ${newlib_cv_initfinit_array+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat > conftest.c <<EOF
@@ -13287,18 +13287,18 @@ if { ac_try='${CC} $CFLAGS $CPPFLAGS -c -o conftest conftest.c
   test $ac_status = 0; }; }
 then
   if ${READELF} -S conftest | grep -e INIT_ARRAY > /dev/null; then
-    libc_cv_initfinit_array=yes
+    newlib_cv_initfinit_array=yes
   else
-    libc_cv_initfinit_array=no
+    newlib_cv_initfinit_array=no
   fi
 else
-  libc_cv_initfinit_array=no
+  newlib_cv_initfinit_array=no
 fi
 rm -f conftest*
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_initfinit_array" >&5
-$as_echo "$libc_cv_initfinit_array" >&6; }
-if test $libc_cv_initfinit_array = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $newlib_cv_initfinit_array" >&5
+$as_echo "$newlib_cv_initfinit_array" >&6; }
+if test $newlib_cv_initfinit_array = yes; then
 
 $as_echo "#define _HAVE_INITFINI_ARRAY 1" >>confdefs.h
 
@@ -13308,7 +13308,7 @@ fi
 __attribute__ ((__optimize__))" >&5
 $as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))... " >&6; }
-if ${libc_cv_cc_loop_to_function+:} false; then :
+if ${newlib_cv_cc_loop_to_function+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat > conftest.c <<EOF
@@ -13316,7 +13316,7 @@ void
 __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
 foo (void) {}
 EOF
-libc_cv_cc_loop_to_function=no
+newlib_cv_cc_loop_to_function=no
 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c
 			    -fno-tree-loop-distribute-patterns conftest.c'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
@@ -13325,13 +13325,13 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }
 then
-  libc_cv_cc_loop_to_function=yes
+  newlib_cv_cc_loop_to_function=yes
 fi
 rm -f conftest*
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_loop_to_function" >&5
-$as_echo "$libc_cv_cc_loop_to_function" >&6; }
-if test $libc_cv_cc_loop_to_function = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $newlib_cv_cc_loop_to_function" >&5
+$as_echo "$newlib_cv_cc_loop_to_function" >&6; }
+if test $newlib_cv_cc_loop_to_function = yes; then
 
 $as_echo "#define _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL 1" >>confdefs.h
 
diff --git a/newlib/configure.ac b/newlib/configure.ac
index ce36ea19ac10..2e6a80a5f8b3 100644
--- a/newlib/configure.ac
+++ b/newlib/configure.ac
@@ -637,7 +637,7 @@ fi;
 NEWLIB_ICONV_DEFINES
 
 AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
-	       libc_cv_initfinit_array, [dnl
+	       newlib_cv_initfinit_array, [dnl
 cat > conftest.c <<EOF
 int _start (void) { return 0; }
 int __start (void) { return 0; }
@@ -648,33 +648,33 @@ if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest conftest.c
 							1>&AS_MESSAGE_LOG_FD])
 then
   if ${READELF} -S conftest | grep -e INIT_ARRAY > /dev/null; then
-    libc_cv_initfinit_array=yes
+    newlib_cv_initfinit_array=yes
   else
-    libc_cv_initfinit_array=no
+    newlib_cv_initfinit_array=no
   fi
 else
-  libc_cv_initfinit_array=no
+  newlib_cv_initfinit_array=no
 fi
 rm -f conftest*])
-if test $libc_cv_initfinit_array = yes; then
+if test $newlib_cv_initfinit_array = yes; then
   AC_DEFINE(_HAVE_INITFINI_ARRAY, 1, [Define if the linker supports .preinit_array/.init_array/.fini_array sections.])
 fi
 
 AC_CACHE_CHECK(if $CC accepts -fno-tree-loop-distribute-patterns with \
-__attribute__ ((__optimize__)), libc_cv_cc_loop_to_function, [dnl
+__attribute__ ((__optimize__)), newlib_cv_cc_loop_to_function, [dnl
 cat > conftest.c <<EOF
 void
 __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
 foo (void) {}
 EOF
-libc_cv_cc_loop_to_function=no
+newlib_cv_cc_loop_to_function=no
 if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c
 			    -fno-tree-loop-distribute-patterns conftest.c])
 then
-  libc_cv_cc_loop_to_function=yes
+  newlib_cv_cc_loop_to_function=yes
 fi
 rm -f conftest*])
-if test $libc_cv_cc_loop_to_function = yes; then
+if test $newlib_cv_cc_loop_to_function = yes; then
   AC_DEFINE(_HAVE_CC_INHIBIT_LOOP_TO_LIBCALL, 1, [Define if compiler supports -fno-tree-loop-distribute-patterns.])
 fi
 
diff --git a/newlib/configure.host b/newlib/configure.host
index bf4a555e6da7..893a698ed6d9 100644
--- a/newlib/configure.host
+++ b/newlib/configure.host
@@ -126,7 +126,7 @@ case "${host_cpu}" in
   amdgcn*)
 	newlib_cflags="${newlib_cflags} -D__DYNAMIC_REENT__"
 	machine_dir=amdgcn
-	libc_cv_initfinit_array=yes
+	newlib_cv_initfinit_array=yes
 	;;
   arc*)
 	machine_dir=arc
-- 
2.34.1


  reply	other threads:[~2022-02-02  2:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28  9:44 newlib_cv_ vs libc_cv_ autoconf cache vars prefix Mike Frysinger
2022-01-31 14:17 ` Corinna Vinschen
2022-02-01  3:12   ` Mike Frysinger
2022-02-01 14:55     ` Corinna Vinschen
2022-02-02  2:52 ` [PATCH 1/2] newlib: drop unused cache vars from Makefiles Mike Frysinger
2022-02-02  2:52   ` Mike Frysinger [this message]
2022-02-03 12:08   ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220202025256.32179-2-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).