Will this GCC modification work the way I think it will work?

Asked by Vanida Plamondon on 2019-02-26

I have been working on some PPA's that will provide standard Ubuntu and Linux Mint packages that are compiled with the znver1 cpu optimisations (Ryzen CPU). It has been quite tedious (though not particularly hard) to modify existing packages to be compiled with "-march=znver1" cflags and cxxflags, and since I started creating a toolchain to make the builds in the PPAs compile more reliably while producing broken less packages, I decided to modify GCC to always spit out ryzen optimised code automatically regardless of what code is thrown at it.

I changed each instance of =generic in gcc/config.gcc to =znver1, and each instance of cpu=<something> to cpu=znver1, and each instance of arch=<something> that wasn't i386, i486, i586, i686, i786, x86-64, or x86_64 to arch=znver1.

So what I think will happen is that I will set a PPA with a dependency on the PPA with the modified GCC, and any package I upload/copy to the aforementioned PPA that is compiling to x86 code will compile as though I set the "-march=znver1" option. Does anyone know whether or not this is going to work the way I think it will, or know how I can test to see if such is the case with the resulting binary packages?

Question information

Language:
English Edit question
Status:
Answered
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
2019-02-26
Last reply:
2019-03-05
Colin Watson (cjwatson) said : #1

Build-dependencies of PPAs will indeed be satisfied using PPA dependencies, including upgrading build-essential packages where suitable, so as long as you got all the package names and versions right then that much should work; you can look at build logs to check whether the right packages were pulled in as part of the build.

However, Launchpad staff aren't GCC experts so we can't advise you on whether your GCC changes are suitable in general, or how to test binary packages aside from inspecting build logs.

Can you help with this problem?

Provide an answer of your own, or ask Vanida Plamondon for more information if necessary.

To post a message you must log in.