[PATCH v1] tools: ipxe: update for fixing build with GCC11

Olaf Hering posted 1 patch 2 years, 10 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20210615212613.6270-1-olaf@aepfle.de
There is a newer version of this series
tools/firmware/etherboot/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[PATCH v1] tools: ipxe: update for fixing build with GCC11
Posted by Olaf Hering 2 years, 10 months ago
Use a snapshot which includes commit
f3f568e382a5f19824b3bfc6081cde39eee661e8 ("[crypto] Add
memory output constraints for big-integer inline assembly"),
which fixes build with gcc11.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 tools/firmware/etherboot/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/firmware/etherboot/Makefile b/tools/firmware/etherboot/Makefile
index ed9e11305f..23b3f6ca9d 100644
--- a/tools/firmware/etherboot/Makefile
+++ b/tools/firmware/etherboot/Makefile
@@ -10,7 +10,8 @@ else
 IPXE_GIT_URL ?= git://git.ipxe.org/ipxe.git
 endif
 
-IPXE_GIT_TAG := 988d2c13cdf0f0b4140685af35ced70ac5b3283c
+# put an updated tar.gz on xenbits after changes to this variable
+IPXE_GIT_TAG := bf4ccd4265ac614fbfa38bf168b6eeaf4c17d51e
 
 IPXE_TARBALL_URL ?= $(XEN_EXTFILES_URL)/ipxe-git-$(IPXE_GIT_TAG).tar.gz
 

Re: [PATCH v1] tools: ipxe: update for fixing build with GCC11
Posted by Andrew Cooper 2 years, 10 months ago
On 15/06/2021 22:26, Olaf Hering wrote:
> Use a snapshot which includes commit
> f3f568e382a5f19824b3bfc6081cde39eee661e8 ("[crypto] Add
> memory output constraints for big-integer inline assembly"),
> which fixes build with gcc11.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> ---
>  tools/firmware/etherboot/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/firmware/etherboot/Makefile b/tools/firmware/etherboot/Makefile
> index ed9e11305f..23b3f6ca9d 100644
> --- a/tools/firmware/etherboot/Makefile
> +++ b/tools/firmware/etherboot/Makefile
> @@ -10,7 +10,8 @@ else
>  IPXE_GIT_URL ?= git://git.ipxe.org/ipxe.git
>  endif
>  
> -IPXE_GIT_TAG := 988d2c13cdf0f0b4140685af35ced70ac5b3283c
> +# put an updated tar.gz on xenbits after changes to this variable
> +IPXE_GIT_TAG := bf4ccd4265ac614fbfa38bf168b6eeaf4c17d51e

CI says no.

Gitlab CI is currently fairly red because of a clang build fix which
hasn't made its way into master yet, but this job:

  https://gitlab.com/xen-project/patchew/xen/-/jobs/1349871230

shows a real failure on CentOS 7.

...
  [VERSION] bin/version.rtl8139.rom.o
  [AR] bin/blib.a
ar: creating bin/blib.a
objcopy: invalid option -- 'D'
Usage: objcopy [option(s)] in-file [out-file]
...

~Andrew

Re: [PATCH v1] tools: ipxe: update for fixing build with GCC11
Posted by Olaf Hering 2 years, 10 months ago
Please revert bf4ccd4265ac614fbfa38bf168b6eeaf4c17d51e in ipxe.git, CentOS 7 apparently fails to handle '-D'.

It worked in my testing with SLE12SP5 and SLE15SP3 as a base system.

See below.


I guess for xen.git, updating to just bf4ccd4265ac614fbfa38bf168b6eeaf4c17d51e^ will be good enough.

Olaf

Am Wed, 16 Jun 2021 13:33:52 +0100
schrieb Andrew Cooper <andrew.cooper3@citrix.com>:

> On 15/06/2021 22:26, Olaf Hering wrote:
> > Use a snapshot which includes commit
> > f3f568e382a5f19824b3bfc6081cde39eee661e8 ("[crypto] Add
> > memory output constraints for big-integer inline assembly"),
> > which fixes build with gcc11.
> >
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
> > ---
> >  tools/firmware/etherboot/Makefile | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/firmware/etherboot/Makefile b/tools/firmware/etherboot/Makefile
> > index ed9e11305f..23b3f6ca9d 100644
> > --- a/tools/firmware/etherboot/Makefile
> > +++ b/tools/firmware/etherboot/Makefile
> > @@ -10,7 +10,8 @@ else
> >  IPXE_GIT_URL ?= git://git.ipxe.org/ipxe.git
> >  endif
> >  
> > -IPXE_GIT_TAG := 988d2c13cdf0f0b4140685af35ced70ac5b3283c
> > +# put an updated tar.gz on xenbits after changes to this variable
> > +IPXE_GIT_TAG := bf4ccd4265ac614fbfa38bf168b6eeaf4c17d51e
> 
> CI says no.
> 
> Gitlab CI is currently fairly red because of a clang build fix which
> hasn't made its way into master yet, but this job:
> 
>   https://gitlab.com/xen-project/patchew/xen/-/jobs/1349871230
> 
> shows a real failure on CentOS 7.
> 
> ...
>   [VERSION] bin/version.rtl8139.rom.o
>   [AR] bin/blib.a
> ar: creating bin/blib.a
> objcopy: invalid option -- 'D'
> Usage: objcopy [option(s)] in-file [out-file]
> ...
> 
> ~Andrew

Re: [PATCH v1] tools: ipxe: update for fixing build with GCC11
Posted by Bernhard M. Wiedemann 2 years, 10 months ago
So this means, CentOS7 binutils has
9cb80f72d8b from 2011-12-21
but not
git blame binutils/objcopy.c|grep enable-determini
955d0b3bd75 (Roland McGrath       2013-01-07 17:40:59 +0000  549)   -D
--enable-deterministic-archives\n\
2e30cb575a1 (Cary Coutant         2012-04-25 17:50:14 +0000  555)   -D
--enable-deterministic-archives\n\


one way out could be to call objcopy -D $PARAMS || objcopy $PARAMS




On 16/06/2021 14.58, Olaf Hering wrote:
> Please revert bf4ccd4265ac614fbfa38bf168b6eeaf4c17d51e in ipxe.git, CentOS 7 apparently fails to handle '-D'.
> 
> It worked in my testing with SLE12SP5 and SLE15SP3 as a base system.
> 
> See below.
> 
> 
> I guess for xen.git, updating to just bf4ccd4265ac614fbfa38bf168b6eeaf4c17d51e^ will be good enough.
> 
> Olaf
> 
> Am Wed, 16 Jun 2021 13:33:52 +0100
> schrieb Andrew Cooper <andrew.cooper3@citrix.com>:
> 
>> On 15/06/2021 22:26, Olaf Hering wrote:
>>> Use a snapshot which includes commit
>>> f3f568e382a5f19824b3bfc6081cde39eee661e8 ("[crypto] Add
>>> memory output constraints for big-integer inline assembly"),
>>> which fixes build with gcc11.
>>>
>>> Signed-off-by: Olaf Hering <olaf@aepfle.de>
>>> ---
>>>  tools/firmware/etherboot/Makefile | 3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tools/firmware/etherboot/Makefile b/tools/firmware/etherboot/Makefile
>>> index ed9e11305f..23b3f6ca9d 100644
>>> --- a/tools/firmware/etherboot/Makefile
>>> +++ b/tools/firmware/etherboot/Makefile
>>> @@ -10,7 +10,8 @@ else
>>>  IPXE_GIT_URL ?= git://git.ipxe.org/ipxe.git
>>>  endif
>>>  
>>> -IPXE_GIT_TAG := 988d2c13cdf0f0b4140685af35ced70ac5b3283c
>>> +# put an updated tar.gz on xenbits after changes to this variable
>>> +IPXE_GIT_TAG := bf4ccd4265ac614fbfa38bf168b6eeaf4c17d51e
>>
>> CI says no.
>>
>> Gitlab CI is currently fairly red because of a clang build fix which
>> hasn't made its way into master yet, but this job:
>>
>>   https://gitlab.com/xen-project/patchew/xen/-/jobs/1349871230
>>
>> shows a real failure on CentOS 7.
>>
>> ...
>>   [VERSION] bin/version.rtl8139.rom.o
>>   [AR] bin/blib.a
>> ar: creating bin/blib.a
>> objcopy: invalid option -- 'D'
>> Usage: objcopy [option(s)] in-file [out-file]
>> ...
>>
>> ~Andrew
> 

Re: [PATCH v1] tools: ipxe: update for fixing build with GCC11
Posted by Michael Brown 2 years, 10 months ago
On 16/06/2021 14:33, Bernhard M. Wiedemann wrote:
> So this means, CentOS7 binutils has
> 9cb80f72d8b from 2011-12-21
> but not
> git blame binutils/objcopy.c|grep enable-determini
> 955d0b3bd75 (Roland McGrath       2013-01-07 17:40:59 +0000  549)   -D
> --enable-deterministic-archives\n\
> 2e30cb575a1 (Cary Coutant         2012-04-25 17:50:14 +0000  555)   -D
> --enable-deterministic-archives\n\
> 
> one way out could be to call objcopy -D $PARAMS || objcopy $PARAMS

Testing on a clean "centos:7" container shows that "objcopy -D" works as 
expected (and "objcopy --help" shows the option as existing).

This container environment has /etc/centos-release showing:

   CentOS Linux release 7.6.1810 (Core)

Could you provide a simple environment in which to reproduce the problem?

Thanks,

Michael

Re: [PATCH v1] tools: ipxe: update for fixing build with GCC11
Posted by Michael Brown 2 years, 10 months ago
On 17/06/2021 13:55, Michael Brown wrote:
>> one way out could be to call objcopy -D $PARAMS || objcopy $PARAMS
> 
> Testing on a clean "centos:7" container shows that "objcopy -D" works as 
> expected (and "objcopy --help" shows the option as existing).
> 
> This container environment has /etc/centos-release showing:
> 
>    CentOS Linux release 7.6.1810 (Core)
> 
> Could you provide a simple environment in which to reproduce the problem?

I've managed to reproduce it using "centos:7.0.1406".  It should be 
fixed in commit

   https://github.com/ipxe/ipxe/commit/51c88a4a6

Thanks for the report!

Michael