Re: Softfloat build fixes - Please review

Nat Sloss <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
On Mon, 8 Sep 2025 00:13:38 Martin Husemann wrote:
> On Sun, Sep 07, 2025 at 10:41:32PM +1000, Nat Sloss wrote:
> > The fourth patch - the one im **UNSURE ABOUT** contains a change to
> > mknative which I dont know works as I don't know how to run mknative to
> > verify the defs.mk output.
> 
> The documentation for mknative (for gcc) is in
> src/tools/gcc/README.mknative
> 
> Martin

Thanks for that.

I've since found a better way to do it - attached is the patch.


Best regards,

Nat
newsoftfloat.5.diff (text/x-patch, 940 B)
--- a/external/gpl3/gcc/lib/libgcc/Makefile.inc	Sun Sep 07 04:08:23 2025 +0000
+++ b/external/gpl3/gcc/lib/libgcc/Makefile.inc	Mon Sep 08 22:25:22 2025 +1000
@@ -7,6 +7,9 @@
 .if exists(${.CURDIR}/../arch/${LIBGCC_MACHINE_ARCH}/defs.mk)
 .include "${.CURDIR}/../arch/${LIBGCC_MACHINE_ARCH}/defs.mk"
 .endif
+.if exists(${.CURDIR}/../arch/${LIBGCC_MACHINE_ARCH}/overrides.mk)
+.include "${.CURDIR}/../arch/${LIBGCC_MACHINE_ARCH}/overrides.mk"
+.endif
 .endif
 
 UNSUPPORTED_COMPILER.clang=	# defined
--- /dev/null	2025-09-08 22:30:23.932317774 +1000
+++ src/external/gpl3/gcc/lib/libgcc/arch/m68k/overrides.mk	2025-09-08 22:21:32.258451206 +1000
@@ -0,0 +1,9 @@
+#	$NetBSD$
+# Override libgcc_s included sources to make it possibile to build all three(3)
+# variants (hardfloat / libgcc_s softfloat / libc softfloat ).
+
+.if ${MKSOFTFLOAT} != "no" && ${MKLIBCSOFTFLOAT} != "no"
+G_LIB1ASMFUNCS=
+G_LIB1ASMSRC=
+G_LIB2_DIVMOD_FUNCS=
+.endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.