I realise that, however, debian packages seem to use multiple build systems (automake, dh_automake, ninja, etc.), and have no standard (that is adhered to), for setting up each build environment. Additionally, some packages seem to throw their build configuration setup throughout multiple files that are difficult to pin down, and usually have little documentation. I am trying to set up a toolchain that automatically fetches upstream sources when updated, updates the changelog to reflect that the package is znver1 optimised, and automatically compiles the package with the znver1 optimisations. Even worse, many packages use different environmental variables, and some even unset some of such standard variables.
This means I need to setup gcc so that any x86 code thrown at it is automatically compiled with znver1 optimisations to overcome these limitations. I have no idea if the config.gcc modification works as I don't know if it works the way I think it works, and I haven't figured out how to test the packages I have compiled with gcc. On Fri, Mar 8, 2019 at 4:00 AM Richard Biener <richard.guent...@gmail.com> wrote: > > On Fri, Mar 8, 2019 at 8:56 AM Vanida Plamondon > <vanida.plamon...@gmail.com> wrote: > > > > 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. > > You can configure with --with-arch=znver1 --with-tune=znver1 to > achieve the same effect. > > > 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? > > > > Also, is there a better way to do what I am trying to do?