commit:     06d16fb891cde651dc8b5adc08443751a0d056c1
Author:     Violet Purcell <vimproved <AT> inventati <DOT> org>
AuthorDate: Tue Jul 15 05:30:12 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Jul 15 05:43:27 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06d16fb8

sys-kernel/scx: fix building 1.0.14 with GCC

This patch was accidentally clang-specific, as
__builtin_preserve_enum_value takes 2 arguments in clang versus 3 in
GCC.

Closes: https://bugs.gentoo.org/960099
Signed-off-by: Violet Purcell <vimproved <AT> inventati.org>
Part-of: https://github.com/gentoo/gentoo/pull/43008
Closes: https://github.com/gentoo/gentoo/pull/43008
Closes: https://github.com/gentoo/gentoo/pull/43006
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../scx/files/scx-1.0.14-builtin-preserve-enum-value.patch     | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/sys-kernel/scx/files/scx-1.0.14-builtin-preserve-enum-value.patch 
b/sys-kernel/scx/files/scx-1.0.14-builtin-preserve-enum-value.patch
index 897b49d16117..39fde14da297 100644
--- a/sys-kernel/scx/files/scx-1.0.14-builtin-preserve-enum-value.patch
+++ b/sys-kernel/scx/files/scx-1.0.14-builtin-preserve-enum-value.patch
@@ -1,12 +1,16 @@
-Taken from 
https://github.com/sched-ext/scx/commit/7d9b2cc26473526883297df78e8eee3f2e7b6194.
+This patch is made obsolete by 
https://github.com/sched-ext/scx/commit/7d9b2cc26473526883297df78e8eee3f2e7b6194.
 
 --- a/lib/scxtest/overrides.h
 +++ b/lib/scxtest/overrides.h
-@@ -13,7 +13,7 @@
+@@ -13,7 +13,11 @@
   * that we want to get rid of that belongs here.
   */
  #define __builtin_preserve_field_info(x,y) 1
--#define __builtin_preserve_enum_value(x,y,z) 1
++#ifdef __clang__
 +#define __builtin_preserve_enum_value(x,y) 1
++#else
+ #define __builtin_preserve_enum_value(x,y,z) 1
++#endif
  
  #define bpf_addr_space_cast(var, dst_as, src_as)
+ 

Reply via email to