NetBSD Problem Report #59393
From www@netbsd.org Sun May 4 11:54:57 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id D19B81A9239
for <gnats-bugs@gnats.NetBSD.org>; Sun, 4 May 2025 11:54:57 +0000 (UTC)
Message-Id: <20250504115456.302611A923E@mollari.NetBSD.org>
Date: Sun, 4 May 2025 11:54:56 +0000 (UTC)
From: nathanialsloss@yahoo.com.au
Reply-To: nathanialsloss@yahoo.com.au
To: gnats-bugs@NetBSD.org
Subject: mac68k build with MKSOFTFLOAT=yes breaks during build
X-Send-Pr-Version: www-1.0
>Number: 59393
>Category: port-mac68k
>Synopsis: mac68k build with MKSOFTFLOAT=yes breaks during build
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: nat
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun May 04 11:55:00 +0000 2025
>Closed-Date: Wed Sep 10 23:45:39 +0000 2025
>Last-Modified: Wed Sep 10 23:45:39 +0000 2025
>Originator: Nat Sloss
>Release: NetBSD 10.99.14
>Organization:
>Environment:
NetBSD animal 10.99.14 NetBSD 10.99.14 (GENERIC) #0: Mon Apr 21 23:29:34 AEST 2025 build@microrusty:/home/build/nbsd999-x86_64/sys/arch/amd64/compile/GENERIC amd64
>Description:
Try to build a soft-float release for mac68k and it fails...
# link getcwd/getcwd
/home/build/mac68k-sf/tooldir.NetBSD-9.4-amd64/bin/m68k--netbsdelf-gcc --sysroot=/home/build/mac68k-sf/destdir.mac68k -Wl,--warn-shared-textrel -static
-o getcwd getcwd.o old_getcwd.o -Wl,-rpath-link,/home/build/mac68k-sf/destdir.mac68k/lib -L=/lib
/home/build/mac68k-sf/tooldir.NetBSD-9.4-amd64/lib/gcc/m68k--netbsdelf/12.4.0/..
/../../../m68k--netbsdelf/bin/ld: /home/build/mac68k-sf/destdir.mac68k/usr/lib/libc.a(softfloat.o): in function `__floatsisf':
softfloat.c:(.text+0x2ac0): multiple definition of `__floatsisf'; /home/build/ma
c68k-sf/destdir.mac68k/usr/lib/libgcc.a(fpgnulib.o):(.text+0x17c): first defined
here
/home/build/mac68k-sf/tooldir.NetBSD-9.4-amd64/lib/gcc/m68k--netbsdelf/12.4.0/../../../../m68k--netbsdelf/bin/ld: /home/build/mac68k-sf/destdir.mac68k/usr/lib/
and the list of multipe definitions of math function references goes on and the build stops.
>How-To-Repeat:
The command I used was
./build.sh -U -m mac68k -X ../xsrc -x -O ~/mac68k-sf -V MKSOFTFLOAT=yes -V USE_SSP=no tools release
>Fix:
Yes Please!
>Release-Note:
>Audit-Trail:
From: Nat Sloss <nathanialsloss@yahoo.com.au>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: port-mac68k/59393 mac68k build with MKSOFTFLOAT=yes breaks during build
Date: Sun, 6 Jul 2025 19:24:10 +1000
--Boundary-00=_8Ckao3/YSBk5bOG
Content-Type: Text/Plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
I'd like to commit the following patch as it fixes the build for m68k and
softfloat.
See attached:
Thoughts?
Best regards,
Nat
--Boundary-00=_8Ckao3/YSBk5bOG
Content-Type: text/x-patch;
charset="ISO-8859-1";
name="softfloat-buildfix.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="softfloat-buildfix.diff"
diff -r 6207e84534b9 regress/sys/kern/getcwd/Makefile
--- a/regress/sys/kern/getcwd/Makefile Fri Jul 04 09:28:18 2025 +0000
+++ b/regress/sys/kern/getcwd/Makefile Sun Jul 06 19:22:45 2025 +1000
@@ -2,6 +2,9 @@
NOMAN= # defined
LDSTATIC= -static
+.if ${MKSOFTFLOAT} != "no" && ${MACHINE_ARCH} == "m68k"
+LDFLAGS= -Wl,--allow-multiple-definition
+.endif
PROG= getcwd
SRCS= getcwd.c old_getcwd.c
--Boundary-00=_8Ckao3/YSBk5bOG--
From: "Nathanial Sloss" <nat@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59393 CVS commit: src
Date: Wed, 10 Sep 2025 23:07:39 +0000
Module Name: src
Committed By: nat
Date: Wed Sep 10 23:07:39 UTC 2025
Modified Files:
src/external/gpl3/gcc/dist/libgcc/config/m68k: fpgnulib.c
src/external/gpl3/gcc/lib/libgcc: Makefile.inc
src/lib/libc/arch/m68k: Makefile.inc
src/lib/libc/arch/m68k/gen: Makefile.inc
src/lib/libc/compiler_rt: Makefile.inc
src/lib/libc/softfloat: Makefile.inc softfloat-specialize
src/share/mk: bsd.own.mk
Added Files:
src/lib/libc/softfloat: Makefile.fenv.inc
Log Message:
Switch over m68k soffloat build to libc/softfloat.
m68k would previously use softfloat functions contained in libgcc_s.
This change aligns m68k with other platforms built with softfloat.
It is still possible to build the gcc_s softfloat impementation by setting
MKSOFFTFLOAT=yes MKLIBCSOFTFLOAT=no
Addresses PR/59393.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/dist/libgcc/config/m68k/fpgnulib.c
cvs rdiff -u -r1.53 -r1.54 src/external/gpl3/gcc/lib/libgcc/Makefile.inc
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/arch/m68k/Makefile.inc
cvs rdiff -u -r1.38 -r1.39 src/lib/libc/arch/m68k/gen/Makefile.inc
cvs rdiff -u -r1.54 -r1.55 src/lib/libc/compiler_rt/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/softfloat/Makefile.fenv.inc
cvs rdiff -u -r1.21 -r1.22 src/lib/libc/softfloat/Makefile.inc
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/softfloat/softfloat-specialize
cvs rdiff -u -r1.1436 -r1.1437 src/share/mk/bsd.own.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Nathanial Sloss" <nat@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59393 CVS commit: src/external/gpl3/gcc/lib/libgcc
Date: Wed, 10 Sep 2025 23:26:10 +0000
Module Name: src
Committed By: nat
Date: Wed Sep 10 23:26:10 UTC 2025
Modified Files:
src/external/gpl3/gcc/lib/libgcc: Makefile.inc
Log Message:
Exclude libgcc_s softfloat functions (m68k).
This is for when builing with libc/softfloat (the default).
Addresses PR/59393.
To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/external/gpl3/gcc/lib/libgcc/Makefile.inc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Nathanial Sloss" <nat@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59393 CVS commit: src/lib/libc/softfloat
Date: Wed, 10 Sep 2025 23:31:02 +0000
Module Name: src
Committed By: nat
Date: Wed Sep 10 23:31:02 UTC 2025
Modified Files:
src/lib/libc/softfloat: fpgetmask.c
Log Message:
Fix build for gcc_s softfloat (m68k).
Now that almost all of libc/softfloat is not build when setting
LIBCSOFTFLOAT=no for m68k it was necessary to define missing variables.
Adresses PR/59393.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/softfloat/fpgetmask.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: port-mac68k-maintainer->nat
Responsible-Changed-By: nat@NetBSD.org
Responsible-Changed-When: Wed, 10 Sep 2025 23:45:39 +0000
Responsible-Changed-Why:
Mine.
State-Changed-From-To: open->closed
State-Changed-By: nat@NetBSD.org
State-Changed-When: Wed, 10 Sep 2025 23:45:39 +0000
State-Changed-Why:
Fixed in -current.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.