Re: Host requirements to build the Tools binaries
Lloyd Parkes <[email protected]> Fri, 16 Aug 2024 12:17:42 +1200
| Newsgroups | gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <bf83c958031033e015a412fc51f54c4ec562dab8.camel@must-have-coffee.gen.nz> |
On Fri, 2024-08-16 at 10:35 +1200, Lloyd Parkes wrote:
> I suspect that the tools build will need to add -D_XOPEN_SOURCE to
> the
> gcc HOST_CFLAGS on Linux systems (only).
The following patch helps a lot. It seems though that GNU make 3.81
simply won't build with GCC 14. Maybe we will need to import GNU make
4.4.1?
diff -r 2bd63b36499b tools/Makefile.host
--- a/tools/Makefile.host Sun Jun 23 20:47:17 2024 +0000
+++ b/tools/Makefile.host Fri Aug 16 12:06:21 2024 +1200
@@ -49,6 +49,11 @@
HOST_INSTALLPROG?=${HOST_BINDIR}/${HOSTPROGNAME}${HOSTEXEEXT}
.undef LINKS
+.if !empty(.MAKE.OS:M*Linux*)
+HOST_CPPFLAGS+= -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
+HOST_CPPFLAGS+= -D_DEFAULT_SOURCE -D_BSD_SOURCE
+.endif
+
SRCS?= ${HOSTPROG}.c
SRCS+= ${HOST_SRCS}