graysky2 / kernel_compiler_patch

Kernel patch enables compiler optimizations for additional CPUs.
GNU General Public License v2.0
658 stars 77 forks source link

Add support for MZEN3 (Zen 3) #59

Closed Devorlon closed 3 years ago

Devorlon commented 3 years ago

Hi, I'm new to git so if I've done something wrong feel free to tell me.

Devorlon commented 3 years ago

So I actually tested it using TKG's Linux-TKG script and I'm getting an error:

  -> Applying graysky's cpu opts patch
patch: **** malformed patch at line 221: +    Select this for AMD Family 17h Zen 3 processors.

==> ERROR: An error was encountered applying patches. It was logged to the prepare.log file.

And if I remove the new 'code' line 221 becomes:

@@ -260,6 +338,7 @@ config MVIAC7

Which means that the diffs got messed up?

graysky2 commented 3 years ago

10.2.0 is the current gcc release and I do not believe it supports the flag you wish to add. EDIT: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3e2ae3ee285a57455d5a23bd352a68c289130186

Perhaps in gcc 11.0 ... or maybe you're running a nightly. In any case, try https://github.com/graysky2/kernel_gcc_patch/commit/2e179c9870003458a86ee9e487134e82524c45c0