about summary refs log tree commit diff
path: root/sysdeps/m68k/preconfigure
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2014-02-10 20:05:01 +0100
committerAndreas Schwab <schwab@linux-m68k.org>2014-02-10 20:22:40 +0100
commit73588a7223bec40d652fd4c75f1cb4772c5d2612 (patch)
treedfc1f1965e78e62e611199d91c482d1b76ff109d /sysdeps/m68k/preconfigure
parent87569616d27a2c742f87b5dbcac2f2e3437fd874 (diff)
downloadglibc-73588a7223bec40d652fd4c75f1cb4772c5d2612.tar.gz
glibc-73588a7223bec40d652fd4c75f1cb4772c5d2612.tar.xz
glibc-73588a7223bec40d652fd4c75f1cb4772c5d2612.zip
Move m68k from ports to libc
Diffstat (limited to 'sysdeps/m68k/preconfigure')
-rw-r--r--sysdeps/m68k/preconfigure17
1 files changed, 17 insertions, 0 deletions
diff --git a/sysdeps/m68k/preconfigure b/sysdeps/m68k/preconfigure
new file mode 100644
index 0000000000..94fc1aabc2
--- /dev/null
+++ b/sysdeps/m68k/preconfigure
@@ -0,0 +1,17 @@
+# 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
+		  echo >&2 "Cannot determine m68k processor variant"
+		  exit 1
+		fi
+		base_machine=m68k machine=m68k/$variant ;;
+esac