Re: [OS-BUILD PATCH] Use __make macro instead of make

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

 



On Tue, May 05, 2020 at 08:50:59PM -0000, Gitlab Bridge on behalf of tstellar wrote:
> From: Tom Stellard <tstellar@xxxxxxxxxx>
> 
> This will make it possible for buildroots to inject their own arguments to
> make (e.g. CC=clang) by overriding the __make macro.
> ---
>  redhat/kernel.spec.template | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
> index 579344b69485..80d76df27ee0 100644
> --- a/redhat/kernel.spec.template
> +++ b/redhat/kernel.spec.template
> @@ -1316,7 +1316,7 @@ cp_vmlinux()
>  %define build_hostldflags %{?build_ldflags}
>  %endif
>  
> -%define make make %{?cross_opts} %{?make_opts} HOSTCFLAGS="%{?build_hostcflags}" HOSTLDFLAGS="%{?build_hostldflags}"
> +%define make %{__make} %{?cross_opts} %{?make_opts} HOSTCFLAGS="%{?build_hostcflags}" HOSTLDFLAGS="%{?build_hostldflags}"
>  
>  BuildKernel() {
>      MakeTarget=$1
> @@ -1878,7 +1878,7 @@ BuildKernel %make_target %kernel_image %{_use_vdso}
>  %endif
>  
>  %global perf_make \
> -  make -s EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{?cross_opts} -C tools/perf V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 prefix=%{_prefix} PYTHON=%{__python3}
> +  %{__make} -s EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{?cross_opts} -C tools/perf V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 prefix=%{_prefix} PYTHON=%{__python3}
>  %if %{with_perf}
>  # perf
>  # make sure check-headers.sh is executable
> @@ -1917,16 +1917,16 @@ pushd tools/thermal/tmon/
>  popd
>  pushd tools/iio/
>  # Needs to be fixed to pick up CFLAGS
> -make
> +%{__make}
>  popd
>  pushd tools/gpio/
>  # Needs to be fixed to pick up CFLAGS
> -make
> +%{__make}
>  popd
>  %endif
>  
>  %global bpftool_make \
> -  make EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT V=1
> +  %{__make} EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT V=1
>  %if %{with_bpftool}
>  pushd tools/bpf/bpftool
>  %{bpftool_make}
> @@ -1944,7 +1944,7 @@ popd
>  
>  %if %{with_doc}
>  # Make the HTML pages.
> -make PYTHON=/usr/bin/python3 htmldocs || %{doc_build_fail}
> +%{__make} PYTHON=/usr/bin/python3 htmldocs || %{doc_build_fail}
>  
>  # sometimes non-world-readable files sneak into the kernel source tree
>  chmod -R a=rX Documentation
> @@ -2045,7 +2045,7 @@ tar -h -f - --exclude=man --exclude='.*' -c Documentation | tar xf - -C $docdir
>  
>  %if %{with_headers}
>  # Install kernel headers
> -make ARCH=%{hdrarch} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install
> +%{__make} ARCH=%{hdrarch} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install
>  
>  find $RPM_BUILD_ROOT/usr/include \
>       \( -name .install -o -name .check -o \
> @@ -2063,7 +2063,7 @@ mkdir -p $RPM_BUILD_ROOT/usr/tmp-headers
>  
>  for arch in $HDR_ARCH_LIST; do
>  	mkdir $RPM_BUILD_ROOT/usr/tmp-headers/arch-${arch}
> -	make ARCH=${arch} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr/tmp-headers/arch-${arch} headers_install
> +	%{__make} ARCH=${arch} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr/tmp-headers/arch-${arch} headers_install
>  done
>  
>  find $RPM_BUILD_ROOT/usr/tmp-headers \
> @@ -2149,14 +2149,14 @@ pushd tools/thermal/tmon
>  %{tools_make} INSTALL_ROOT=%{buildroot} install
>  popd
>  pushd tools/iio
> -make DESTDIR=%{buildroot} install
> +%{__make} DESTDIR=%{buildroot} install
>  popd
>  pushd tools/gpio
> -make DESTDIR=%{buildroot} install
> +%{__make} DESTDIR=%{buildroot} install
>  popd
>  pushd tools/kvm/kvm_stat
> -make INSTALL_ROOT=%{buildroot} install-tools
> -make INSTALL_ROOT=%{buildroot} install-man
> +%{__make} INSTALL_ROOT=%{buildroot} install-tools
> +%{__make} INSTALL_ROOT=%{buildroot} install-man
>  popd
>  %endif

Acked-by: Brian Masney <bmasney@xxxxxxxxxx>
_______________________________________________
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




[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