Current-Users archive

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

Problem with building installboot on NetBSD-5.2.



	hello.   I'm working to build release of netBSD-9 on a NetBSD-5.2
system.  Among other errors, documented elsewhere, I'm seeing the error
shown below.
The problem seems to be triggered by a commit  Jason made to
usr.sbin/installboot/Makefile V1.52.  It looks like this conditional block
of code doesn't take into account the fact that older versions of gcc might
be in use and, thus, not know about the new command line switches.  

	Could someone suggest the best way to fix this problem without
breaking builds on newer versions of NetBSD?

Below is the error I'm seeing, followed by the diff that causes the
trouble.  Any suggestions on the best way to correct this problem would be
greatly appreciated.
-thanks
-Brian

#   compile  installboot/fdt.lo
cc -O  -I/usr/local/netbsd/src-90/tools/installboot/../../common/include -I. -I/usr/local/netbsd/src-90/tools/installboot -I/usr/local/netbsd/src-90/tools/installboot/../mips-elf2ecoff -I/usr/local/netbsd/obj-64/tooldir.NetBSD-5.2_STABLE-i386/include/nbinclude -DEVBOARDS_PLIST_BASE=\"/usr/local/netbsd/obj-64/tooldir.NetBSD-5.2_STABLE-i386\" -I/usr/local/netbsd/obj-64/tooldir.NetBSD-5.2_STABLE-i386/include -I/usr/local/netbsd/obj-64/tooldir.NetBSD-5.2_STABLE-i386/include/nbinclude -I/usr/local/netbsd/obj-64/tooldir.NetBSD-5.2_STABLE-i386/include/compat -I/usr/local/netbsd/src-90/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -DSUPPORT_FDT -I/usr/local/netbsd/src-90/tools/installboot/../../usr.sbin/installboot/../../sys/external/bsd/libfdt/dist -I/usr/local/netbsd/src-90/tools/installboot/../../usr.sbin/installboot -I. -D_KERNTYPES -c -o fdt.lo.o -Wno-error=sign-compare   /usr/local/netbsd/src-90/tools/installboot/../../usr.sbin/installboot/../../sys/external/bsd!
 /libfdt/dist/fdt.c
cc1: error: unrecognized command line option "-Wno-error=sign-compare"
*** [fdt.lo] Error code 1


Index: Makefile
===================================================================
RCS file: /cvsroot/src/usr.sbin/installboot/Makefile,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- Makefile	11 Jan 2017 12:19:44 -0000	1.51
+++ Makefile	7 May 2019 05:02:42 -0000	1.52
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.51 2017/01/11 12:19:44 joerg Exp $
+#	$NetBSD: Makefile,v 1.52 2019/05/07 05:02:42 thorpej Exp $
 #
 
 .include <bsd.own.mk>
@@ -11,9 +11,17 @@
 ARCH_XLAT+= sun2-sun68k.c sun3-sun68k.c
 
 .if !defined(SMALLPROG) && !defined(ARCH_FILES)
-ARCH_FILES=  alpha.c amiga.c emips.c ews4800mips.c hp300.c hppa.c i386.c
-ARCH_FILES+= landisk.c macppc.c news.c next68k.c pmax.c
-ARCH_FILES+= sparc.c sparc64.c sun68k.c vax.c x68k.c
+ARCH_FILES=  alpha.c amiga.c
+ARCH_FILES+= emips.c evbarm.c ews4800mips.c
+ARCH_FILES+= hp300.c hppa.c
+ARCH_FILES+= i386.c
+ARCH_FILES+= landisk.c
+ARCH_FILES+= macppc.c
+ARCH_FILES+= news.c next68k.c
+ARCH_FILES+= pmax.c
+ARCH_FILES+= sparc.c sparc64.c sun68k.c
+ARCH_FILES+= vax.c
+ARCH_FILES+= x68k.c
 .else
 ARCH_FILES?= ${ARCH_XLAT:M${MACHINE}-*:S/${MACHINE}-//}
 .if empty(ARCH_FILES)
@@ -23,8 +31,30 @@
 
 SRCS+=${ARCH_FILES}
 
+.if !empty(ARCH_FILES:C/(evbarm)/evboard/:Mevboard.c)
+SRCS+=evboards.c
+.endif
+
+.if !empty(ARCH_FILES:C/(evbarm)/fdt/:Mfdt.c)
+FDTDIR=		${.CURDIR}/../../sys/external/bsd/libfdt/dist
+.PATH:		${FDTDIR}
+CPPFLAGS+=	-DSUPPORT_FDT -I${FDTDIR}
+SRCS+=fdt.c fdt_ro.c fdt_strerror.c
+# XXX libfdt has some sign-comparison issues
+COPTS.fdt.c+=		-Wno-error=sign-compare
+COPTS.fdt_ro.c+=	-Wno-error=sign-compare
+COPTS.fdt_strerror.c+=	-Wno-error=sign-compare
+.endif
+
+
+.if !defined(HOSTPROGNAME)
+.if !empty(ARCH_FILES:C/(evbarm)/ofw/:Mofw.c)
+CPPFLAGS+=	-DSUPPORT_OPENFIRMWARE
+.endif
+.endif
+
 .if empty(ARCH_FILES:C/(macppc|news|sparc|sun68k|x68k)/stg2/:Mstg2.c)
-CPPFLAGS	+= -DNO_STAGE2
+CPPFLAGS+=	-DNO_STAGE2
 .else
 SRCS+= bbinfo.c
 
@@ -47,6 +77,11 @@
 COPTS.${f}.c+=  -Wno-pointer-sign
 .endfor
 
+.if !empty(SRCS:Mevboards.c)
+LDADD+=	-lprop
+DPADD+=	${LIBPROP}
+.endif
+
 LDADD+= -lutil
 DPADD+= ${LIBUTIL}
 .endif


Home | Main Index | Thread Index | Old Index