tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: disklabel endian issues
I wrote:
> --- tools/disklabel/Makefile 9 Dec 2006 20:13:13 -0000 1.2
> +++ tools/disklabel/Makefile 25 Oct 2009 07:25:09 -0000
> @@ -2,7 +2,36 @@
>
> HOSTPROGNAME= nbdisklabel-${MAKEWRAPPERMACHINE}
> HOST_SRCDIR= sbin/disklabel
> -HOST_SRCS= getcap.c disklabel.c
> +HOST_SRCS= getcap.c disklabel.c bswap.c
> +
> +# XXX should these be defined in <bsd.own.mk>?
> +.if ( 0 \
> + || ${MACHINE_ARCH} == "alpha" \
:
> +CPPFLAGS+= -DTARGET_BYTE_ORDER=LITTLE_ENDIAN
Ah, we already have <bsd.endian.mk> for this:
---
:
NOMAN= # defined
.include <bsd.endian.mk>
.if ${TARGET_ENDIANNESS} == "1234"
CPPFLAGS+= -DTARGET_BYTE_ORDER=LITTLE_ENDIAN
.elif ${TARGET_ENDIANNESS} == "4321"
CPPFLAGS+= -DTARGET_BYTE_ORDER=BIG_ENDIAN
.endif
:
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index