Module Name: src
Committed By: matt
Date: Sat Oct 26 18:07:52 UTC 2013
Modified Files:
src/sys/arch/arm/include: param.h
Log Message:
Use CPP symbols to determine the right MACHINE_ARCH
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/include/param.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/include/param.h
diff -u src/sys/arch/arm/include/param.h:1.18 src/sys/arch/arm/include/param.h:1.19
--- src/sys/arch/arm/include/param.h:1.18 Mon Apr 22 07:53:29 2013
+++ src/sys/arch/arm/include/param.h Sat Oct 26 18:07:52 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.18 2013/04/22 07:53:29 matt Exp $ */
+/* $NetBSD: param.h,v 1.19 2013/10/26 18:07:52 matt Exp $ */
/*
* Copyright (c) 1994,1995 Mark Brinicombe.
@@ -80,16 +80,64 @@
# define MACHINE "arm"
# ifndef __ARMEB__
# ifdef __ARM_EABI__
-# define _MACHINE_ARCH earm
-# define MACHINE_ARCH "earm"
+# ifdef __ARM_PCS_VFP
+# ifdef _ARM_ARCH_7
+# define _MACHINE_ARCH earmv7hf
+# define MACHINE_ARCH "earmv7hf"
+# elif defined(_ARM_ARCH_6)
+# define _MACHINE_ARCH earmv6hf
+# define MACHINE_ARCH "earmv6hf"
+# else
+# define _MACHINE_ARCH earmhf
+# define MACHINE_ARCH "earmhf"
+# endif
+# else
+# ifdef _ARM_ARCH_7
+# define _MACHINE_ARCH earmv7
+# define MACHINE_ARCH "earmv7"
+# elif defined(_ARM_ARCH_6)
+# define _MACHINE_ARCH earmv6
+# define MACHINE_ARCH "earmv6"
+# elif !defined(_ARM_ARCH_5T)
+# define _MACHINE_ARCH earmv4
+# define MACHINE_ARCH "earmv4"
+# else
+# define _MACHINE_ARCH earm
+# define MACHINE_ARCH "earm"
+# endif
+# endif
# else
# define _MACHINE_ARCH arm
# define MACHINE_ARCH "arm"
# endif
# else
# ifdef __ARM_EABI__
-# define _MACHINE_ARCH earmeb
-# define MACHINE_ARCH "earmeb"
+# ifdef __ARM_PCS_VFP
+# ifdef _ARM_ARCH_7
+# define _MACHINE_ARCH earmv7hfeb
+# define MACHINE_ARCH "earmv7hfeb"
+# elif defined(_ARM_ARCH_6)
+# define _MACHINE_ARCH earmv6hfeb
+# define MACHINE_ARCH "earmv6hfeb"
+# else
+# define _MACHINE_ARCH earmhfeb
+# define MACHINE_ARCH "earmhfeb"
+# endif
+# else
+# ifdef _ARM_ARCH_7
+# define _MACHINE_ARCH earmv7eb
+# define MACHINE_ARCH "earmv7eb"
+# elif defined(_ARM_ARCH_6)
+# define _MACHINE_ARCH earmv6eb
+# define MACHINE_ARCH "earmv6eb"
+# elif !defined(_ARM_ARCH_5T)
+# define _MACHINE_ARCH earmv4eb
+# define MACHINE_ARCH "earmv4eb"
+# else
+# define _MACHINE_ARCH earmeb
+# define MACHINE_ARCH "earmeb"
+# endif
+# endif
# else
# define _MACHINE_ARCH armeb
# define MACHINE_ARCH "armeb"