[OS-BUILD PATCHv4 2/2] redhat/spec: use tools_make when building bootstrap bpftool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Artem Savkov <asavkov@xxxxxxxxxx>

redhat/spec: use tools_make when building bootstrap bpftool

Use tools_make macro instead of plain make to build bootstrap bpftool so
that CFLAGS/LDFLAGS are properly set.

Signed-off-by: Artem Savkov <asavkov@xxxxxxxxxx>

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
@@ -1947,6 +1947,9 @@ cp_vmlinux()
 
 %define make %{__make} %{?cross_opts} %{?make_opts} HOSTCFLAGS="%{?build_hostcflags}" HOSTLDFLAGS="%{?build_hostldflags}"
 
+%global tools_make \
+  CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{make} %{?make_opts}
+
 InitBuildVars() {
     # Initialize the kernel .config file and create some variables that are
     # needed for the actual build process.
@@ -2608,7 +2611,7 @@ BuildKernel() {
     # zfcpdump build does not have btf anymore
     if [ "$Variant" != "zfcpdump" ]; then
         # Build the bootstrap bpftool to generate vmlinux.h
-        make -C tools/bpf/bpftool bootstrap
+        %{tools_make} -C tools/bpf/bpftool bootstrap
         tools/bpf/bpftool/bootstrap/bpftool btf dump file vmlinux format c > $RPM_BUILD_ROOT/$DevelDir/vmlinux.h
     fi
 
@@ -2726,9 +2729,6 @@ chmod +x tools/perf/check-headers.sh
 %{perf_make} DESTDIR=$RPM_BUILD_ROOT all
 %endif
 
-%global tools_make \
-  CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{make} %{?make_opts}
-
 %if %{with_tools}
 %ifarch %{cpupowerarchs}
 # cpupower

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2884
--
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux