You are not logged in.
So I have a lot of programs I download from the AUR (mostly using the yay wrapper), many of which are high-performance programs that I would rather have run faster. I've noticed that almost all of the packages build with -O2 and -march=generic. Is there any way for me to override this setting to -O3 (on some of them that I know this is safe on) and -march=native? Since I'm willing to experiment with stability and I'm only gonna be running the binaries on my own computer?
Last edited by Numaurasis (2020-05-10 23:48:51)
Offline
I want to do it from yay automatically every time I build that specific package, sorry if that wasn't clear.
Last edited by Numaurasis (2020-05-10 22:12:28)
Offline
You followed the link Trilby provided and yay is not using the flags?
Offline
What specific package? You haven't mentioned a specific package. In fact, your title says you want to use these settings for all programs. But in any case, yay is irrelevant. If you have no idea what yay is doing, you most definitely shouldn't be using it.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Ok, let me clarify. I want a handful of specific packages to be compiled with -O3, as I said before " Is there any way for me to override this setting to -O3 (on some of them that I know this is safe on)." I want the rest to be compiled with -O2 and everything to have -march=native. I know what yay is doing, it's a wrapper for pacman that automates the process of downloading AUR packages, managing the build files and building them.
Offline
Editted post. I have nothing constructive to offer here. OP, don't expect to be handheld, make some effort.
Last edited by Trilby (2020-05-10 22:29:24)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Trilby already provided the solution for changes for every build.
For specific builds you can:
Alter the PKGBUILD to change CFLAGS/CXXFLAGS
Use an alternate config file for makepkg
Set CFLAGS/CXXFLAGS as environment variables so the values set in makepkg.conf are overridden then unset the variables afterwards if you exported them.
Edit:
The above all assumes the package being built respects CFLAGS/CXXFLAGS.
Last edited by loqs (2020-05-10 22:33:03)
Offline
The packages I were trying to compile with -O3 and -march=native did not respect CFLAGS/CXXFLAGS, I figured out how to change the compiler flags another way, marking as solved.
Offline
If yay supported being fed a makepkg.conf per operation, then you could use yay.
Offline