[PATCH 0/3] tools/sched_ext: fix compilation issues

Zhao Mengmeng posted 3 patches 1 month, 1 week ago
tools/sched_ext/Makefile                         | 2 ++
tools/testing/selftests/sched_ext/Makefile       | 2 ++
tools/testing/selftests/sched_ext/peek_dsq.bpf.c | 4 ++--
3 files changed, 6 insertions(+), 2 deletions(-)
[PATCH 0/3] tools/sched_ext: fix compilation issues
Posted by Zhao Mengmeng 1 month, 1 week ago
From: Zhao Mengmeng <zhaomengmeng@kylinos.cn>

This series addresses compilation issues in the sched_ext (scx)
tooling and selftests when using Clang 17.

1. Add -fms-extensions flags to scheduler and selftests to avoid build
warning like "declaration does not declare anything"
2. Use signed div for peek_dsq.bpf.c to avoid clang 17 crash.

Zhao Mengmeng (3):
  tools/sched_ext: Add -fms-extensions to bpf build flags
  selftests/sched_ext: Add -fms-extensions to bpf build flags
  selftests/sched_ext: Fix peek_dsq.bpf.c compile error for clang 17

 tools/sched_ext/Makefile                         | 2 ++
 tools/testing/selftests/sched_ext/Makefile       | 2 ++
 tools/testing/selftests/sched_ext/peek_dsq.bpf.c | 4 ++--
 3 files changed, 6 insertions(+), 2 deletions(-)

-- 
2.43.0
Re: [PATCH 0/3] tools/sched_ext: fix compilation issues
Posted by Tejun Heo 1 month, 1 week ago
> Zhao Mengmeng (3):
>   tools/sched_ext: Add -fms-extensions to bpf build flags
>   selftests/sched_ext: Add -fms-extensions to bpf build flags
>   selftests/sched_ext: Fix peek_dsq.bpf.c compile error for clang 17

Applied 1-3 to sched_ext/for-7.0-fixes.

Thanks.

--
tejun
Re: [PATCH 0/3] tools/sched_ext: fix compilation issues
Posted by Andrea Righi 1 month, 1 week ago
On Tue, Mar 03, 2026 at 03:23:14PM +0800, Zhao Mengmeng wrote:
> From: Zhao Mengmeng <zhaomengmeng@kylinos.cn>
> 
> This series addresses compilation issues in the sched_ext (scx)
> tooling and selftests when using Clang 17.
> 
> 1. Add -fms-extensions flags to scheduler and selftests to avoid build
> warning like "declaration does not declare anything"
> 2. Use signed div for peek_dsq.bpf.c to avoid clang 17 crash.

I confirm this removes the annoying warnings and these options are used in
other BPF selftests as well, so looks good to me.

Reviewed-by: Andrea Righi <arighi@nvidia.com>

Thanks!
-Andrea

> 
> Zhao Mengmeng (3):
>   tools/sched_ext: Add -fms-extensions to bpf build flags
>   selftests/sched_ext: Add -fms-extensions to bpf build flags
>   selftests/sched_ext: Fix peek_dsq.bpf.c compile error for clang 17
> 
>  tools/sched_ext/Makefile                         | 2 ++
>  tools/testing/selftests/sched_ext/Makefile       | 2 ++
>  tools/testing/selftests/sched_ext/peek_dsq.bpf.c | 4 ++--
>  3 files changed, 6 insertions(+), 2 deletions(-)
> 
> -- 
> 2.43.0
>