From: Anthony PERARD <anthony.perard@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: <xen-devel@lists.xenproject.org>,
Andrew Cooper <andrew.cooper3@citrix.com>,
George Dunlap <george.dunlap@citrix.com>,
"Jan Beulich" <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
Wei Liu <wl@xen.org>
Subject: Re: [PATCH v2 2/2] tools/firmware: do not add a .note.gnu.property section
Date: Mon, 4 Apr 2022 12:12:51 +0100 [thread overview]
Message-ID: <YkrSs7DtAh95ndOZ@perard.uk.xensource.com> (raw)
In-Reply-To: <20220404104044.37652-3-roger.pau@citrix.com>
On Mon, Apr 04, 2022 at 12:40:44PM +0200, Roger Pau Monne wrote:
> Prevent the assembler from creating a .note.gnu.property section on
> the output objects, as it's not useful for firmware related binaries,
> and breaks the resulting rombios image.
>
> This requires modifying the cc-option Makefile macro so it can test
> assembler options (by replacing the usage of the -S flag with -c) and
> also stripping the -Wa, prefix if present when checking for the test
> output.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Changes since v1:
> - Add the option to CFLAGS.
> ---
> Config.mk | 2 +-
> tools/firmware/Rules.mk | 4 ++++
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Config.mk b/Config.mk
> index f56f7dc334..82832945e5 100644
> --- a/Config.mk
> +++ b/Config.mk
> @@ -91,7 +91,7 @@ PYTHON_PREFIX_ARG ?= --prefix="$(prefix)"
> #
> # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
> cc-option = $(shell if test -z "`echo 'void*p=1;' | \
> - $(1) $(2) -S -o /dev/null -x c - 2>&1 | grep -- $(2) -`"; \
> + $(1) $(2) -c -o /dev/null -x c - 2>&1 | grep -- $(2:-Wa$(comma)%=%) -`"; \
> then echo "$(2)"; else echo "$(3)"; fi ;)
Hopefully, changing "-S" to "-c" in this macro will not break anything.
I would be of the opinion to create a new macro which deal with
assembler options. But if that works and doesn't changes CFLAGS in the
testing we do in GitLab, I guess that would be OK.
Whether you introduce a macro or keep this one:
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
next prev parent reply other threads:[~2022-04-04 11:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-04 10:40 [PATCH v2 0/2] firmware: build fixes with gcc-11 Roger Pau Monne
2022-04-04 10:40 ` [PATCH v2 1/2] tools/firmware: fix setting of fcf-protection=none Roger Pau Monne
2022-04-04 10:47 ` Anthony PERARD
2022-04-04 10:40 ` [PATCH v2 2/2] tools/firmware: do not add a .note.gnu.property section Roger Pau Monne
2022-04-04 11:12 ` Anthony PERARD [this message]
2022-04-04 11:19 ` Anthony PERARD
2022-04-04 12:45 ` Jan Beulich
2022-04-04 13:29 ` Roger Pau Monné
2022-04-04 14:00 ` Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YkrSs7DtAh95ndOZ@perard.uk.xensource.com \
--to=anthony.perard@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.