When compiling dev-libs/nss on arm64 it was discovered (thanks to Matt, Michal, and Jory) that the crypto extension was not being enabled. By having COMMON_FLAGS="-march=native" the package was being overridden when adding an additional "-march=armv8-a+crypto". This is similar to bug 679738.
Yes, the issue is that later -march=* does not override previous -march=native. This affects arm (I've noticed with pixman since it compiles a file with -march=iwmmxt) as well as arm64 as notice by Aaron.
We will unlikely fix gcc driver on our own. That has to be fixed upstream first.
Patch is now upstream. https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=276148 https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=537fd9d4dcaed8dae6248ec22a50603a591a3752
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f1aedb7402ea1a0dec4d02e85fe7a3889c41f249 commit f1aedb7402ea1a0dec4d02e85fe7a3889c41f249 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-09-26 22:05:42 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-09-26 22:05:42 +0000 9.2.0: backport arm64 -march=native precedence handling, bug #695420 Reported-by: Aaron Bauman Bug: https://bugs.gentoo.org/695420 Bug: https://gcc.gnu.org/PR69471#c13 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> 9.2.0/gentoo/30_all_arm64-march-native.patch | 90 ++++++++++++++++++++++++++++ 9.2.0/gentoo/README.history | 3 + 2 files changed, 93 insertions(+)
Queued patch for gcc-9.2.0. Will be in a gcc revbump in 2-3 weeks from now. Meanwhile you can drop the patch to /etc/portage/patches/sys-devel/gcc:9.2.0/ and check if it works for you.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=af8edf96ed0717a820a0c38202eb94de54bc2c83 commit af8edf96ed0717a820a0c38202eb94de54bc2c83 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-11-04 08:28:24 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-11-04 08:28:24 +0000 9.2.0: cut 3 patchset New patch: + 30_all_arm64-march-native.patch: fix -march= ordering handling on arm64 Dropped patch: - 27_all_sparc-PIC-constant-PR91472.patch: restore python codegen on sparc Bug: https://bugs.gentoo.org/697708 Bug: https://bugs.gentoo.org/695420 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> 9.2.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5322b7cf3ceaa44b9effa479de112f4a47044a33 commit 5322b7cf3ceaa44b9effa479de112f4a47044a33 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-11-04 09:05:04 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-11-04 09:07:44 +0000 sys-devel/gcc: 9.2.0: cut 3 patchset New patch: + 30_all_arm64-march-native.patch: fix -march= ordering handling on arm64 Dropped patch: - 27_all_sparc-PIC-constant-PR91472.patch: restore python codegen on sparc While at it switched to EAPI=7 to add support for selective stripping. Bug: https://bugs.gentoo.org/697708 Bug: https://bugs.gentoo.org/695420 Bug: https://bugs.gentoo.org/686512 Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-9.2.0-r2.ebuild | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+)
Released in ::gentoo as gcc-9.2.0-r2. Please give it a test.