[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250328172424.GB195235@e132581.arm.com>
Date: Fri, 28 Mar 2025 17:24:24 +0000
From: Leo Yan <leo.yan@....com>
To: Ian Rogers <irogers@...gle.com>
Cc: Nick Desaulniers <ndesaulniers@...gle.com>,
Nathan Chancellor <nathan@...nel.org>,
Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
James Clark <james.clark@...aro.org>, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev, Kees Cook <kees@...nel.org>
Subject: Re: [PATCH] tools build: Use -fzero-init-padding-bits=all
Hi Ian,
On Fri, Mar 28, 2025 at 09:39:41AM -0700, Ian Rogers wrote:
[...]
> It'd be nice to bring in the comment for try-run that's in
> ./scripts/Makefile.compiler:
> ```
> # try-run
> # Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
> # Exit code chooses option. "$$TMP" serves as a temporary file and is
> # automatically cleaned up.
> ```
It is fine for me to reuse the comment from Makefile.compiler and add
a temporary folder for the try result.
> > +try-run = $(shell set -e; \
> > + if ($(1)) >/dev/null 2>&1; \
> > + then echo "$(2)"; \
> > + else echo "$(3)"; \
> > + fi)
> > +
> > +__cc-option = $(call try-run,\
> > + $(1) -Werror $(2) -c -x c /dev/null -o /dev/null,$(2),)
> > +cc-option = $(call __cc-option, $(CC),$(1))
> > +
>
> I see differences with the ./scripts/Makefile.compiler version of
> these functions:
> ```
> # __cc-option
> # Usage: MY_CFLAGS += $(call
> __cc-option,$(CC),$(MY_CFLAGS),-march=winchip-c6,-march=i586)
> __cc-option = $(call try-run,\
> $(1) -Werror $(2) $(3) -c -x c /dev/null -o "$$TMP",$(3),$(4))
>
> cc-option = $(call __cc-option, $(CC),\
> $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS),$(1),$(2))
> ```
> I'm just wondering why as if we need to update these in the future
> it'd be easier if the two were identical.
Note, I do not see a requirement for passing two options for tools
building. In the next spin, I will keep to support only one option.
Thanks for review!
Leo
Powered by blists - more mailing lists