[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/2] tools/firmware: do not add a .note.gnu.property section


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Mon, 4 Apr 2022 12:12:51 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 04 Apr 2022 11:13:00 +0000
  • Ironport-data: A9a23:jgReRKjBTsvbdjY3A9lUofkZX161TRAKZh0ujC45NGQN5FlHY01je htvUWjTbqqLYTb1edt1YYy2pENXvcXXyoNiGwtupCk0Enwb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oDJ9CU6jefSLlbFILas1hpZHGeIcw98z0M78wIFqtQw24LhX1vR4 YqaT/D3YzdJ5RYlagr41IrbwP9flKyaVOQw5wFWiVhj5TcyplFNZH4tDfjZw0jQG+G4KtWSV efbpIxVy0uCl/sb5nFJpZ6gGqECaua60QFjERO6UYD66vRJjnRaPqrWqJPwwKqY4tmEt4kZ9 TlDiXC/YVkSPYPdtOhaaBQGQwtYZfNo153XD0Hq5KR/z2WeG5ft6/BnDUVwNowE4OdnR2pJ8 JT0KhhUMErF3bjvhuvmFK883azPL+GyVG8bknhm0THeC+dgWZ3ZSr/GzdRZwC0xloZFGvO2i 88xN2U+NkSfPUUn1lE/CpVnkL7zvHrGLhYEg0zSlJY15C/M5VkkuFTqGIWMIYHbLSlPpW6Dv X7P9Wn9BhAcNfScxCCD/3bqgfXA9QvkXKoCGbv+8eRl6HWR22gSBRs+RVa95/6jhSaWS99Zb kAZ5Ccqhawz71CwCMnwWQWip3yJtQJaXMBfe8U44gyQzqvf4y6CG3MJCDVGbbQbWNQeHGJwk AXTxpWwWGIp4Ob9pW+hGqm88wixFzk5ISg5aHFUZy1dvffMgpEdt0eaJjp8K5KdgtrwEDD25 jmFqikimrke5fI2O7WHEUPv2Gz1+MWQJuIhzkCOBz/+sFslDGKwT9bwgWU3+8qsO2pworOpm HEf0/aT4+kVZX1mvHzcGb5ddF1FChvsDdE9vbKNN8R6n9hO0yT6FWy13N2YDB00WirjUWW0C HI/QSsLuPdu0IKCNMebmb6ZBcUw1rTHHt/4TP3SZdcmSsEvKF7fpnkyOBLLgzyFfK0QfUcXY 8rznSGEVyhyNEia5GDuG7d1PUEDmEjSOl8/tbiklk/6gNJylVaeSKsfMUvmUwzKxPjsnekhy P4Gb5Hi40wGCIXWO3CLmaZOfQFiBSVqXvje9p0IHtNv1yI7QQnN/deKmuh/E2Gk9owI/tr1E oaVARQHmAKm1SSYcW1nqBlLMdvSYHq2llpjVQREALpi8yNLjVqHhEvHS6YKQA==
  • Ironport-hdrordr: A9a23:reG6BKCHHi4XrGjlHemU55DYdb4zR+YMi2TC1yhKKCC9Vvbo8P xG+85rsyMc6QxhPE3I9urtBEDtexzhHNtOkPAs1NSZLWzbUQmTXeJfBOLZqlWKcUDDH6xmpM VdmsBFeaXN5DNB7foSjjPXL+od
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxx>
> ---
> 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@xxxxxxxxxx>

Thanks,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.