NetBSD Problem Report #28885

From tsutsui@ceres.dti.ne.jp  Thu Jan  6 14:52:52 2005
Return-Path: <tsutsui@ceres.dti.ne.jp>
Received: from smtp.ceres.ocn.ne.jp (ceres.ocn.ne.jp [222.146.51.76])
	by narn.netbsd.org (Postfix) with ESMTP id E82F563B400
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  6 Jan 2005 14:52:51 +0000 (UTC)
Message-Id: <200501061452.j06EqokZ005936@mirage.ceres.dti.ne.jp>
Date: Thu, 6 Jan 2005 23:52:50 +0900 (JST)
From: tsutsui@ceres.dti.ne.jp
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@netbsd.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: XF4 Imake.cf cleanup for MACHINE_CPU and MACHINE specific definitions
X-Send-Pr-Version: 3.95

>Number:         28885
>Category:       xsrc
>Synopsis:       XF4 Imake.cf cleanup for MACHINE_CPU and MACHINE specific definitions
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    xsrc-manager
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 06 14:54:00 +0000 2005
>Closed-Date:    Sun May 07 09:18:10 +0000 2006
>Last-Modified:  Sun May 07 09:18:10 +0000 2006
>Originator:     Izumi Tsutsui
>Release:        NetBSD 2.99.11
>Organization:
>Environment:
System: NetBSD mirage
Architecture: i386, sh3el
Machine: i386, dreamcast
and other arch
>Description:
Current xsrc/xfree/xc/config/cf/Imake.cf has some MACHINE_CPU specific
and MACHINE specific definitions for __NetBSD__, but it is too complicated
to read/maintain, and MACHINE_CPU specific part and MACHINE specific part
should be defined separately.

>How-To-Repeat:
Code inspection.

>Fix:
Patch attached. This patch may be still imcomplete,
but I think this will make further fixes easier.

config/cf/NetBSD.cf also needs cleanup,
but I'll file it in different PR.

--- xsrc/xfree/xc/config/cf/Imake.cf	2005-01-05 18:07:16.000000000 +0900
+++ Imake.cf	2005-01-03 21:08:00.000000000 +0900
@@ -71,7 +71,7 @@
 # define UltrixArchitecture
 #endif /* ultrix */

-#if defined(vax) && !defined(UltrixArchitecture) && !defined(__OpenBSD__)
+#if defined(vax) && !defined(UltrixArchitecture) && !defined(__OpenBSD__) && !defined(__NetBSD__)
 # define MacroIncludeFile <bsd.cf>
 # define MacroFile bsd.cf
 # undef vax
@@ -199,60 +199,163 @@
 # undef __NetBSD__
 # define NetBSDArchitecture
 # define KNetBSDArchitecture
-# ifdef __i386__
+  /* MACHINE_CPU specific definitions ("__${MACHINE_CPU}__ is defined by cpp) */
+# if defined(__alpha__) || defined(alpha)
+#  define AlphaArchitecture
+#  define AlphaBsdArchitecture
+#  undef alpha
+# endif
+# if defined(__arm__) || defined(arm)
+#  define armArchitecture
+#  undef arm
+# endif
+# if defined(__hppa__) || defined(hppa)
+#  define HPArchitecture
+#  undef hppa
+# endif
+# if defined(__i386__) || defined(i386)
 #  define i386BsdArchitecture
 #  define i386Architecture
 #  undef i386
 # endif
-# if defined(__sparc64__) || defined(__sparc_v9__) || defined(__arch64__)
-#  define Sparc64Architecture
+# if defined(__m68000__) || defined(m68000)
+#  define m68000Architecture
+#  define Mc68000Architecture
+#  undef m68000
 # endif
