* newlib_cv_ vs libc_cv_ autoconf cache vars prefix @ 2022-01-28 9:44 Mike Frysinger 2022-01-31 14:17 ` Corinna Vinschen 2022-02-02 2:52 ` [PATCH 1/2] newlib: drop unused cache vars from Makefiles Mike Frysinger 0 siblings, 2 replies; 7+ messages in thread From: Mike Frysinger @ 2022-01-28 9:44 UTC (permalink / raw) To: newlib [-- Attachment #1: Type: text/plain, Size: 458 bytes --] the newlib/libgloss configure scripts use both libc_cv_ and newlib_cv_ as their autoconf cache var prefixes. this really should be just one name. i'm inclined to use newlib_cv_ rather than the more generic libc_cv_. any preferences or reasons to pick one or the other ? libgloss also has cache vars. i'm inclined to have it use newlib_cv_ too since, as a project, it's carved out the namespace, and doesn't really need its own libgloss_cv_ prefix. -mike [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: newlib_cv_ vs libc_cv_ autoconf cache vars prefix 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-02 2:52 ` [PATCH 1/2] newlib: drop unused cache vars from Makefiles Mike Frysinger 1 sibling, 1 reply; 7+ messages in thread From: Corinna Vinschen @ 2022-01-31 14:17 UTC (permalink / raw) To: newlib On Jan 28 04:44, Mike Frysinger wrote: > the newlib/libgloss configure scripts use both libc_cv_ and newlib_cv_ as > their autoconf cache var prefixes. this really should be just one name. > i'm inclined to use newlib_cv_ rather than the more generic libc_cv_. any > preferences or reasons to pick one or the other ? > > libgloss also has cache vars. i'm inclined to have it use newlib_cv_ too > since, as a project, it's carved out the namespace, and doesn't really need > its own libgloss_cv_ prefix. > -mike AFAICS, only six libc_cv_* and two newlib_cv_* vars exist at all, and only two of the libc_cv_* vars are AC_SUBST'ed and show up in the Makefile. Using the same prefix for all vars, it would be the smaller change to switch the 2 newlib_cv's to libc_cv. The result would be the same. Corinna ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: newlib_cv_ vs libc_cv_ autoconf cache vars prefix 2022-01-31 14:17 ` Corinna Vinschen @ 2022-02-01 3:12 ` Mike Frysinger 2022-02-01 14:55 ` Corinna Vinschen 0 siblings, 1 reply; 7+ messages in thread From: Mike Frysinger @ 2022-02-01 3:12 UTC (permalink / raw) To: newlib [-- Attachment #1: Type: text/plain, Size: 1152 bytes --] On 31 Jan 2022 15:17, Corinna Vinschen wrote: > On Jan 28 04:44, Mike Frysinger wrote: > > the newlib/libgloss configure scripts use both libc_cv_ and newlib_cv_ as > > their autoconf cache var prefixes. this really should be just one name. > > i'm inclined to use newlib_cv_ rather than the more generic libc_cv_. any > > preferences or reasons to pick one or the other ? > > > > libgloss also has cache vars. i'm inclined to have it use newlib_cv_ too > > since, as a project, it's carved out the namespace, and doesn't really need > > its own libgloss_cv_ prefix. > > AFAICS, only six libc_cv_* and two newlib_cv_* vars exist at all, and only > two of the libc_cv_* vars are AC_SUBST'ed and show up in the Makefile. > Using the same prefix for all vars, it would be the smaller change to > switch the 2 newlib_cv's to libc_cv. The result would be the same. the reason i'm not a fan of libc_cv is that glibc uses that namespace. if you want to setup a config.site cache for a target that builds glibc & newlib, then it's hard to avoid namespace conflicts. but if we use newlib_cv_, then there's no such collision. -mike [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: newlib_cv_ vs libc_cv_ autoconf cache vars prefix 2022-02-01 3:12 ` Mike Frysinger @ 2022-02-01 14:55 ` Corinna Vinschen 0 siblings, 0 replies; 7+ messages in thread From: Corinna Vinschen @ 2022-02-01 14:55 UTC (permalink / raw) To: newlib On Jan 31 22:12, Mike Frysinger wrote: > On 31 Jan 2022 15:17, Corinna Vinschen wrote: > > On Jan 28 04:44, Mike Frysinger wrote: > > > the newlib/libgloss configure scripts use both libc_cv_ and newlib_cv_ as > > > their autoconf cache var prefixes. this really should be just one name. > > > i'm inclined to use newlib_cv_ rather than the more generic libc_cv_. any > > > preferences or reasons to pick one or the other ? > > > > > > libgloss also has cache vars. i'm inclined to have it use newlib_cv_ too > > > since, as a project, it's carved out the namespace, and doesn't really need > > > its own libgloss_cv_ prefix. > > > > AFAICS, only six libc_cv_* and two newlib_cv_* vars exist at all, and only > > two of the libc_cv_* vars are AC_SUBST'ed and show up in the Makefile. > > Using the same prefix for all vars, it would be the smaller change to > > switch the 2 newlib_cv's to libc_cv. The result would be the same. > > the reason i'm not a fan of libc_cv is that glibc uses that namespace. if you > want to setup a config.site cache for a target that builds glibc & newlib, then > it's hard to avoid namespace conflicts. but if we use newlib_cv_, then there's > no such collision. > -mike Good point. Feel free to make the change. Corinna ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] newlib: drop unused cache vars from Makefiles 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-02 2:52 ` Mike Frysinger 2022-02-02 2:52 ` [PATCH 2/2] newlib: rename libc_cv_ prefix to newlib_cv_ Mike Frysinger 2022-02-03 12:08 ` [PATCH 1/2] newlib: drop unused cache vars from Makefiles Corinna Vinschen 1 sibling, 2 replies; 7+ messages in thread From: Mike Frysinger @ 2022-02-02 2:52 UTC (permalink / raw) To: newlib These aren't used in any of the makefiles, so there's no point in exporting these. These are only checked in the configure script. --- newlib/Makefile.in | 2 -- newlib/configure | 8 ++------ newlib/configure.ac | 2 -- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/newlib/Makefile.in b/newlib/Makefile.in index d2a0d4422f9a..5d49279ce48b 100644 --- a/newlib/Makefile.in +++ b/newlib/Makefile.in @@ -407,8 +407,6 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -libc_cv_cc_loop_to_function = @libc_cv_cc_loop_to_function@ -libc_cv_initfinit_array = @libc_cv_initfinit_array@ libdir = @libdir@ libexecdir = @libexecdir@ libm_machine_dir = @libm_machine_dir@ diff --git a/newlib/configure b/newlib/configure index 65b93630315e..ca8953933cda 100755 --- a/newlib/configure +++ b/newlib/configure @@ -636,8 +636,6 @@ LTLIBOBJS LIBOBJS HAVE_LONG_DOUBLE_FALSE HAVE_LONG_DOUBLE_TRUE -libc_cv_cc_loop_to_function -libc_cv_initfinit_array NEWLIB_PATCHLEVEL_VERSION NEWLIB_MINOR_VERSION NEWLIB_MAJOR_VERSION @@ -12008,7 +12006,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12011 "configure" +#line 12009 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12114,7 +12112,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12117 "configure" +#line 12115 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13300,7 +13298,6 @@ 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 "#define _HAVE_INITFINI_ARRAY 1" >>confdefs.h @@ -13341,7 +13338,6 @@ $as_echo "#define _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5 $as_echo_n "checking for long double... " >&6; } if ${ac_cv_type_long_double+:} false; then : diff --git a/newlib/configure.ac b/newlib/configure.ac index c164e5a6494f..ce36ea19ac10 100644 --- a/newlib/configure.ac +++ b/newlib/configure.ac @@ -656,7 +656,6 @@ else libc_cv_initfinit_array=no fi rm -f conftest*]) -AC_SUBST(libc_cv_initfinit_array) if test $libc_cv_initfinit_array = yes; then AC_DEFINE(_HAVE_INITFINI_ARRAY, 1, [Define if the linker supports .preinit_array/.init_array/.fini_array sections.]) fi @@ -678,7 +677,6 @@ rm -f conftest*]) if test $libc_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 -AC_SUBST(libc_cv_cc_loop_to_function) AC_TYPE_LONG_DOUBLE dnl Export the setting for our installed headers to check. -- 2.34.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] newlib: rename libc_cv_ prefix to newlib_cv_ 2022-02-02 2:52 ` [PATCH 1/2] newlib: drop unused cache vars from Makefiles Mike Frysinger @ 2022-02-02 2:52 ` Mike Frysinger 2022-02-03 12:08 ` [PATCH 1/2] newlib: drop unused cache vars from Makefiles Corinna Vinschen 1 sibling, 0 replies; 7+ messages in thread From: Mike Frysinger @ 2022-02-02 2:52 UTC (permalink / raw) To: newlib 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] newlib: drop unused cache vars from Makefiles 2022-02-02 2:52 ` [PATCH 1/2] newlib: drop unused cache vars from Makefiles Mike Frysinger 2022-02-02 2:52 ` [PATCH 2/2] newlib: rename libc_cv_ prefix to newlib_cv_ Mike Frysinger @ 2022-02-03 12:08 ` Corinna Vinschen 1 sibling, 0 replies; 7+ messages in thread From: Corinna Vinschen @ 2022-02-03 12:08 UTC (permalink / raw) To: newlib On Feb 1 21:52, Mike Frysinger wrote: > These aren't used in any of the makefiles, so there's no point in > exporting these. These are only checked in the configure script. > --- > newlib/Makefile.in | 2 -- > newlib/configure | 8 ++------ > newlib/configure.ac | 2 -- > 3 files changed, 2 insertions(+), 10 deletions(-) Cover letter? Pleeeeeease? Patchset is ok to push. Thanks, Corinna ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-02-03 12:08 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 ` [PATCH 2/2] newlib: rename libc_cv_ prefix to newlib_cv_ Mike Frysinger 2022-02-03 12:08 ` [PATCH 1/2] newlib: drop unused cache vars from Makefiles Corinna Vinschen
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).