NetBSD Problem Report #57565
From taca@back-street.net Sat Aug 5 05:01:48 2023
Return-Path: <taca@back-street.net>
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))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 289251A9238
for <gnats-bugs@gnats.NetBSD.org>; Sat, 5 Aug 2023 05:01:48 +0000 (UTC)
Message-Id: <20230805050133.20873768320@m2utm.a.back-street.net>
Date: Sat, 5 Aug 2023 14:01:33 +0900 (JST)
From: taca@back-street.net
Reply-To: taca@back-street.net
To: gnats-bugs@NetBSD.org
Subject: ar(1) l option incompatibility
X-Send-Pr-Version: 3.95
>Number: 57565
>Category: bin
>Synopsis: ar(1) l option incompatibility
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Aug 05 05:05:00 +0000 2023
>Closed-Date: Sun Dec 31 13:12:47 +0000 2023
>Last-Modified: Sun Dec 31 13:12:47 +0000 2023
>Originator: Takahiro Kambe
>Release: NetBSD 10.99.7
>Organization:
>Environment:
System: NetBSD m2utm.a.back-street.net 10.99.7 NetBSD 10.99.7 (GENERIC64) #0: Wed Aug 2 12:06:52 JST 2023 taca@m2utm.a.back-street.net:/data/10.99.7/evbarm/obj/sys/arch/evbarm/compile/GENERIC64 evbarm
Architecture: aarch64
Machine: evbarm
>Description:
ar(1) l option has changed between binutils 2.34 (NetBSD 10.0_BETA)
and 2.39 (NetBSD 10.99.7).
2.34 l This modifier is accepted but not used.
2.39 l Specify dependencies of this library...
And /usr/share/mk/sys.mk still defines ARFLAGS to "rl".
ARFLAGS?= rl
So, building a library might magically failed.
>How-To-Repeat:
% touch a.c b.c
% cc -c a.c b.c
% ar rl c.a a.o b.o
ar: a.o: file format not recognized
>Fix:
Disable l option of ar(1) as binutil 2.34's day or remove l from
ARFLAGS as below:
--- share/mk/sys.mk.orig 2023-06-20 22:55:19.001004643 +0900
+++ share/mk/sys.mk 2023-08-05 13:33:29.740135375 +0900
@@ -12,7 +12,7 @@
.LIBS: .a
AR?= ar
-ARFLAGS?= rl
+ARFLAGS?= r
RANLIB?= ranlib
MV?= mv -f
>Release-Note:
>Audit-Trail:
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57565 CVS commit: src/share/mk
Date: Fri, 29 Dec 2023 09:17:37 +0000
Module Name: src
Committed By: wiz
Date: Fri Dec 29 09:17:37 UTC 2023
Modified Files:
src/share/mk: sys.mk
Log Message:
Update ARFLAGS for new binutils.
In binutils 2.34, 'l' was a no-op.
In binutils 2.39, it is used to specify library dependencies.
Remove 'l' from ARFLAGS.
From Takahiro Kambe in PR 57565.
To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/share/mk/sys.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->pending-pullups
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Fri, 29 Dec 2023 09:20:39 +0000
State-Changed-Why:
pullup to 10 requested
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57565 CVS commit: [netbsd-10] src/share/mk
Date: Sun, 31 Dec 2023 12:16:18 +0000
Module Name: src
Committed By: martin
Date: Sun Dec 31 12:16:17 UTC 2023
Modified Files:
src/share/mk [netbsd-10]: sys.mk
Log Message:
Pull up following revision(s) (requested by wiz in ticket #526):
share/mk/sys.mk: revision 1.149
Update ARFLAGS for new binutils.
In binutils 2.34, 'l' was a no-op.
In binutils 2.39, it is used to specify library dependencies.
Remove 'l' from ARFLAGS.
From Takahiro Kambe in PR 57565.
To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.148.2.1 src/share/mk/sys.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sun, 31 Dec 2023 13:12:47 +0000
State-Changed-Why:
Fixed and pulled up to -10 - thanks!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.