Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 695420 - sys-devel/gcc: arm64 overriding initial -march=native
Summary: sys-devel/gcc: arm64 overriding initial -march=native
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL: https://gcc.gnu.org/bugzilla/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-22 21:05 UTC by Aaron Bauman (RETIRED)
Modified: 2023-09-28 11:55 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Bauman (RETIRED) gentoo-dev 2019-09-22 21:05:51 UTC
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.
Comment 1 Matt Turner gentoo-dev 2019-09-22 21:09:42 UTC
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.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2019-09-22 21:13:11 UTC
We will unlikely fix gcc driver on our own. That has to be fixed upstream first.
Comment 4 Larry the Git Cow gentoo-dev 2019-09-26 22:06:56 UTC
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(+)
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2019-09-26 22:08:18 UTC
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.
Comment 6 Larry the Git Cow gentoo-dev 2019-11-04 08:30:42 UTC
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(-)
Comment 7 Larry the Git Cow gentoo-dev 2019-11-04 09:07:58 UTC
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(+)
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2019-11-04 09:09:46 UTC
Released in ::gentoo as gcc-9.2.0-r2. Please give it a test.