Skip to content

Commit 631aa87

Browse files
redhat/kernel.spec.template: Link rtla against in-tree libcpupower
JIRA: https://issues.redhat.com/browse/RHEL-40744 Upstream Status: RHEL only To build rtla with --deepest-idle-state support, it requires cpuidle.h and libcpupower to be present. Pass necessary LDFLAGS and INCLUDES to make the rtla build find in-tree libcpupower that is built before rtla. If not on %{cpupowerarchs}, built rtla without libcpupower support. Signed-off-by: Tomas Glozar <tglozar@redhat.com>
1 parent 37525f4 commit 631aa87

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

redhat/kernel.spec.template

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3106,6 +3106,13 @@ chmod +x tools/perf/check-headers.sh
31063106
%global tools_make \
31073107
CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" EXTRA_CFLAGS="${RPM_OPT_FLAGS}" %{make} %{?make_opts}
31083108

3109+
%ifarch %{cpupowerarchs}
3110+
# link against in-tree libcpupower for idle state support
3111+
%global rtla_make %{tools_make} LDFLAGS="%{__global_ldflags} -L../../power/cpupower" INCLUDES="-I../../power/cpupower/lib"
3112+
%else
3113+
%global rtla_make %{tools_make}
3114+
%endif
3115+
31093116
%if %{with_tools}
31103117
%ifarch %{cpupowerarchs}
31113118
# cpupower
@@ -3165,7 +3172,7 @@ pushd tools/verification/rv/
31653172
popd
31663173
pushd tools/tracing/rtla
31673174
%{log_msg "build rtla"}
3168-
%{tools_make}
3175+
%{rtla_make}
31693176
popd
31703177
%endif
31713178

0 commit comments

Comments
 (0)