Re: Softfloat build fixes - Please review

Nat Sloss <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
On Wed, 10 Sep 2025 12:39:19 matthew green wrote:
> we normally just edit these directly in the consuming Makefile
> (see email is end you.)
> 
> thanks.
> 
> 
> mrg.


I think I've got it now....Please see attached.

The only problem is I didn't know how to wrap long lines with the multiple 
subsititions.

Best regards,

Nat
newsoftfloat.6.diff (text/x-patch, 1.2 KB)
--- a/external/gpl3/gcc/lib/libgcc/Makefile.inc	Sun Sep 07 04:08:23 2025 +0000
+++ b/external/gpl3/gcc/lib/libgcc/Makefile.inc	Wed Sep 10 19:58:14 2025 +1000
@@ -9,6 +9,23 @@ GCC_MACHINE_SUBDIR=${MACHINE_CPU:C/power
 .endif
 .endif
 
+# Override libgcc_s included sources (m68k) to make it possibile to build
+# all three(3) variants (hardfloat / libgcc_s softfloat / libc softfloat ).
+.if ${LIBGCC_MACHINE_ARCH} == "m68k" && ${MKSOFTFLOAT} != "no" && \
+    ${MKLIBCSOFTFLOAT} != "no"
+NG_LIB1ASMFUNCS:=	${G_LIB1ASMFUNCS:S,_mulsi3,,:S,_udivsi3,,:S,_divsi3,,:S,_umodsi3,,:S,_modsi3,,:S,_floatex,,:S,_float,,:S,_double,,:S,_eqdf2,,:S,_nedf2,,:S,_gtdf2,,:S,_gedf2,,:S,_ltdf2,,:S,_ledf2,,:S,_eqsf2,,:S,_nesf2,,:S,_gtsf2,,:S,_gesf2,,:S,_ltsf2,,:S,_lesf2,,}
+NG_LIB1ASMSRC:=	${G_LIB1ASMSRC:S,m68k/lb1sf68.S,,}
+NG_LIB2_DIVMOD_FUNCS:=	${G_LIB2_DIVMOD_FUNCS:S,_divdi3,,:S,_moddi3,,:S,_divmoddi4,,:S,_udivdi3,,:S,_umoddi3,,:S,_udivmoddi4,,:S,_udiv_w_sdiv,,}
+
+G_LIB1ASMFUNCS=
+G_LIB1ASMSRC=
+G_LIB2_DIVMOD_FUNCS=
+
+G_LIB1ASMFUNCS:=	${NG_LIB1ASMFUNCS}
+G_LIB1ASMSRC:=		${NG_LIB1ASMSRC}
+G_LIB2_DIVMOD_FUNCS:=	${NG_LIB2_DIVMOD_FUNCS}
+.endif
+
 UNSUPPORTED_COMPILER.clang=	# defined
 
 DIST=		${GCCDIST}
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.