public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Maciej W. Rozycki <macro@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] m68k: Use an autoconf template to produce `preconfigure'
Date: Fri, 13 May 2022 16:10:23 +0000 (GMT)	[thread overview]
Message-ID: <20220513161023.784263856DF7@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=fe7dd93db3a5ea9246cf32dc713995e78fcaffb9

commit fe7dd93db3a5ea9246cf32dc713995e78fcaffb9
Author: Maciej W. Rozycki <macro@embecosm.com>
Date:   Fri May 13 17:07:23 2022 +0100

    m68k: Use an autoconf template to produce `preconfigure'
    
    Switch to using AC_MSG_ERROR rather than `echo' and `exit' directly for
    error handling.  Owing to the lack of any kind of error annotation it
    makes it difficult to spot the message in the flood in a parallel build
    and neither it is logged in `config.log'.

Diff:
---
 sysdeps/m68k/preconfigure    |  6 ++++--
 sysdeps/m68k/preconfigure.ac | 23 +++++++++++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/sysdeps/m68k/preconfigure b/sysdeps/m68k/preconfigure
index 1028dac080..b1c4d11091 100644
--- a/sysdeps/m68k/preconfigure
+++ b/sysdeps/m68k/preconfigure
@@ -1,3 +1,6 @@
+# This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
+# Local preconfigure fragment for sysdeps/m68k
+
 # This fragment canonicalizes the machine names for m68k variants.
 
 case "$machine" in
@@ -10,8 +13,7 @@ m68k)		variant=`(echo "#ifdef __mcoldfire__"
 			 $CC $CFLAGS $CPPFLAGS -E - |
 			 grep '^[a-z]'`
 		if test -z "$variant"; then
-		  echo >&2 "Cannot determine m68k processor variant"
-		  exit 1
+		  as_fn_error 1 "Cannot determine m68k processor variant" "$LINENO" 5
 		fi
 		base_machine=m68k machine=m68k/$variant
 		if test "$variant" = "coldfire"; then
diff --git a/sysdeps/m68k/preconfigure.ac b/sysdeps/m68k/preconfigure.ac
new file mode 100644
index 0000000000..1b0c1370a6
--- /dev/null
+++ b/sysdeps/m68k/preconfigure.ac
@@ -0,0 +1,23 @@
+GLIBC_PROVIDES[]dnl See aclocal.m4 in the top level source directory.
+# Local preconfigure fragment for sysdeps/m68k
+
+# This fragment canonicalizes the machine names for m68k variants.
+
+case "$machine" in
+m680?0)		base_machine=m68k machine=m68k/m680x0/$machine ;;
+m68k)		variant=`(echo "#ifdef __mcoldfire__"
+			  echo "coldfire"
+			  echo "#else"
+			  echo "m680x0/m68020"
+			  echo "#endif") |
+			 $CC $CFLAGS $CPPFLAGS -E - |
+			 grep '^[[a-z]]'`
+		if test -z "$variant"; then
+		  AC_MSG_ERROR([Cannot determine m68k processor variant], [1])
+		fi
+		base_machine=m68k machine=m68k/$variant
+		if test "$variant" = "coldfire"; then
+		  with_fp_cond="defined __mcffpu__"
+		fi
+		;;
+esac


                 reply	other threads:[~2022-05-13 16:10 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=20220513161023.784263856DF7@sourceware.org \
    --to=macro@sourceware.org \
    --cc=glibc-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).