-# if defined(__sparc__) || defined(sparc)
+# if defined(__m68k__) || defined(m68k)
+#  define m68kArchitecture
+#  define Mc68020Architecture
+#  undef m68k
+# endif
+# if defined(__mips__) || defined(mips)
+#  define MipsArchitecture
+#  if defined(__MIPSEL__)
+#   define MipselArchitecture
+#  endif
+#  undef mips
+# endif
+# if defined(__ns32k__) || defined(ns32k)
+#  define ns32kArchitecture
+#  undef ns32k
+# endif
+# if defined(__powerpc__) || defined(powerpc)
+#  define PpcArchitecture
+#  undef powerpc
+# endif
+# if defined(__sh__) || defined(sh)
+#  if defined(__BIG_ENDIAN__)
+#   define SuperHebArchitecture
+#  else
+#   define SuperHArchitecture
+#  endif
+#  if defined(__SH5__)
+#   define sh5Architecture
+#  else
+#   define sh3Architecture
+#  endif
+#  undef sh
+# endif
+# if defined(__sparc__)
 #  define SparcArchitecture
 #  undef sparc
 #  if defined(__sparc_v9__) || defined(__arch64__)
-#    define Sparc64Architecture
+#   define Sparc64Architecture
 #  endif
 # endif
-# ifdef __mips__
-#   define MipsArchitecture
-#   define ArcArchitecture
-#   undef __mips__
-#   if defined(__sgimips__)
-#      define SGIMipsArchitecture
-#   endif
+# if defined(__sparc64__) || defined(__sparc_v9__) || defined(sparc64)
+#  define Sparc64Architecture
+#  undef sparc64
 # endif
-# ifdef __alpha__
-#   define AlphaArchitecture
-#   define AlphaBsdArchitecture
-#   undef __alpha__
+# if defined(__vax__) || defined(vax)
+#  define VaxArchitecture
+#  undef vax
 # endif
-# ifdef mc68000
-#   define Mc68020Architecture
+# if defined(__x86_64__) || defined(x86_64)
+#  define x86_64Architecture
+#  undef x86_64
 # endif
-# ifdef __arm32__
-#   define Arm32Architecture
-#   undef __arm32__
-# endif
-# ifdef __cats__
-#   define CatsArchitecture
-#   undef __cats__
+  /* MACHINE specific definitions ("__${MACHINE}__" is defined by imake) */
+# if defined(__acorn32__)
+#  define Arm32Architecture
+#  define acorn32Architecture
 # endif
-# ifdef __vax__
-#   define VaxArchitecture
-#   undef __vax__
+# if defined(__amd64__)
+#  define AMD64Architecture
 # endif
-# ifdef __powerpc__
-#   define PpcArchitecture
-#   undef __powerpc__
+# if defined(__algor__)
+#  define algorArchitecture
 # endif
-# ifdef __macppc__
-#   define macppcArchitecture
-#   undef __macppc__
+# if defined(__amiga__)
+#  define amigaArchitecture
 # endif
-# ifdef __x86_64__
-#  define AMD64Architecture
-#  undef __x86_64__
+# if defined(__atari__)
+#  define atariArchitecture
+# endif
+# if defined(__cats__)
+#  define Arm32Architecture
+#  define CatsArchitecture
+# endif
+# if defined(__cobalt__)
+#  define cobaltArchitecture
+# endif
+# if defined(__dreamcast__)
+#  define dreamcastArchitecture
+# endif
+# if defined(__hp300__)
+#  define hp300Architecture
+# endif
+# if defined(__hpcarm__)
+#  define hpcarmArchitecture
+# endif
+# if defined(__hpcmips__)
+#  define hpcmipsArchitecture
+# endif
+# if defined(__mac68k__)
+#  define mac68kArchitecture
+# endif
+# if defined(__macppc__)
+#  define macppcArchitecture
+# endif
+# if defined(__luna68k__)
+#  define luna68kArchitecture
+# endif
+# if defined(__mipsco__)
+#  define mipscoArchitecture
+# endif
+# if defined(__mvme68k__)
+#  define mvme68kArchitecture
+# endif
+# if defined(__next68k__)
+#  define next68kArchitecture
+# endif
+# if defined(__news68k__)
+#  define news68kArchitecture
+# endif
+# if defined(__pc532__)
+#  define pc532Architecture
+# endif
+# if defined(__pmax__)
+#  define pmaxArchitecture
+# endif
+# if defined(__playstation2__)
+#  define playstation2Architecture
+# endif
+# if defined(__prep__)
+#  define prepArchitecture
+# endif
+# if defined(__sgimips__)
+#  define SGIMipsArchitecture
+# endif
+# if defined(__shark__)
+#  define Arm32Architecture
+#  define sharkArchitecture
+# endif
+# if defined(__sun3__)
+#  define Sun3Architecture
+# endif
+# if defined(__x68k__)
+#  define x68kArchitecture
 # endif
 #endif /* NetBSD */


