From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9FC7C3D4110; Tue, 10 Mar 2026 17:50:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773165060; cv=none; b=lP3afinlT8LFcz8WMUYPUTllUji92K6SMHfJi2+7bwHJEX3u098OBVtp/SO5GLjvoKi/ESu5EN/gR/T7AyQMxLPWpxJcKrfJBLbZvXR5DHRzqdN+8Xuo6U2Ul6xJFvs7VituIkwi7u5MVHeF8wzJZEkEC5V+SscnqAJpz4onnF4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773165060; c=relaxed/simple; bh=WcpIf4jmyVmqqaM72AFjCpjIwQJCn0VVYDwmYUBwxoE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=S3VICnZZCrGKg86pzGY/0E/XQOLpps97xOwGczAg3IyfwbhUv9SrdtBmOZgazYTvmyD8IEmyWP4spYBIP194mxSsSDCjH2aHWuf7G81sYj0XgNGTUvG8bwK8UdUkbx+wEcvbYRP8LDUHZHhBOihiNJYe0C9+KvEufod5MNO3EbE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B1C1A169C; Tue, 10 Mar 2026 10:50:51 -0700 (PDT) Received: from localhost (e132581.arm.com [10.1.196.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 81E153F694; Tue, 10 Mar 2026 10:50:57 -0700 (PDT) Date: Tue, 10 Mar 2026 17:50:55 +0000 From: Leo Yan To: 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 , Nuno =?iso-8859-1?Q?S=E1?= , Andy Shevchenko , Andrew Morton , Willy Tarreau , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , 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 Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH v3 27/30] selftests/bpf: Append extra cflags Message-ID: <20260310175055.GE4153946@e132581.arm.com> References: <20260308-tools_build_fix_zero_init-v3-0-6477808123b7@arm.com> <20260308-tools_build_fix_zero_init-v3-27-6477808123b7@arm.com> Precedence: bulk X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260308-tools_build_fix_zero_init-v3-27-6477808123b7@arm.com> On Sun, Mar 08, 2026 at 04:46:32PM +0000, Leo Yan wrote: > Append EXTRA_CFLAGS to CFLAGS so that additional flags can be applied to > the compiler. > > Signed-off-by: Leo Yan FWIW, this patch causes bpf selftest build failure and was reported in: https://github.com/kernel-patches/bpf/actions/runs/22825654003 The Makefile reuses CFLAGS for clang to build urandom_read, which may cause GCC specific flags to feed to clang and causes errors. The updated patch will introduce a new variable URANDOM_READ_CFLAGS, without appending EXTRA_CFLAGS, this can effectively avoid incompatible options. Thanks, Leo > --- > tools/testing/selftests/bpf/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile > index 72a9ba41f95ebb825d25799c07ba3f0311243e45..29dfcdbe98c781b53f1e87dcebecf2027bafcd5d 100644 > --- a/tools/testing/selftests/bpf/Makefile > +++ b/tools/testing/selftests/bpf/Makefile > @@ -49,6 +49,7 @@ srctree := $(patsubst %/,%,$(dir $(srctree))) > srctree := $(patsubst %/,%,$(dir $(srctree))) > endif > > +CFLAGS += $(EXTRA_CFLAGS) > CFLAGS += -g $(OPT_FLAGS) -rdynamic -std=gnu11 \ > -Wall -Werror -fno-omit-frame-pointer \ > -Wno-unused-but-set-variable \ > > -- > 2.34.1 >