Bug 2056691 - Building with -mcpu=native on new Arm type fails
Summary: Building with -mcpu=native on new Arm type fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: binutils
Version: 8.5
Hardware: aarch64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Nick Clifton
QA Contact: Miloš Prchlík
URL:
Whiteboard:
Depends On:
Blocks: 2071038
TreeView+ depends on / blocked
 
Reported: 2022-02-21 21:19 UTC by Peter Rival
Modified: 2023-07-18 14:19 UTC (History)
17 users (show)

Fixed In Version: binutils-2.30-115.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2071038 (view as bug list)
Environment:
Last Closed: 2022-11-08 10:45:15 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-112955 0 None None None 2022-02-21 21:21:29 UTC
Red Hat Product Errata RHBA-2022:7693 0 None None None 2022-11-08 10:45:25 UTC

Comment 8 Nick Clifton 2022-04-01 16:24:58 UTC
OK, this is a binutils problem.

We need to backport this commit to the assembler:

https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=af4bcb4ce6939da1738c847a06789d2223b67ca4

and then additionally the patch that allows the rng extension to be used without armv8.5:

https://sourceware.org/pipermail/binutils/2022-March/120304.html

Comment 9 Nick Clifton 2022-04-05 10:49:14 UTC
Fixed in binutils-2.30-115.el8

Comment 19 Miloš Prchlík 2022-05-19 11:57:03 UTC
Verified with binutils-2.30-116.el8 reproducer from comment #5:

$ cat x.c
int
main ()
{
}
$ 

$ cat flags
processor       : 0
BogoMIPS        : 2100.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs dcpodp svei8mm svebf16 i8mm bf16 dgh rng
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x1
CPU part        : 0xd40
CPU revision    : 1
$ 

$ GCC_CPUINFO=flags gcc x.c -mcpu=native
Assembler messages:
Error: unknown architectural extension `rng+nodotprod+nofp16fml'
Error: unrecognized option -march=armv8.4-a+crypto+rcpc+sha3+sm4+sve+rng+nodotprod+nofp16fml
$ 

$ GCC_CPUINFO=flags gcc x.c -mcpu=native
$

Comment 23 errata-xmlrpc 2022-11-08 10:45:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (binutils bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:7693


Note You need to log in before you can comment on or make changes to this bug.