Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch * For platforms which are already ELF, remove the d...



details:   https://anonhg.NetBSD.org/src/rev/483154b9479c
branches:  trunk
changeset: 522189:483154b9479c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Feb 12 06:58:18 2002 +0000

description:
* For platforms which are already ELF, remove the definition of
  MACHINE_ARCH since <arm/param.h> already sets it correctly to "arm".
* For platforms which are not yet ELF, defined MACHINE_ARCH to "arm32"
  if __ELF__ is not defined by the C preprocessor.
* In <arm/param.h>, clarify the rules about when MACHINE and
  MACHINE_ARCH are defined, and to what.  Also, for ELF platforms,
  int the non-_KERNEL case, force both MACHINE and MACHINE_ARCH to "arm",
  rather than allowing platform-specifc code to define either.

diffstat:

 sys/arch/acorn32/include/param.h   |   4 +++-
 sys/arch/arm/include/param.h       |  32 +++++++++++++++++++++-----------
 sys/arch/arm26/include/param.h     |   4 +---
 sys/arch/cats/include/param.h      |   4 +++-
 sys/arch/evbarm/include/param.h    |   4 +---
 sys/arch/hpcarm/include/param.h    |   4 +---
 sys/arch/netwinder/include/param.h |   4 +---
 sys/arch/shark/include/param.h     |   9 +++------
 8 files changed, 34 insertions(+), 31 deletions(-)

diffs (189 lines):

diff -r 75ade0a130a3 -r 483154b9479c sys/arch/acorn32/include/param.h
--- a/sys/arch/acorn32/include/param.h  Tue Feb 12 06:39:10 2002 +0000
+++ b/sys/arch/acorn32/include/param.h  Tue Feb 12 06:58:18 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.4 2001/11/18 13:10:57 bjh21 Exp $  */
+/*     $NetBSD: param.h,v 1.5 2002/02/12 06:58:18 thorpej Exp $        */
 
 /*
  * Copyright (c) 1994,1995 Mark Brinicombe.
@@ -41,8 +41,10 @@
 
 #define        _MACHINE        acorn32
 #define        MACHINE         "acorn32"
+#ifndef __ELF__
 #define        _MACHINE_ARCH   arm32
 #define        MACHINE_ARCH    "arm32"
+#endif /* ! __ELF__ */
 
 #include <arm/arm32/param.h>
 
diff -r 75ade0a130a3 -r 483154b9479c sys/arch/arm/include/param.h
--- a/sys/arch/arm/include/param.h      Tue Feb 12 06:39:10 2002 +0000
+++ b/sys/arch/arm/include/param.h      Tue Feb 12 06:58:18 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.4 2001/08/07 22:54:00 bjh21 Exp $  */
+/*     $NetBSD: param.h,v 1.5 2002/02/12 06:58:19 thorpej Exp $        */
 
 /*
  * Copyright (c) 1994,1995 Mark Brinicombe.
@@ -41,22 +41,32 @@
 
 /*
  * For KERNEL code:
- *     MACHINE must be defined by the individual port.
- *     MACHINE_ARCH may be defined by an individual port.
+ *     MACHINE must be defined by the individual port.  This is so that
+ *     uname returns the correct thing, etc.
+ *
+ *     MACHINE_ARCH may be defined by individual ports as a temporary
+ *     measure while we're finishing the conversion to ELF.
  *
  * For non-KERNEL code:
- *     MACHINE && MACHINE_ARCH default to "arm"
+ *     If ELF, MACHINE and MACHINE_ARCH are forced to "arm".
  */
 
-#ifndef _KERNEL
-#ifndef MACHINE
-#define        MACHINE         "arm"
-#endif
-#endif /* !_KERNEL */
-
-#ifndef MACHINE_ARCH
+#if defined(_KERNEL)
+#ifndef MACHINE_ARCH                   /* XXX For now */
+#define        _MACHINE_ARCH   arm
 #define        MACHINE_ARCH    "arm"
 #endif
+#elif defined(__ELF__)
+#undef _MACHINE
+#define        _MACHINE        arm
+#undef MACHINE
+#define        MACHINE         "arm"
+
+#undef _MACHINE_ARCH
+#define        _MACHINE_ARCH   arm
+#undef MACHINE_ARCH
+#define        MACHINE_ARCH    "arm"
+#endif /* _KERNEL */
 
 #define        MID_MACHINE     MID_ARM6
 
