diff options
| author | martin <martin@NetBSD.org> | 2019-08-15 19:53:01 +0000 |
|---|---|---|
| committer | martin <martin@NetBSD.org> | 2019-08-15 19:53:01 +0000 |
| commit | 27ec93d11c2d0002cd6e7ec0f68eda3992dedf50 (patch) | |
| tree | b91d543c9ef75115684970e3cf9be33559512fe4 /usr.sbin/installboot | |
| parent | 84d2fcf8ad827289572b7f416df48c47b8f6eb13 (diff) | |
Never trust a compiler that predefines i386 as 1 - do the symbol name
concatenation at the make level instead.
Diffstat (limited to 'usr.sbin/installboot')
| -rw-r--r-- | usr.sbin/installboot/Makefile | 4 | ||||
| -rw-r--r-- | usr.sbin/installboot/machines.c | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/usr.sbin/installboot/Makefile b/usr.sbin/installboot/Makefile index 3f1cf326bfc..521ef7c0ec7 100644 --- a/usr.sbin/installboot/Makefile +++ b/usr.sbin/installboot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.53 2019/08/15 14:06:40 martin Exp $ +# $NetBSD: Makefile,v 1.54 2019/08/15 19:53:01 martin Exp $ # .include <bsd.own.mk> @@ -27,7 +27,7 @@ ARCH_FILES?= ${ARCH_XLAT:M${MACHINE}-*:S/${MACHINE}-//} .if empty(ARCH_FILES) ARCH_FILES= ${MACHINE}.c .endif -COPTS.machines.c+= -DSINGLE_ARCH="${MACHINE}" +COPTS.machines.c+= -DSINGLE_ARCH=ib_mach_${MACHINE} .endif SRCS+=${ARCH_FILES} diff --git a/usr.sbin/installboot/machines.c b/usr.sbin/installboot/machines.c index 19b1e5f06c7..da8d4e47c12 100644 --- a/usr.sbin/installboot/machines.c +++ b/usr.sbin/installboot/machines.c @@ -1,4 +1,4 @@ -/* $NetBSD: machines.c,v 1.41 2019/08/15 14:06:40 martin Exp $ */ +/* $NetBSD: machines.c,v 1.42 2019/08/15 19:53:01 martin Exp $ */ /*- * Copyright (c) 2002-2005 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include <sys/cdefs.h> #if !defined(__lint) -__RCSID("$NetBSD: machines.c,v 1.41 2019/08/15 14:06:40 martin Exp $"); +__RCSID("$NetBSD: machines.c,v 1.42 2019/08/15 19:53:01 martin Exp $"); #endif /* !__lint */ #include <sys/types.h> @@ -43,9 +43,7 @@ __RCSID("$NetBSD: machines.c,v 1.41 2019/08/15 14:06:40 martin Exp $"); struct ib_mach * const machines[] = { #ifdef SINGLE_ARCH -#define IB_PREFIX(X) ib_mach_##X -#define MY_ARCH(X) IB_PREFIX(X) - &MY_ARCH(SINGLE_ARCH), + &SINGLE_ARCH, #else &ib_mach_alpha, &ib_mach_amd64, |
