public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Michael Frysinger <vapier@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] libnosys: update autoheader usage
Date: Sat,  8 Jan 2022 01:43:31 +0000 (GMT)	[thread overview]
Message-ID: <20220108014331.226D23858421@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=8c57b8b2b4c4f82e8cca6c4c6d8ac8a1c05fe8a9

commit 8c57b8b2b4c4f82e8cca6c4c6d8ac8a1c05fe8a9
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Fri Jan 7 01:34:44 2022 -0500

    libnosys: update autoheader usage
    
    The use of acconfig.h templates is deprecated, so migrate away from it
    by moving the description text to configure.ac.

Diff:
---
 libgloss/libnosys/acconfig.h   | 26 --------------------------
 libgloss/libnosys/config.h.in  | 36 +++++++++++++++++++++++++++---------
 libgloss/libnosys/configure    | 26 ++++++++++++++------------
 libgloss/libnosys/configure.ac | 20 ++++++++------------
 4 files changed, 49 insertions(+), 59 deletions(-)

diff --git a/libgloss/libnosys/acconfig.h b/libgloss/libnosys/acconfig.h
deleted file mode 100644
index c6df5d5ae..000000000
--- a/libgloss/libnosys/acconfig.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Name of package.  */
-#undef PACKAGE
-
-/* Version of package.  */
-#undef VERSION
-
-/* Missing syscall names */
-#undef MISSING_SYSCALL_NAMES
-
-/* Using ELF format */
-#undef HAVE_ELF
-
-/* Using GNU LD */
-#undef HAVE_GNU_LD
-
-/* .previous directive allowed */
-#undef HAVE_ASM_PREVIOUS_DIRECTIVE
-
-/* .pushsection/.popsection directives allowed */
-#undef HAVE_ASM_POPSECTION_DIRECTIVE
-
-/* support for section attributes */
-#undef HAVE_SECTION_ATTRIBUTES
-
-/* symbol prefix */
-#undef __SYMBOL_PREFIX
diff --git a/libgloss/libnosys/config.h.in b/libgloss/libnosys/config.h.in
index f7fe3fef4..378cec1ee 100644
--- a/libgloss/libnosys/config.h.in
+++ b/libgloss/libnosys/config.h.in
@@ -1,7 +1,10 @@
-/* config.h.in.  Generated automatically from configure.in by autoheader.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
 
-/* Missing syscall names */
-#undef MISSING_SYSCALL_NAMES
+/* .pushsection/.popsection directives allowed */
+#undef HAVE_ASM_POPSECTION_DIRECTIVE
+
+/* .previous directive allowed */
+#undef HAVE_ASM_PREVIOUS_DIRECTIVE
 
 /* Using ELF format */
 #undef HAVE_ELF
@@ -9,14 +12,29 @@
 /* Using GNU LD */
 #undef HAVE_GNU_LD
 
-/* .previous directive allowed */
-#undef HAVE_ASM_PREVIOUS_DIRECTIVE
-
-/* .pushsection/.popsection directives allowed */
-#undef HAVE_ASM_POPSECTION_DIRECTIVE
-
 /* support for section attributes */
 #undef HAVE_SECTION_ATTRIBUTES
 
+/* Missing syscall names */
+#undef MISSING_SYSCALL_NAMES
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
 /* symbol prefix */
 #undef __SYMBOL_PREFIX
diff --git a/libgloss/libnosys/configure b/libgloss/libnosys/configure
index 4067b9ed2..fe8244703 100755
--- a/libgloss/libnosys/configure
+++ b/libgloss/libnosys/configure
@@ -2023,6 +2023,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 
+
 $as_echo "#define HAVE_GNU_LD 1" >>confdefs.h
 
 case "${target}" in
@@ -2073,14 +2074,16 @@ case "${target}" in
   z8k-*-*)
 	;;
   *)
-	$as_echo "#define MISSING_SYSCALL_NAMES 1" >>confdefs.h
+
+$as_echo "#define MISSING_SYSCALL_NAMES 1" >>confdefs.h
 
 	;;
 esac
 
 case "${target}" in
   *-*-elf)
-        $as_echo "#define HAVE_ELF 1" >>confdefs.h
+
+$as_echo "#define HAVE_ELF 1" >>confdefs.h
 
 
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for .previous assembler directive" >&5
@@ -2107,7 +2110,8 @@ fi
 $as_echo "$libc_cv_asm_previous_directive" >&6; }
 
 	if test "x${libc_cv_asm_previous_directive}" = "xyes"; then
-          $as_echo "#define HAVE_ASM_PREVIOUS_DIRECTIVE 1" >>confdefs.h
+
+$as_echo "#define HAVE_ASM_PREVIOUS_DIRECTIVE 1" >>confdefs.h
 
 	fi
 
@@ -2135,7 +2139,8 @@ fi
 $as_echo "$libc_cv_asm_popsection_directive" >&6; }
 
 	if test "x${libc_cv_asm_popsection_directive}" = "xyes"; then
-          $as_echo "#define HAVE_ASM_POPSECTION_DIRECTIVE 1" >>confdefs.h
+
+$as_echo "#define HAVE_ASM_POPSECTION_DIRECTIVE 1" >>confdefs.h
 
 	fi
 
