Index: installboot.h =================================================================== RCS file: /cvsroot/src/usr.sbin/installboot/installboot.h,v retrieving revision 1.39 diff -p -u -r1.39 installboot.h --- installboot.h 24 Feb 2014 07:23:44 -0000 1.39 +++ installboot.h 6 May 2021 18:06:09 -0000 @@ -165,6 +165,7 @@ int ext2fs_findstage2(ib_params *, uint extern struct ib_mach ib_mach_alpha; extern struct ib_mach ib_mach_amd64; extern struct ib_mach ib_mach_amiga; +extern struct ib_mach ib_mach_emips; extern struct ib_mach ib_mach_ews4800mips; extern struct ib_mach ib_mach_hp300; extern struct ib_mach ib_mach_hppa; Index: Makefile =================================================================== RCS file: /cvsroot/src/usr.sbin/installboot/Makefile,v retrieving revision 1.51 diff -p -u -r1.51 Makefile --- Makefile 11 Jan 2017 12:19:44 -0000 1.51 +++ Makefile 6 May 2021 18:06:09 -0000 @@ -19,6 +19,7 @@ ARCH_FILES?= ${ARCH_XLAT:M${MACHINE}-*:S .if empty(ARCH_FILES) ARCH_FILES= ${MACHINE}.c .endif +COPTS.machines.c+= -DSINGLE_ARCH=ib_mach_${MACHINE} .endif SRCS+=${ARCH_FILES} Index: machines.c =================================================================== RCS file: /cvsroot/src/usr.sbin/installboot/machines.c,v retrieving revision 1.39 diff -p -u -r1.39 machines.c --- machines.c 24 Feb 2014 07:23:44 -0000 1.39 +++ machines.c 6 May 2021 18:06:09 -0000 @@ -41,34 +41,10 @@ __RCSID("$NetBSD: machines.c,v 1.39 2014 #include #include "installboot.h" -/* - * Define these here so they end up as zero-filled bss if installboot - * isn't built with all the architectures defined. - * A lot simpler that conditionally including the definitions themselves. - */ -struct ib_mach - ib_mach_alpha, - ib_mach_amd64, - ib_mach_amiga, - ib_mach_emips, - ib_mach_ews4800mips, - ib_mach_hp300, - ib_mach_hppa, - ib_mach_i386, - ib_mach_landisk, - ib_mach_macppc, - ib_mach_news68k, - ib_mach_newsmips, - ib_mach_next68k, - ib_mach_pmax, - ib_mach_sparc, - ib_mach_sparc64, - ib_mach_sun2, - ib_mach_sun3, - ib_mach_vax, - ib_mach_x68k; - struct ib_mach * const machines[] = { +#ifdef SINGLE_ARCH + &SINGLE_ARCH, +#else &ib_mach_alpha, &ib_mach_amd64, &ib_mach_amiga, @@ -89,6 +65,7 @@ struct ib_mach * const machines[] = { &ib_mach_sun3, &ib_mach_vax, &ib_mach_x68k, +#endif NULL };