From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 531B33EF654 for ; Tue, 10 Mar 2026 12:00:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773144044; cv=none; b=G1Mz3r7nLL5ZNJzxrX1RgmguTPCz8pb2/H3WaVCKdwBECtpqvUN3PETROMhatYNn1yofAGPrK6KrYTfeTNAQOXZNr5JHijGi46tBu6+kkPih5a1d/05K+zDKfac8gCwjTtwhK2SpHYeknEJBQOsxYY3SIRuC0H4/HlDS3D4LrRo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773144044; c=relaxed/simple; bh=D9iZSNFVB24G3xKDmALq4i98bet+bBZhXWdzP2XCqFo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=SMh4KDJvyqE0F9suwM+TM2qBN2hvXj/2Ptf1KA2gJ8Uf4Lubzkn361gymKR8dPMRGyJsi2SDc30/CfHfx3mOk5VCuZs+lRj0P6SOIz7sMhkbYU2MuQMP4iFilc0eL8z0UmGh3qflr+eGn/bBLMsdJ0RKr6pGZw4bQ0TCXjQQEvs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=Ay5JzxIJ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=gcgcvWcO; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="Ay5JzxIJ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="gcgcvWcO" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62ABHj7M3244087 for ; Tue, 10 Mar 2026 12:00:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 7PiBOFzuzqFI5tzekAPpBmjHMmBsUsnCV3nemX3vE3Y=; b=Ay5JzxIJ7B5VUt/L eRInS7bqeb6/zo5enAprotVYESxAGUW0uSwy/SyLW2Hkew7nbf2ecPNL1nVKyerT r3IBeU1sESVDJggMolkaiL2wRY2cJzmVM3lIhtelxRflxEqf5FRjT/pHBl38BAl+ MVPMy23RDykeV+CisliL7/1udU4NaNqn005OtHah8YvQfGwVaE0LcTEkiul6oEGB yy8ftgIIoovni3QZdo3qPfSPdvaepqxFMWbI7vVI9k7dgsF8yAqCJaxQeu4frHcd x/FhVA/Vy1cWmBiJrisOo7U2rOkmMEcc30dinqof71SjW5Pw5MidAMJoZvzhqRea 4Knt/Q== Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ctja284jp-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 10 Mar 2026 12:00:42 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-5092033798eso10337851cf.1 for ; Tue, 10 Mar 2026 05:00:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1773144042; x=1773748842; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=7PiBOFzuzqFI5tzekAPpBmjHMmBsUsnCV3nemX3vE3Y=; b=gcgcvWcO6QIIhfhMNLjFXW1E2cSKxB1MzFQyaES7PPwnL72J5sQTcNA9uBva27zm3g bFVtaOscVVce5llMIEh9XOp4r/KRriLeMRmPeVdsdAHAEeIJCs+oh/gWI0K27rCGpkSt X1zfFqWCSF4jXIgt9h+Ixwb0pMCChOzcXQ8Z4IJ2P1Fo6kNpbUXCgi8b8M1/aPkVEMd6 HCVZQFDUdlxS9unuzokn1l43WA6CdYzFWbE+PbbhnUaqCYG9WUsq5Llh4WNM+QE1/mQo BaHVyX6X53lBCmKyKwwivUK/VCFQjnIYIPsEiZgxw/PR+fCzl2a7lx0npH9OICe6JJed hgNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773144042; x=1773748842; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7PiBOFzuzqFI5tzekAPpBmjHMmBsUsnCV3nemX3vE3Y=; b=I0PoXO88ukOjfXIs/bAWf8LqNB8bGGJRWo4NbiBlexTsXFrcT58PnsieFvjtoJL8MM 23+yblppW36+LthTQ+47jcJAhWEK6FXY4MxnRTEVpb7hlrEiEjG/XZwYCQXwCGr9eKSF X6MvfRDh8XLpr1Ib82JFxXJUjJMA5w8sE+dUyoyHkCWMBOhEDp98Hl/C45wk0Xx6Z63Z F7Gg63h9LV7g0h6QXhkL7/dsBahqrlIhd+wopAVeezhVf6Q9AURcHg5QdHqNOtxAeRJf Hc9311KsSFE56IvhskgSP/3PVDAHU6iOObkaZ8UnkKd5sAUqaVzxT1XeYgukkUR8fTyq 5qFw== X-Forwarded-Encrypted: i=1; AJvYcCXUTwATG74i9haBGezqNp1+NstBIUpa6D/NxsPEXlP/wvXd0cM+QY3Lto+9sxh2lSfI0aQiarhxp9paJFM=@vger.kernel.org X-Gm-Message-State: AOJu0YwR+M2Jt2QGk1jKzyU1BtG8l3pNMvVKDaQyA3TRegIsTzSMqSHC tMbNKjK0fTIA2MXptwKOopuEzIGaEsK1wQ1knX6zUYHM07W0hmXjEOSdkyi9nsTji9xJwt+S9pf r2bArUJzSLD5qS3n7IDBLy/HC1STg+kibk3uqspOrm+lYPdFnsXwNy/fBXpIw96W56RU= X-Gm-Gg: ATEYQzyoqCvHV6l4tZPpdIe0eh/X9le0odI0IMFX5fXJjxtsE7uNcUZIL6bkIBy9kmD dklapxMzyDHJdmohrM6Vb09zkB/VlK4ovyeQJGJ/3fT2ILzkHuxtTkEcRmJyDi6x66iM4wyfhCU PVRr30Lf71F/ScIVUNFLcli//y/9O4GKZQ1DjfD/0pCFsMcTos+C/1ID06b5mBnrI21qhL1f+2X jQR3X1gW6YMkEqnZhIMpmo2VVF2SxgT7FPREWsP8fj5SsMjATrGYpAggwsf6P+iVmFGP9sStFok log5D5vtNv2o1CkMv3nTUlKdnbDf4R0ujKNzRyxiObPlMqiM9Oa5Sdu+WV0hA75gHsG3YrJ4K+O IUn9jBt0Gqn/N1bm/HTeKtPiG/wDZRLpYMghLc9b6gp+tQlAEh8zogZf62YfEIlj+aq+raRXFLJ YtQWuoKE2A X-Received: by 2002:a05:620a:3713:b0:8cb:3df5:4b6b with SMTP id af79cd13be357-8cd6d4e9f2emr1884850485a.61.1773144041233; Tue, 10 Mar 2026 05:00:41 -0700 (PDT) X-Received: by 2002:a05:620a:3713:b0:8cb:3df5:4b6b with SMTP id af79cd13be357-8cd6d4e9f2emr1884828285a.61.1773144040247; Tue, 10 Mar 2026 05:00:40 -0700 (PDT) Received: from ?IPV6:2a05:6e02:1041:c10:ae20:597c:99b8:d161? ([2a05:6e02:1041:c10:ae20:597c:99b8:d161]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-485246ed174sm176194055e9.5.2026.03.10.05.00.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Mar 2026 05:00:39 -0700 (PDT) Message-ID: Date: Tue, 10 Mar 2026 13:00:37 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 04/30] tools/thermal: Initialize CFLAGS before including Makefile.include To: Leo Yan Cc: Arnaldo Carvalho de Melo , Ian Rogers , Namhyung Kim , James Clark , Kees Cook , Quentin Monnet , Nathan Chancellor , Nicolas Schier , Nick Desaulniers , Bill Wendling , Justin Stitt , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Adrian Hunter , Masami Hiramatsu , William Breathitt Gray , Barry Song , Qinxin Xia , Bartosz Golaszewski , Kent Gibson , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Jonathan Cameron , David Lechner , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , Andrew Morton , Willy Tarreau , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Josh Poimboeuf , Robert Moore , Len Brown , Srinivas Pandruvada , Tejun Heo , David Vernet , Andrea Righi , Changwoo Min , Mark Brown , Steven Rostedt , Gabriele Monaco , Shuah Khan , Jiri Kosina , Benjamin Tissoires , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org References: <20260308-tools_build_fix_zero_init-v3-0-6477808123b7@arm.com> <20260308-tools_build_fix_zero_init-v3-4-6477808123b7@arm.com> <2ae5e4e5-a860-4f94-9655-67368d558f86@oss.qualcomm.com> <20260309100708.GN1098637@e132581.arm.com> Content-Language: en-US From: Daniel Lezcano In-Reply-To: <20260309100708.GN1098637@e132581.arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=c9WmgB9l c=1 sm=1 tr=0 ts=69b007ea cx=c_pps a=mPf7EqFMSY9/WdsSgAYMbA==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=7CQSdrXTAAAA:8 a=VwQbUJbxAAAA:8 a=cDDQTrPvQg6LDxInEB0A:9 a=QEXdDO2ut3YA:10 a=dawVfQjAaf238kedN5IG:22 a=a-qgeE7W1pNrGK8U0ZQC:22 X-Proofpoint-ORIG-GUID: 71bq55oNUfThnYXaVy-hkGW5FaGKQ6rT X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzEwMDEwNCBTYWx0ZWRfX1lF/A7AMTVxh dY8+4Hik3cfrfn0zvPj2A3w7dibo4WjD0KoNXpy0SLh4w71gLzeKU8m+Bvpm9DW4Pm5PGWf7nwJ 8aMiber+GrOrbRBiQH0vtIZgQN5rKgHL1ZG6vPnwb2PkfFiGHsipQoA5ajJs1HWHfK7TRRZKr/g 8wQ9OeFWiDKIJ6rudFtcXtS8Z4bje7DgZjRvBR9KyxBeSj5149QVIAQu7zmtlt5cOVZgiDU5GES 7zliaqsh9RL29UvhX8TyrEG0xUPLjZ8Vs+tgJZDjVDHDxLLMwxwW0nfSOtrGh/RXvfSA0V4LswK ujr819g0NsYjx3OFi91GcIy72SumNodUFHTTR/BUimP+CNCKR1N1RFLoNb6wUbtd7m9UgXdXcib ZuT9JPctZI4t2g/iEB1vn4j2OrbohqogLF26i97eg/bMk+4A8UgwPC8VEq9r74mNbGE7h/Q03b8 JhXTn03Pgk/lCM5jvRg== X-Proofpoint-GUID: 71bq55oNUfThnYXaVy-hkGW5FaGKQ6rT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-10_02,2026-03-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 clxscore=1015 impostorscore=0 phishscore=0 bulkscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2603100104 Hi Leo, On 3/9/26 11:07, Leo Yan wrote: > Hi Daniel, > > On Mon, Mar 09, 2026 at 09:41:16AM +0100, Daniel Lezcano wrote: > > [...] > >> On 3/8/26 17:46, Leo Yan wrote: >>> Initialize CFLAGS to the default value before including >>> tools/scripts/Makefile.include. >>> >>> Defer appending EXTRA_CFLAGS to CFLAGS until after including >>> Makefile.include, as it may extend EXTRA_CFLAGS in the future. >>> >>> Signed-off-by: Leo Yan >>> --- >>> tools/thermal/lib/Makefile | 16 +++++++++------- >>> 1 file changed, 9 insertions(+), 7 deletions(-) >>> >>> diff --git a/tools/thermal/lib/Makefile b/tools/thermal/lib/Makefile >>> index 056d212f25cf51cd8c02260fbe2ef28dda5e4acb..1890779f1574ebd9015f3001b9bb31d4bc0ae5ce 100644 >>> --- a/tools/thermal/lib/Makefile >>> +++ b/tools/thermal/lib/Makefile >>> @@ -23,6 +23,14 @@ INSTALL = install >>> DESTDIR ?= >>> DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))' >>> +# Defer assigning EXTRA_CFLAGS to CFLAGS until after including >>> +# tools/scripts/Makefile.include, as it may add flags to EXTRA_CFLAGS. >>> +ifdef EXTRA_CFLAGS >>> + CFLAGS := >>> +else >>> + CFLAGS := -g -Wall >>> +endif >>> + >> >> Sorry, I don't get the comment :/ >> >> Can you clarify the intended purpose with this change ? > > Sure. Since this series sets EXTRA_CFLAGS in Makefile.include (patch 05). > Without this patch, the init behavior of the thermal Makefile may change. > > For example: > > make -C tools/thermal/lib/ > > Before this series, the Makefile initializes: > > CFLAGS := -g -Wall > > If _only_ patch 05 is applied, EXTRA_CFLAGS is implicitly set in > tools/scripts/Makefile.include to work around compiler bugs. The > Makefile would initialize: > > CFLAGS := $(EXTRA_CFLAGS) > > This patch preserves the original initialization of CFLAGS, but changes > the sequence: > > CFLAGS := -g -Wall > CFLAGS += $(EXTRA_CFLAGS) > > If $(EXTRA_CFLAGS) is set by Makefile.include, it will be appended. > Otherwise, if $(EXTRA_CFLAGS) is empty, the behavior remains unchanged. > >> and the 'override' directive below ? > > The override directive is used to override any CFLAGS set on the make > command line. This patch does not introduce the directive; it simply > follows the existing style. As you can see, the following lines > already use the directive when appending options. Thanks for the clarification Acked-by: Daniel Lezcano