From nobody Mon Mar 24 13:30:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZLv7N6VMwz5rvxk; Mon, 24 Mar 2025 13:30:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLv7N5DsRz3t6T; Mon, 24 Mar 2025 13:30:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742823024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h907+EpohH2WTtgCwwtFIyNULu1V89bbczNSuZOuxQE=; b=fRaui+KLlW5K+MakKDcTpvDvr59H45dbAxY+sAgftLeWWdxDWL9Ud9zXhOfaY+N7lvrUwT 3NmDG7kBNuKUz9vhUJVHmbGoEKwhhMXBVmPCOSgfT28jSW/iWxYk7aq/N7uskgpWWbk90T 5Ci4VnttscOLb7Z9GxTeJR/qq+3DXq4wlWqtueDQbqDzome8wdCMo5XJZoAGKotX/fT/hW U2sLPENfNqMuSFX22BosGCWsIhWfzFcxAdw2NRmBOtEzWjST8/3EDbFarnNdFf/EtPLMXc k9QCUfiLJl1MmrOyWXuXKupNijYSN/StllaEozpex/mL0pL4hedxTujTSaH0oA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742823024; a=rsa-sha256; cv=none; b=Bvltt9UWYa5gGk1vaBcfyeLnq6BPOBNbTO9p0lrAvcb+gNLPi8aaPbx+D0AxTZS15z/yBs /Fzeq4gSMN5pEPNENbJ1LtYAiyy96+oOEB9Wu1RDwRtJJWUitOJmWcIEI9vKfWWY0C8mnN rliXFvuGW+xQo4UCaPfdDLQUfONhNg2jhAsBo4pQzXYJGmx1/XSsv3N8pbJwaXKuWLWTyn kWu1gPFcBSiGv74lzwaZ7g7/gueW4uMgiXPwP2hQ8/zaAnPUq0KS4Q+1kM1LB5Cu87jeWC OkDYVdiNMVwWdDVbVjxpTgDFuBtt6SqrHwmbpC1hatvCPrGN0yFdW8hWAFz7TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742823024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h907+EpohH2WTtgCwwtFIyNULu1V89bbczNSuZOuxQE=; b=Nie4dJDVqPsC54pza1F554w+3UIU/MXmQQ5YKj4NXycdc0GvnNYKKHJ+j8YpGLASX783bI HJIYIVK9kS6MOA8G0Sy23qDOcFcWjJ1n6PlHCKUXKPl899Banq+IKmURsYlFJC14zXIuFY q1Om0ZtUnVSo09Sv0/JwT8LTtr6oYy6C1dlXZVjdkpwmQCE/5OEcTjKQeGeDeqG7+DuiI9 ogWeyFOCuAingGL/PGAu9sq+enaoFPYuUHmkbKLbevl6+2pLN4FjLKj50n2UF0IZlDrhSv aC7Ad7DHfxfa0WxpgHWtof6tPYja9HfGRuSaw0Qf9wbGjXrAgEsJP6ahEO7HrQ== Received: from [IPV6:2601:5c0:4200:b830:c071:16c3:77e4:59b3] (unknown [IPv6:2601:5c0:4200:b830:c071:16c3:77e4:59b3]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZLv7N2jxnz8RW; Mon, 24 Mar 2025 13:30:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <02b98558-1143-4540-beb0-a4d1e0ccfb77@FreeBSD.org> Date: Mon, 24 Mar 2025 09:30:23 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 623be660fcc9 - main - beep: add missing include of src.opts.mk, use LIBADD instead of LDFLAGS Content-Language: en-US To: Chuck Silvers , Brooks Davis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202503192022.52JKMaUG019132@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 3/19/25 16:23, Chuck Silvers wrote: > On Wed, Mar 19, 2025 at 08:44:13PM +0000, Brooks Davis wrote: >> On Wed, Mar 19, 2025 at 08:22:36PM +0000, Chuck Silvers wrote: >>> The branch main has been updated by chs: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=623be660fcc9860c0e8b99e8c2c4bbdefc121fd1 >>> >>> commit 623be660fcc9860c0e8b99e8c2c4bbdefc121fd1 >>> Author: Chuck Silvers >>> AuthorDate: 2025-03-19 19:48:10 +0000 >>> Commit: Chuck Silvers >>> CommitDate: 2025-03-19 19:48:10 +0000 >>> >>> beep: add missing include of src.opts.mk, use LIBADD instead of LDFLAGS >>> >>> Sponsored by: Netflix >>> --- >>> usr.bin/beep/Makefile | 5 +++-- >>> 1 file changed, 3 insertions(+), 2 deletions(-) >>> >>> diff --git a/usr.bin/beep/Makefile b/usr.bin/beep/Makefile >>> index f252ab64f843..8388ff7ff986 100644 >>> --- a/usr.bin/beep/Makefile >>> +++ b/usr.bin/beep/Makefile >>> @@ -1,6 +1,7 @@ >>> +.include >> >> Why add src.opts.mk? Nothing is using it and bsd.prog.mk will include >> it. Is there another change coming that will use it? >> >> -- Brooks >> >>> + >>> PROG= beep >>> MAN= beep.1 >>> - >>> -LDFLAGS= -lm >>> +LIBADD= m >>> >>> .include >>> > > the motivation for these changes is that I want to be able to add something > to LDFLAGS in /etc/src.conf and have that actually affect every executable > and shared library that is built. > > we don't actually care about beep or trim, I just noticed that they were > not getting the LDFLAGS from src.conf and thought I would fix them > for completeness. adding the include of src.opts.mk seemed to fix that. > also, a great many makefiles include src.opts.mk as the first thing and > I thought that was just some boilerplate that was expected to be done > everywhere and had been overlooked in these two. > > at that point I had not changed the usage of LDFLAGS in these two makefiles. > then as I was arranging this stuff to commit, I grep'ed for other makefiles > that assign rather than append to LDFLAGS (like I had found in bsnmpd) > and found that these same two makefiles also incorrectly assigned to LDFLAGS, > so then I added the other changes you see in those two commits. > > I'm not sure why I thought that including src.opts.mk without changing > the LDFLAGS usage made things work initially. I tried that again just now > and indeed it doesn't help, and the parts that remove the assignment to LDFLAGS > are enough. maybe I had something stale in my obj dir before? > > anyway, I'd be happy to remove the include of src.opts.mk from these again > if you'd like. I do think we shouldn't keep the extra src.opts.mk includes unless they are needed. The typical use case for including that early is if a Makefile needs to test some of the variables it sets (e.g. MK_FOO). -- John Baldwin