>Release-Note:

>Audit-Trail:
From: Matthias Scheler <tron@NetBSD.org>
To: Izumi Tsutsui <tsutsui@NetBSD.org>
Cc: NetBSD GNATS <gnats-bugs@netbsd.org>
Subject: Re: xsrc/28885: XF4 Imake.cf cleanup for MACHINE_CPU and MACHINE specific definitions
Date: Thu, 6 Jan 2005 14:59:24 +0000

 On Thu, Jan 06, 2005 at 02:54:01PM +0000, tsutsui@ceres.dti.ne.jp wrote:
 > >Number:         28885
 > >Category:       xsrc
 > >Synopsis:       XF4 Imake.cf cleanup for MACHINE_CPU and MACHINE specific definitions

 Could you please commit that change yourself? You understand it better
 than anybody else and there's enough time before we branch NetBSD 3.0
 to sort out problems which could be caused by it.

 	Thanks in advance

 -- 
 Matthias Scheler                                  http://scheler.de/~matthias/

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: tron@NetBSD.org
Cc: gnats-bugs@netbsd.org, tsutsui@ceres.dti.ne.jp
Subject: Re: xsrc/28885: XF4 Imake.cf cleanup for MACHINE_CPU and MACHINE specific
	 definitions
Date: Fri, 7 Jan 2005 01:26:35 +0900

 > Could you please commit that change yourself? You understand it better
 > than anybody else and there's enough time before we branch NetBSD 3.0
 > to sort out problems which could be caused by it.

 Well, I doubt I do, but I'd like to know first which ports
 can do "native build" under -current xsrc/xfree, not via src/x11
 before commit this change.

 I'm afraid NetBSD.cf is much more problematic.
 ---
 Izumi Tsutsui
 tsutsui@ceres.dti.ne.jp

From: Matthias Scheler <tron@zhadum.de>
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Cc: NetBSD GNATS <gnats-bugs@netbsd.org>
Subject: Re: xsrc/28885: Re: xsrc/28885: XF4 Imake.cf cleanup for MACHINE_CPU and MACHINE specific definitions
Date: Thu, 6 Jan 2005 16:38:25 +0000

 On Thu, Jan 06, 2005 at 04:27:01PM +0000, Izumi Tsutsui wrote:
 >  > Could you please commit that change yourself? You understand it better
 >  > than anybody else and there's enough time before we branch NetBSD 3.0
 >  > to sort out problems which could be caused by it.
 >  
 >  Well, I doubt I do, but I'd like to know first which ports
 >  can do "native build" under -current xsrc/xfree, not via src/x11
 >  before commit this change.

 Actually all of them should be able to do it.

 	Kind regards

 -- 
 Matthias Scheler                                  http://scheler.de/~matthias/

State-Changed-From-To: open->closed
State-Changed-By: tsutsui@netbsd.org
State-Changed-When: Sun, 07 May 2006 09:18:10 +0000
State-Changed-Why:
Fix committed long ago.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.