diff options
author | Maciej W. Rozycki <macro@embecosm.com> | 2022-05-13 17:07:23 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@embecosm.com> | 2022-05-13 17:07:23 +0100 |
commit | fe7dd93db3a5ea9246cf32dc713995e78fcaffb9 (patch) | |
tree | 4e709fe674c6e2be4acb50d2f26d32de109d6207 /sysdeps/m68k/preconfigure.ac | |
parent | 7c20479d082eb85ac1179df0411ef3e4a0634298 (diff) | |
download | glibc-fe7dd93db3a5ea9246cf32dc713995e78fcaffb9.tar.gz glibc-fe7dd93db3a5ea9246cf32dc713995e78fcaffb9.tar.xz glibc-fe7dd93db3a5ea9246cf32dc713995e78fcaffb9.zip |
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'.
Diffstat (limited to 'sysdeps/m68k/preconfigure.ac')
-rw-r--r-- | sysdeps/m68k/preconfigure.ac | 23 |
1 files changed, 23 insertions, 0 deletions
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 |