Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/usr.sbin/installboot Pull up following revision(s) (reque...



details:   https://anonhg.NetBSD.org/src/rev/bfdcdf17c970
branches:  netbsd-9
changeset: 1000728:bfdcdf17c970
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Wed Aug 21 08:28:53 2019 +0000

description:
Pull up following revision(s) (requested by martin in ticket #80):
        usr.sbin/installboot/Makefile: revision 1.53
        usr.sbin/installboot/Makefile: revision 1.54
        usr.sbin/installboot/machines.c: revision 1.41
        usr.sbin/installboot/machines.c: revision 1.42
Replace black voodo linker magic (sometimes failing) with some
makefile + macro magic to trim the list of available machines on size
restricted install media.
Never trust a compiler that predefines i386 as 1 - do the symbol name
concatenation at the make level instead.

diffstat:

 usr.sbin/installboot/Makefile   |   3 ++-
 usr.sbin/installboot/machines.c |  36 ++++++------------------------------
 2 files changed, 8 insertions(+), 31 deletions(-)

diffs (80 lines):

diff -r 4891ad3d8de9 -r bfdcdf17c970 usr.sbin/installboot/Makefile
--- a/usr.sbin/installboot/Makefile     Tue Aug 20 11:46:44 2019 +0000
+++ b/usr.sbin/installboot/Makefile     Wed Aug 21 08:28:53 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.52 2019/05/07 05:02:42 thorpej Exp $
+#      $NetBSD: Makefile,v 1.52.2.1 2019/08/21 08:28:53 msaitoh Exp $
 #
 
 .include <bsd.own.mk>
@@ -27,6 +27,7 @@
 .if empty(ARCH_FILES)
 ARCH_FILES= ${MACHINE}.c
 .endif
+COPTS.machines.c+=     -DSINGLE_ARCH=ib_mach_${MACHINE}
 .endif
 
 SRCS+=${ARCH_FILES}
diff -r 4891ad3d8de9 -r bfdcdf17c970 usr.sbin/installboot/machines.c
--- a/usr.sbin/installboot/machines.c   Tue Aug 20 11:46:44 2019 +0000
+++ b/usr.sbin/installboot/machines.c   Wed Aug 21 08:28:53 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machines.c,v 1.40 2019/05/07 05:02:42 thorpej Exp $    */
+/*     $NetBSD: machines.c,v 1.40.2.1 2019/08/21 08:28:53 msaitoh Exp $        */
 
 /*-
  * Copyright (c) 2002-2005 The NetBSD Foundation, Inc.
@@ -35,41 +35,16 @@
 
 #include <sys/cdefs.h>
 #if !defined(__lint)
-__RCSID("$NetBSD: machines.c,v 1.40 2019/05/07 05:02:42 thorpej Exp $");
+__RCSID("$NetBSD: machines.c,v 1.40.2.1 2019/08/21 08:28:53 msaitoh Exp $");
 #endif /* !__lint */
 
 #include <sys/types.h>
 #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_evbarm,
-    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,
@@ -91,6 +66,7 @@
     &ib_mach_sun3,
     &ib_mach_vax,
     &ib_mach_x68k,
+#endif
     NULL
 };
 



Home | Main Index | Thread Index | Old Index