NetBSD Problem Report #59841
From www@netbsd.org Tue Dec 16 03:25:49 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 79E701A923A
for <gnats-bugs@gnats.NetBSD.org>; Tue, 16 Dec 2025 03:25:49 +0000 (UTC)
Message-Id: <20251216032548.911F11A923C@mollari.NetBSD.org>
Date: Tue, 16 Dec 2025 03:25:48 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: crunchgen(1) ignores -L argument
X-Send-Pr-Version: www-1.0
>Number: 59841
>Category: toolchain
>Synopsis: crunchgen(1) ignores -L argument
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: needs-pullups
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 16 03:30:00 +0000 2025
>Closed-Date:
>Last-Modified: Thu Jan 22 19:35:02 +0000 2026
>Originator: Taylor R Campbell
>Release: current, 11, 10, 9, 8, 7, 6, 5, 4, 3, ...
>Organization:
BSD Crunchyfood, Inc.
>Environment:
>Description:
crunchgen(8) doesn't do anything with its -L argument.
Support appears to have been accidentally removed in 2001 with the conversion to use bsd.prog.mk:
https://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/crunch/crunchgen/crunchgen.c?rev=1.24;content-type=text%2Fx-cvsweb-markup
https://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/crunch/crunchgen/crunchgen.c.diff?r1=1.23;r2=1.24
>How-To-Repeat:
try to make crunchgen link against a library not installed in $DESTDIR/usr/lib
>Fix:
Yes, please! (Patch incoming.)
>Release-Note:
>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59841 CVS commit: src/usr.bin/crunch/crunchgen
Date: Tue, 16 Dec 2025 04:18:06 +0000
Module Name: src
Committed By: riastradh
Date: Tue Dec 16 04:18:06 UTC 2025
Modified Files:
src/usr.bin/crunch/crunchgen: crunchgen.c
Log Message:
crunchgen(1): Implement -L <lib-dir> option for real.
Pass it through via LDADD in the generated .mk output, before any -l
options.
The original logic -- which was disabled in 2001, apparently by
accident -- had a default libdir of /usr/lib. But it didn't do
anything with that string, so removing it as a default doesn't change
anything. But the linker doesn't need us to specify that path anyway
(and it would really have to be -L=/usr/lib rather than -L/usr/lib,
whereas we want -L/path/to/obj/lib/libfoo without the `=').
PR toolchain/59841: crunchgen(1) ignores -L argument
Will be needed for:
PR lib/58648: private shared libraries should go in /usr/lib/private,
not /usr/lib
To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/usr.bin/crunch/crunchgen/crunchgen.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sat, 20 Dec 2025 14:52:22 +0000
State-Changed-Why:
fixed in HEAD, needs pullups to all branches
(this bug is old enough to drink in the US, could even rent a car next year)
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59841 CVS commit: [netbsd-11] src/usr.bin/crunch/crunchgen
Date: Thu, 22 Jan 2026 19:33:55 +0000
Module Name: src
Committed By: martin
Date: Thu Jan 22 19:33:54 UTC 2026
Modified Files:
src/usr.bin/crunch/crunchgen [netbsd-11]: crunchgen.c
Log Message:
Pull up following revision(s) (requested by snj in ticket #149):
usr.bin/crunch/crunchgen/crunchgen.c: revision 1.97
crunchgen(1): Implement -L <lib-dir> option for real.
Pass it through via LDADD in the generated .mk output, before any -l
options.
The original logic -- which was disabled in 2001, apparently by
accident -- had a default libdir of /usr/lib. But it didn't do
anything with that string, so removing it as a default doesn't change
anything. But the linker doesn't need us to specify that path anyway
(and it would really have to be -L=/usr/lib rather than -L/usr/lib,
whereas we want -L/path/to/obj/lib/libfoo without the `=').
PR toolchain/59841: crunchgen(1) ignores -L argument
Will be needed for:
PR lib/58648: private shared libraries should go in /usr/lib/private,
not /usr/lib
To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.96.4.1 src/usr.bin/crunch/crunchgen/crunchgen.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>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-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.