NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: misc/54581: Issues building NetBSD-9 under NetBSD-5.2
hello. I have successfully build a NetBSD-9.0_BETA releaese under
NetBSD-5.2. Patches are below. This build cannot be done on i386 systems
because it requires more than 4GB of memory. However, an 8GB system is
sufficient to complete this task.
I will next bring -current sources up to date, apply these patches and
see if I can build there.
If that is successful, I'd like to commit these fixes so this work doesn't
get lost.
One question, For the mandoc fixes, I simply commented out the offending
options. This should really be under a conditional variable that tests for
the version of gcc we're using. Can someone suggest which variable and
which syntax I can use to make the inclusion of the offending options
conditional?
-thanks
-Brian
===> build.sh command: ./build.sh -m amd64 -D /var/tmp/netbsd-90-64 -O /usr/local/netbsd/obj-64 -j 1 release
===> build.sh started: Wed Oct 2 20:49:13 PDT 2019
===> NetBSD version: 9.0_BETA
===> MACHINE: amd64
===> MACHINE_ARCH: x86_64
===> Build platform: NetBSD 5.2_STABLE amd64
Successful make release
build.sh ended: Thu Oct 3 04:37:00 PDT 2019
Index: ./external/bsd/mdocml/bin/mandoc/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/mdocml/bin/mandoc/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- ./external/bsd/mdocml/bin/mandoc/Makefile 11 Mar 2019 17:59:28 -0000 1.18
+++ ./external/bsd/mdocml/bin/mandoc/Makefile 3 Oct 2019 17:55:31 -0000
@@ -44,6 +44,6 @@
SRCS+= ${SRCS.libmandoc} compat_strtonum.c compat_reallocarray.c
.endif
-COPTS.man_term.c+= -Wno-error=array-bounds
+#COPTS.man_term.c+= -Wno-error=array-bounds
.include <bsd.prog.mk>
Index: ./external/bsd/mdocml/lib/libmandoc/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/mdocml/lib/libmandoc/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- ./external/bsd/mdocml/lib/libmandoc/Makefile 11 Mar 2019 00:15:38 -0000 1.12
+++ ./external/bsd/mdocml/lib/libmandoc/Makefile 3 Oct 2019 17:55:32 -0000
@@ -44,6 +44,6 @@
COPTS.mdoc_macro.c+=-O0
.endif
-COPTS.man_validate.c+=-Wno-error=array-bounds
+#COPTS.man_validate.c+=-Wno-error=array-bounds
.include <bsd.lib.mk>
Index: ./external/cddl/osnet/sys/sys/opentypes.h
===================================================================
RCS file: /cvsroot/src/external/cddl/osnet/sys/sys/opentypes.h,v
retrieving revision 1.4
diff -u -r1.4 opentypes.h
--- ./external/cddl/osnet/sys/sys/opentypes.h 6 Sep 2018 00:44:43 -0000 1.4
+++ ./external/cddl/osnet/sys/sys/opentypes.h 3 Oct 2019 17:55:32 -0000
@@ -21,10 +21,16 @@
#define __defined_ts_t
typedef struct timespec timespec_t;
#endif
+#if !HAVE_UINT_T
typedef unsigned int uint_t;
+#endif
+#ifndef HAVE_UCHAR_T
typedef unsigned char uchar_t;
+#endif
+#if !HAVE_USHORT_T
typedef unsigned short ushort_t;
typedef unsigned long ulong_t;
+#endif
typedef off_t off64_t;
typedef id_t taskid_t;
typedef id_t projid_t;
Index: ./tools/compat/compat_defs.h
===================================================================
RCS file: /cvsroot/src/tools/compat/compat_defs.h,v
retrieving revision 1.116
diff -u -r1.116 compat_defs.h
--- ./tools/compat/compat_defs.h 19 Jun 2019 23:33:07 -0000 1.116
+++ ./tools/compat/compat_defs.h 3 Oct 2019 17:55:33 -0000
@@ -65,34 +65,42 @@
#if !HAVE_U_LONG
typedef unsigned long u_long;
+#define HAVE_U_LONG 1
#endif
#if !HAVE_U_CHAR
typedef unsigned char u_char;
+#define HAVE_U_CHAR 1
#endif
#if !HAVE_U_INT
typedef unsigned int u_int;
+#define HAVE_U_INT 1
#endif
#if !HAVE_U_SHORT
typedef unsigned short u_short;
+#define HAVE_U_SHORT 1
#endif
#if !HAVE_UCHAR_T
typedef unsigned char uchar_t;
+#define HAVE_UCHAR_T 1
#endif
#if !HAVE_USHORT_T
typedef unsigned short ushort_t;
+#define HAVE_USHORT_T 1
#endif
#if !HAVE_UINT_T
typedef unsigned int uint_t;
+#define HAVE_UINT_T 1
#endif
#if !HAVE_ULONG_T
typedef unsigned long ulong_t;
+#define HAVE_ULONG_T 1
#endif
/* System headers needed for (re)definitions below. */
@@ -118,6 +126,15 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
+/*
+ * __CTASSERT isn't defined until NetBSD-6, allow builds that want it
+ * to build on NetBSD-5 and older.
+ */
+#ifndef __CTASSERT
+#define __CTASSERT(x) __CTASSERT0(x, __ctassert, __LINE__)
+#define __CTASSERT0(x, y, z) __CTASSERT1(x, y, z)
+#define __CTASSERT1(x, y, z) typedef char y ## z[/*CONSTCOND*/(x) ? 1 : -1]
+#endif /* __CTASSERT */
#endif
#if HAVE_SYS_SYSLIMITS_H
#include <sys/syslimits.h>
Index: ./usr.sbin/installboot/Makefile
===================================================================
RCS file: /cvsroot/src/usr.sbin/installboot/Makefile,v
retrieving revision 1.52.2.1
diff -u -r1.52.2.1 Makefile
--- ./usr.sbin/installboot/Makefile 21 Aug 2019 08:28:53 -0000 1.52.2.1
+++ ./usr.sbin/installboot/Makefile 3 Oct 2019 17:55:33 -0000
@@ -41,16 +41,16 @@
.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
+# 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
.endif
Home |
Main Index |
Thread Index |
Old Index