@@ -2162,7 +2167,8 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_section_attributes" >&5
 $as_echo "$libc_cv_section_attributes" >&6; }
 	if test "x${libc_cv_section_attributes}" = "xyes"; then
-          $as_echo "#define HAVE_SECTION_ATTRIBUTES 1" >>confdefs.h
+
+$as_echo "#define HAVE_SECTION_ATTRIBUTES 1" >>confdefs.h
 
 	fi
         ;;
@@ -2176,7 +2182,7 @@ else
   cat > conftest.c <<\EOF
 foo () { }
 EOF
-libc_cv_symbol_prefix=none
+libc_cv_symbol_prefix=''
 if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo" > /dev/null'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
   (eval $ac_try) 2>&5
@@ -2200,15 +2206,11 @@ rm -f conftest*
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_symbol_prefix" >&5
 $as_echo "$libc_cv_symbol_prefix" >&6; }
-if test $libc_cv_symbol_prefix != none; then
-  cat >>confdefs.h <<_ACEOF
+
+cat >>confdefs.h <<_ACEOF
 #define __SYMBOL_PREFIX "$libc_cv_symbol_prefix"
 _ACEOF
 
-else
-  $as_echo "#define __SYMBOL_PREFIX \"\"" >>confdefs.h
-
-fi
 
 rm -rf .tst 2>/dev/null
 mkdir .tst 2>/dev/null
diff --git a/libgloss/libnosys/configure.ac b/libgloss/libnosys/configure.ac
index eb9d1dd0e..28b494516 100644
--- a/libgloss/libnosys/configure.ac
+++ b/libgloss/libnosys/configure.ac
@@ -36,7 +36,7 @@ AC_ARG_PROGRAM
 
 AC_PROG_INSTALL
 
-AC_DEFINE(HAVE_GNU_LD)
+AC_DEFINE(HAVE_GNU_LD, 1, [Using GNU LD])
 dnl Make sure syscall names match those being used by newlib
 case "${target}" in
   *-*-cygwin*)
@@ -86,14 +86,14 @@ case "${target}" in
   z8k-*-*)
 	;;
   *)
-	AC_DEFINE(MISSING_SYSCALL_NAMES)
+	AC_DEFINE(MISSING_SYSCALL_NAMES, 1, [Missing syscall names])
 	;;
 esac
 
 dnl Make sure we know if elf format used
 case "${target}" in
   *-*-elf)
-        AC_DEFINE(HAVE_ELF)
+        AC_DEFINE(HAVE_ELF, 1, [Using ELF format])
 
         AC_CACHE_CHECK([for .previous assembler directive],
                          libc_cv_asm_previous_directive, [dnl
@@ -108,7 +108,7 @@ EOF
         rm -f conftest*])
 
 	if test "x${libc_cv_asm_previous_directive}" = "xyes"; then
-          AC_DEFINE(HAVE_ASM_PREVIOUS_DIRECTIVE)
+          AC_DEFINE(HAVE_ASM_PREVIOUS_DIRECTIVE, 1, [.previous directive allowed])
 	fi
 
         AC_CACHE_CHECK([for .popsection assembler directive],
@@ -124,7 +124,7 @@ EOF
         rm -f conftest*])
 
 	if test "x${libc_cv_asm_popsection_directive}" = "xyes"; then
-          AC_DEFINE(HAVE_ASM_POPSECTION_DIRECTIVE)
+          AC_DEFINE(HAVE_ASM_POPSECTION_DIRECTIVE, 1, [.pushsection/.popsection directives allowed])
 	fi
 
         AC_CACHE_CHECK([for section attributes],
@@ -139,7 +139,7 @@ EOF
         fi
         rm -f conftest*])
 	if test "x${libc_cv_section_attributes}" = "xyes"; then
-          AC_DEFINE(HAVE_SECTION_ATTRIBUTES)
+          AC_DEFINE(HAVE_SECTION_ATTRIBUTES, 1, [support for section attributes])
 	fi
         ;;
 esac
@@ -149,7 +149,7 @@ cat > conftest.c <<\EOF
 foo () { }
 EOF
 dnl
-libc_cv_symbol_prefix=none
+libc_cv_symbol_prefix=''
 if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep "\$foo" > /dev/null]);
 then
   libc_cv_symbol_prefix='$'
@@ -160,11 +160,7 @@ else
   fi
 fi
 rm -f conftest* ])
-if test $libc_cv_symbol_prefix != none; then
-  AC_DEFINE_UNQUOTED(__SYMBOL_PREFIX, "$libc_cv_symbol_prefix")
-else
-  AC_DEFINE(__SYMBOL_PREFIX, "")
-fi
+AC_DEFINE_UNQUOTED(__SYMBOL_PREFIX, "$libc_cv_symbol_prefix", [symbol prefix])
 
 LIB_AC_PROG_CC
 AS=${AS-as}


                 reply	other threads:[~2022-01-08  1:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220108014331.226D23858421@sourceware.org \
    --to=vapier@sourceware.org \
    --cc=newlib-cvs@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).