Hi Jakub,

> -----Original Message-----
> From: Jakub Jelinek <ja...@redhat.com>
> Sent: 15 April 2020 08:28
> To: Richard Earnshaw <richard.earns...@arm.com>; Richard Sandiford
> <richard.sandif...@arm.com>; Kyrylo Tkachov <kyrylo.tkac...@arm.com>;
> Richard Henderson <r...@twiddle.net>
> Cc: gcc-patches@gcc.gnu.org
> Subject: [PATCH] aarch64: Fix bootstrap with old binutils [PR93053]
> 
> Hi!
> 
> As reported in the PR, GCC 10 (and also 9.3.1 but not 9.3.0) fails to build
> when using older binutils which lack LSE support, because those instructions
> are used in libgcc.
> Thanks to Kyrylo's hint, the following patches (hopefully) allow it to build
> even with older binutils by using .inst directive if LSE support isn't
> available in the assembler.
> 
> There are two versions of the patch, one is using .macro to ignore the
> operands when emitting .inst, the other moves the operands for the
> HAVE_AS_LSE case into the macro.  My slight preference is the latter,
> because for maintanance it makes it clear that if one wants to use different
> operands, one needs to use a different macro and different .inst
> constant(s).

I'm not too worried about the difference really. Let's go with the second 
version for the sake of making a decision.

> 
> I've been testing this in distro scratch builds, so I don't really have
> there the old assembler, but bootstrapped/regtested 5 times, for each of the
> two patches once as is and once with s/cas/caszz/ in the configure{.ac,} to
> simulate missing support of LSE (and verified that as is the build logs
> contain checking...supports LSE yes and with the tweaked ...supports LSE no)
> and once vanilla trunk, and aarch64-linux-gnu-objdump -dr libgcc.a is
> identical from all 5 builds.
> 
> Ok for trunk (which version), or do we want to instead document a newer
> binutils requirement?  Yet another option is to go with the patch for a
> while and later bump the requirement and revert the patch.

I'd definitely like the patch to go in as we've gotten requests to backport the 
OOL feature to GCC 8 as well...
Eventually non-LSE assemblers will be unsuitable for various reasons and I 
expect we'll enforce a minimum required binutils version, at which point I 
expect we can revert this patch. Is there an effective way of making sure we 
don't forget to do that? (A bugzilla entry?)

Thanks for working on this,
Kyrill

> 
>       Jakub

Reply via email to