From: Scott Weaver <scweaver(a)redhat.com>
redhat/kernel.spec.template: add extra flags for tools build
With 01474dc706cab ('tools/rtla: Use tools/build makefiles to build
rtla') a feature check was added to ensure the build dependencies are
installed. Due to a compiler/linker object type mismatch that test fails
to build and incorrectly reports that the libtracefs dependency is not
installed when in fact it is.
01:01:25 Auto-detecting system features:
01:01:25 ... libtraceevent: [on]
01:01:25 ... libtracefs: [OFF]
01:01:25
01:01:26 libtracefs is missing. Please install libtracefs-dev/libtracefs-devel
01:01:26 Makefile.config:46: *** Please, check the errors above.. Stop.
The feature check error being reported:
usr/bin/ld: /tmp/cc7X1j0w.o: relocation R_X86_64_32 against `.rodata'
can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value collect2:
error: ld returned 1 exit status
Signed-off-by: Scott Weaver <scweaver(a)redhat.com>
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -2852,7 +2852,7 @@ chmod +x tools/perf/check-headers.sh
%endif
%global tools_make \
- CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{make}
%{?make_opts}
+ CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}"
EXTRA_CFLAGS="${RPM_OPT_FLAGS}" %{make} %{?make_opts}
%if %{with_tools}
%ifarch %{cpupowerarchs}
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3033