Subject: Re: CVS commit: basesrc
To: None <tech-userlevel@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-userlevel
Date: 11/26/2000 10:38:50
In <20001125072028.22C5E3668@203.141.135.11.user.am.il24.net>
minoura@netbsd.org wrote:
> So, what's the result? The current status is TOO BAD to
> cause error in make build, even though it does not stop the
> build.
> PLEASE CORRECT IT AS SOON AS POSSIBLE. Reverting the change
> is acceptable for temporary workaround until the right
> solution is out.
(sorry I'm not on tech-userlevel, but shouldn't we move to tech-toolchain?)
How about the attached diff? I believe it's simple and common way.
BTW, I think we should also handle this on making termcap.db etc.
IMHO, it is better to prepare a common variable in bsd.own.mk.
pwd_mkdb and cap_mkdb have different options.
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp
Index: Makefile
===================================================================
RCS file: /cvsroot/basesrc/etc/Makefile,v
retrieving revision 1.170
diff -u -r1.170 Makefile
--- Makefile 2000/11/09 20:01:54 1.170
+++ Makefile 2000/11/26 01:17:59
@@ -120,18 +120,22 @@
# find out endianness of target and set proper flag for pwd_mkdb so that
# it creates database in same endianness
-.if exists(${DESTDIR}/usr/include/machine/endian_machdep.h)
-TARGET_ENDIANNESS!= awk '/_BYTE_ORDER/{print $$3}' \
- ${DESTDIR}/usr/include/machine/endian_machdep.h
+.if (${MACHINE_ARCH} == "alpha") || \
+ (${MACHINE_ARCH} == "arm26") || \
+ (${MACHINE_ARCH} == "arm32") || \
+ (${MACHINE_ARCH} == "i386") || \
+ (${MACHINE_ARCH} == "mipsel") || \
+ (${MACHINE_ARCH} == "ns32k") || \
+ (${MACHINE_ARCH} == "vax")
+TARGET_ENDIANNESS?= -L
+.elif (${MACHINE_ARCH} == "m68k") || \
+ (${MACHINE_ARCH} == "mipseb") || \
+ (${MACHINE_ARCH} == "powerpc") || \
+ (${MACHINE_ARCH} == "sparc") || \
+ (${MACHINE_ARCH} == "sparc64")
+TARGET_ENDIANNESS?= -B
.else
-TARGET_ENDIANNESS=
-.endif
-
-.if ${TARGET_ENDIANNESS} == "_LITTLE_ENDIAN"
-TARGET_ENDIANNESS= -L
-.elif ${TARGET_ENDIANNESS} == "_BIG_ENDIAN"
-TARGET_ENDIANNESS= -B
-.else
+# XXX sh3 should be split into sh3eb and sh3el
TARGET_ENDIANNESS?=
.endif