diff -r 75ade0a130a3 -r 483154b9479c sys/arch/arm26/include/param.h
--- a/sys/arch/arm26/include/param.h    Tue Feb 12 06:39:10 2002 +0000
+++ b/sys/arch/arm26/include/param.h    Tue Feb 12 06:58:18 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.13 2001/10/21 14:19:34 bjh21 Exp $ */
+/*     $NetBSD: param.h,v 1.14 2002/02/12 06:58:19 thorpej Exp $       */
 
 /*
  * Copyright (c) 1994,1995 Mark Brinicombe.
@@ -42,8 +42,6 @@
 
 #define        _MACHINE        arm26
 #define        MACHINE         "arm26"
-#define        _MACHINE_ARCH   arm
-#define        MACHINE_ARCH    "arm"
 
 #define POOL_SUBPAGE 4096
 
diff -r 75ade0a130a3 -r 483154b9479c sys/arch/cats/include/param.h
--- a/sys/arch/cats/include/param.h     Tue Feb 12 06:39:10 2002 +0000
+++ b/sys/arch/cats/include/param.h     Tue Feb 12 06:58:18 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.3 2001/06/12 18:02:20 matt Exp $   */
+/*     $NetBSD: param.h,v 1.4 2002/02/12 06:58:19 thorpej Exp $        */
 
 /*
  * Copyright (c) 1994,1995 Mark Brinicombe.
@@ -41,8 +41,10 @@
 
 #define        _MACHINE        cats
 #define        MACHINE         "cats"
+#ifndef __ELF__
 #define        _MACHINE_ARCH   arm32
 #define        MACHINE_ARCH    "arm32"
+#endif /* __ELF__ */
 
 #include <arm/arm32/param.h>
 
diff -r 75ade0a130a3 -r 483154b9479c sys/arch/evbarm/include/param.h
--- a/sys/arch/evbarm/include/param.h   Tue Feb 12 06:39:10 2002 +0000
+++ b/sys/arch/evbarm/include/param.h   Tue Feb 12 06:58:18 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.1 2001/09/05 04:53:40 matt Exp $   */
+/*     $NetBSD: param.h,v 1.2 2002/02/12 06:58:19 thorpej Exp $        */
 
 /*
  * Copyright (c) 1994,1995 Mark Brinicombe.
@@ -41,8 +41,6 @@
 
 #define        _MACHINE        evbarm
 #define        MACHINE         "evbarm"
-#define        _MACHINE_ARCH   arm
-#define        MACHINE_ARCH    "arm"
 
 #include <arm/arm32/param.h>
 
diff -r 75ade0a130a3 -r 483154b9479c sys/arch/hpcarm/include/param.h
--- a/sys/arch/hpcarm/include/param.h   Tue Feb 12 06:39:10 2002 +0000
+++ b/sys/arch/hpcarm/include/param.h   Tue Feb 12 06:58:18 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.4 2001/03/04 08:28:52 matt Exp $   */
+/*     $NetBSD: param.h,v 1.5 2002/02/12 06:58:20 thorpej Exp $        */
 
 /*
  * Copyright (c) 1994,1995 Mark Brinicombe.
@@ -41,8 +41,6 @@
 
 #define        _MACHINE        hpcarm
 #define        MACHINE         "hpcarm"
-#define        _MACHINE_ARCH   arm
-#define        MACHINE_ARCH    "arm"
 
 #include <arm/arm32/param.h>
 
diff -r 75ade0a130a3 -r 483154b9479c sys/arch/netwinder/include/param.h
--- a/sys/arch/netwinder/include/param.h        Tue Feb 12 06:39:10 2002 +0000
+++ b/sys/arch/netwinder/include/param.h        Tue Feb 12 06:58:18 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.2 2001/10/26 23:21:31 matt Exp $   */
+/*     $NetBSD: param.h,v 1.3 2002/02/12 06:58:20 thorpej Exp $        */
 
 /*
  * Copyright (c) 1994,1995 Mark Brinicombe.
@@ -41,8 +41,6 @@
 
 #define        _MACHINE        netwinder
 #define        MACHINE         "netwinder"
-#define        _MACHINE_ARCH   arm
-#define        MACHINE_ARCH    "arm"
 
 #include <arm/arm32/param.h>
 
diff -r 75ade0a130a3 -r 483154b9479c sys/arch/shark/include/param.h
--- a/sys/arch/shark/include/param.h    Tue Feb 12 06:39:10 2002 +0000
+++ b/sys/arch/shark/include/param.h    Tue Feb 12 06:58:18 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.1 2002/02/10 01:57:31 thorpej Exp $        */
+/*     $NetBSD: param.h,v 1.2 2002/02/12 06:58:20 thorpej Exp $        */
 
 /*
  * Copyright (c) 1994,1995 Mark Brinicombe.
@@ -37,13 +37,10 @@
 
 #define        _MACHINE        shark
 #define        MACHINE         "shark"
-#ifdef __ELF__
-#define        _MACHINE_ARCH   arm
-#define        MACHINE_ARCH    "arm"
-#else
+#ifndef __ELF__
 #define        _MACHINE_ARCH   arm32
 #define        MACHINE_ARCH    "arm32"
-#endif /* __ELF__ */
+#endif /* ! __ELF__ */
 
 #include <arm/arm32/param.h>
 



Home | Main Index | Thread Index | Old Index