Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2056691

Summary: Building with -mcpu=native on new Arm type fails
Product: Red Hat Enterprise Linux 8 Reporter: Peter Rival <frival>
Component: binutilsAssignee: Nick Clifton <nickc>
binutils sub component: system-version QA Contact: Miloš Prchlík <mprchlik>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: unspecified CC: ahajkova, bgray, dmalcolm, dshaks, efuller, fweimer, gcase, jakub, jbastian, mcermak, mpolacek, mprchlik, nickc, ohudlick, sipoyare, tumeya, vkadlcik
Version: 8.5Keywords: FutureFeature, Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: aarch64   
OS: Linux   
Whiteboard:
Fixed In Version: binutils-2.30-115.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2071038 (view as bug list) Environment:
Last Closed: 2022-11-08 10:45:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2071038    

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