tech-toolchain archive

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

Re: Host requirements to build the Tools binaries



On Fri, 2024-08-16 at 12:17 +1200, Lloyd Parkes wrote:
> 
> 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?

Replacing GNU make 3.81 with 4.4.1 was trouble free. I then applied the
following diffs (slightly changed from my previous msg). This built
with GCC 13 on Linux but not with GCC 14 because there is a bug in
src/sbin/gpt/ involving confusion between pointers to int and long, and
GCC 14 will not up that nonsense. 

I'll look at the gpt source code tomorrow.

$ hg diff -X ./external/gpl2/gmake\*
diff -r 6f2160078904 tools/Makefile.gnuhost
--- a/tools/Makefile.gnuhost    Tue Aug 13 17:54:59 2024 +0000
+++ b/tools/Makefile.gnuhost    Fri Aug 16 16:21:23 2024 +1200
@@ -24,6 +24,11 @@
 HOST_CFLAGS+=-O2 -no-cpp-precomp
 .endif
 
+.if !empty(.MAKE.OS:M*Linux*)
+HOST_CPPFLAGS+=        -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
+#HOST_CPPFLAGS+= -D_BSD_SOURCE
+.endif
+
 MAKE_PROGRAM?= ${MAKE}
 
 .for i in 3 2
diff -r 6f2160078904 tools/Makefile.host
--- a/tools/Makefile.host       Tue Aug 13 17:54:59 2024 +0000
+++ b/tools/Makefile.host       Fri Aug 16 16:21:23 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
+.endif
+
 SRCS?=         ${HOSTPROG}.c
 SRCS+=         ${HOST_SRCS}
 



Home | Main Index | Thread Index | Old Index