From nobody Wed Apr 27 18:23:26 2022 X-Original-To: freebsd-current@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 D604C1AB351E for ; Wed, 27 Apr 2022 18:23:27 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KpRvg5Wp0z4ndt; Wed, 27 Apr 2022 18:23:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651083807; 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=GP/bP5K3Dt3FSURWtu2Juqb7LdbZcIks6/XgsRPkMrI=; b=r7j5MqkJEheJaxh5KKqvIQyk5I+iriF8PeEmZ3gvKmmhPWf0e6LAuWpQBvt+r2GDmegVxm 0C3gNKvmH0OfGvvr86/SuWgRrmqhD8jaz2skQ/hg0g6IwP0d3qITLJmFhEiub3Zz7p2HHt RM0wBVd8FkvwBiknzzYy8VS/YVePVWCF1Q2+xyYL2cF7k+bDcR/8e/AteX3efjcyCfgRaC 6pW5DW1nR8k1ij1E/haKzGBP4zQ3U1n2d49v1AplD2+8GBIu3Wn5r6U/UIyal5UDuJd2Oz K1khxS7I/kQyZUjE1H2t7RUMaTv58XGjbFsT6Ld6BkF6Xl+SnlTQj0xZReZ9Sw== Received: from [10.0.1.4] (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 27130B84C; Wed, 27 Apr 2022 18:23:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <80c36da0-6430-5727-375f-680c8343a37c@FreeBSD.org> Date: Wed, 27 Apr 2022 11:23:26 -0700 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: 'set but unused' breaks drm-*-kmod Content-Language: en-US To: Emmanuel Vadot , Michael Butler Cc: freebsd-current References: <263e16c4-0634-88e6-9652-50d0874f027e@protected-networks.net> <20220421094236.3f023ac540666c140c04f884@bidouilliste.com> <20220421154555.8a69a542d97d6cf36472b75f@bidouilliste.com> From: John Baldwin In-Reply-To: <20220421154555.8a69a542d97d6cf36472b75f@bidouilliste.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651083807; 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=GP/bP5K3Dt3FSURWtu2Juqb7LdbZcIks6/XgsRPkMrI=; b=bbE0YZGF/JB9SxvzwTysF5HSZO5W/8RVBLuEL1OH7SM6ukxjjUe/t5d8PNn+YS2myZZriH hoq0ZHGPCDzFV/dehjTovh+FzmEty27l42DQ/7C6MwokYvCfJ6ULbX6HHkKouUIWcUa3fZ 2QoABLHkU99be7M1+2VAdVVMoRJoeAR8RhfZkFojJC8nLKBTDToqfp5exom5y28VIZaHVe neaMX7XAPPF0LeYe5MQqLwZCi8Q9qp6Q2RPd+gF118s1yg0m7GxPA+afGCQ6ouDPg9xSfi uAPMRF9fVTa3oC71fQanBVGSZYmDtgwNCzDWMzXUH23o4OP2pnQBEaD7gxeZ9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651083807; a=rsa-sha256; cv=none; b=bqNFBsx8DDMruIaSLGtKhgUaOvNDB3bmrghWtU+ZxkZzjfrQqdqsKQckBBh5MxrMyycpOt 4F6phZZzPG2pDNT4QkTVUXr0P0iWbHlvVw/kENSAyPborISesZQEAk0mMRGg76N3z8ldXq JMvGhAQ365Xi2383jhBUUU4Y3QnMQfjHfNYRWiMyFdPqQeo08GlvqrNNfQ2QtZ3/5FeoU7 kircSvZzB95tELl3GohoxBFGTF3IJxgIP+km2cTmBMCV9Y4psRbkWZbpTt/H5kHFY2G96e +aNF9o5xp2xb9dp2u82pw3yFSdWPKa7+JBLoEAqDcc5y+sFM250RSw44K6X3lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 4/21/22 6:45 AM, Emmanuel Vadot wrote: > On Thu, 21 Apr 2022 08:51:26 -0400 > Michael Butler wrote: > >> On 4/21/22 03:42, Emmanuel Vadot wrote: >>> >>> Hello Michael, >>> >>> On Wed, 20 Apr 2022 23:39:12 -0400 >>> Michael Butler wrote: >>> >>>> Seems this new requirement breaks kmod builds too .. >>>> >>>> The first of many errors was (I stopped chasing them all for lack of >>>> time) .. >>>> >>>> --- amdgpu_cs.o --- >>>> /usr/ports/graphics/drm-devel-kmod/work/drm-kmod-drm_v5.7.19_3/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:1210:26: >>>> error: variable 'priority' set but not used >>>> [-Werror,-Wunused-but-set-variable] >>>> enum drm_sched_priority priority; >>>> ^ >>>> 1 error generated. >>>> *** [amdgpu_cs.o] Error code 1 >>>> >>> >>> How are you building the port, directly or with PORTS_MODULES ? >>> I do make passes on the warning for drm and I did for set-but-not-used >>> case but unfortunately this option doesn't exists in 13.0 so I couldn't >>> apply those in every branch. >> >> I build this directly on -current. I'm guessing that these are what >> triggered this behaviour: >> >> commit 8b83d7e0ee54416b0ee58bd85f9c0ae7fb3357a1 >> Author: John Baldwin >> Date: Mon Apr 18 16:06:27 2022 -0700 >> >> Make -Wunused-but-set-variable a fatal error for clang 13+ for >> kernel builds. >> >> Reviewed by: imp, emaste >> Differential Revision: https://reviews.freebsd.org/D34949 >> >> commit 615d289ffefe2b175f80caa9b1e113c975576472 >> Author: John Baldwin >> Date: Mon Apr 18 16:06:14 2022 -0700 >> >> Re-enable set but not used warnings for kernel builds. >> >> make tinderbox now passes with this warning enabled as a fatal error, >> so revert the change to hide it in preparation for making it fatal. >> >> This reverts commit e8e691983bb75e80153b802f47733f1531615fa2. >> >> Reviewed by: imp, emaste >> Differential Revision: https://reviews.freebsd.org/D34948 >> >> > > Ok I see, > > I won't have time until monday (maybe tuesday to fix this) but if > someone wants to beat me to it we should add some new CWARNFLAGS for > each problematic files in the 5.4-lts and 5.7-table branches of > drm-kmod (master which is following 5.10 is already good) only > if $ {COMPILER_VERSION} >= 130000. There is already a helper you can use that deals with compiler versions: CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE} or some such. -- John Baldwin