!140 Call %set_build_flags before %build, %check, and %install stages
From: @liyunfei33 Reviewed-by: @openeuler-basic Signed-off-by: @openeuler-basic
This commit is contained in:
commit
92f114dede
42
Backport-Call-set_build_flags-before-build-check-and.patch
Normal file
42
Backport-Call-set_build_flags-before-build-check-and.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From f5e80fa103926a1eaaae7bc062673eb10ff9370d Mon Sep 17 00:00:00 2001
|
||||||
|
From: liyunfei <liyunfei33@huawei.com>
|
||||||
|
Date: Thu, 17 Aug 2023 19:44:14 +0800
|
||||||
|
Subject: [PATCH] [Backport] Call %set_build_flags before %build, %check, and
|
||||||
|
%install stages
|
||||||
|
|
||||||
|
https://fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck
|
||||||
|
|
||||||
|
Originally by: tstellar
|
||||||
|
---
|
||||||
|
macros | 8 ++++++++
|
||||||
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/macros b/macros
|
||||||
|
index 47a20f5..f4468cd 100755
|
||||||
|
--- a/macros
|
||||||
|
+++ b/macros
|
||||||
|
@@ -81,6 +81,13 @@
|
||||||
|
CXX=%{__cxx}; export CXX ; \
|
||||||
|
CCC="${CCC:-%{__cxx}}" ; export CCC
|
||||||
|
|
||||||
|
+# Automatically use set_build_flags macro for build, check, and
|
||||||
|
+# install phases.
|
||||||
|
+# Use "%undefine _auto_set_build_flags" to disable"
|
||||||
|
+%_auto_set_build_flags 1
|
||||||
|
+%__spec_build_pre %{___build_pre} %{?_auto_set_build_flags:%{set_build_flags}}
|
||||||
|
+%__spec_check_pre %{___build_pre} %{?_auto_set_build_flags:%{set_build_flags}}
|
||||||
|
+
|
||||||
|
#For backwards compatibility only.
|
||||||
|
%__global_cflags %{build_cflags}
|
||||||
|
%__global_cxxflags %{build_cxxflags}
|
||||||
|
@@ -141,6 +148,7 @@
|
||||||
|
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"\
|
||||||
|
mkdir -p `dirname "$RPM_BUILD_ROOT"`\
|
||||||
|
mkdir "$RPM_BUILD_ROOT"\
|
||||||
|
+ %{?_auto_set_build_flags:%{set_build_flags}}\
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
# ---- Expanded at end of %install scriptlet.
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -32,6 +32,7 @@ Patch18: fix-brp-ldconfig-riscv-default-library-directory.patch
|
|||||||
Patch19: add-pyproject-macros.patch
|
Patch19: add-pyproject-macros.patch
|
||||||
Patch20: add-pytest-and-tox-macros.patch
|
Patch20: add-pytest-and-tox-macros.patch
|
||||||
Patch21: Backport-Add-support-for-selecting-a-clang-as-a-tool.patch
|
Patch21: Backport-Add-support-for-selecting-a-clang-as-a-tool.patch
|
||||||
|
Patch22: Backport-Call-set_build_flags-before-build-check-and.patch
|
||||||
|
|
||||||
Provides: python-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
|
Provides: python-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||||
Provides: python2-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
|
Provides: python2-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||||
@ -143,6 +144,9 @@ sed -i "s/__vendor/%{vendor}/g" `grep "__vendor" -rl %{buildroot}%{_rpmconfigdir
|
|||||||
%{rpmvdir}/find-requires.ksyms
|
%{rpmvdir}/find-requires.ksyms
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 17 2023 liyunfei <liyunfei33@huawei.com> - 30-41
|
||||||
|
- Backport Call %%set_build_flags before %%build, %%check, and %%install stages
|
||||||
|
|
||||||
* Thu Aug 17 2023 liyunfei <liyunfei33@huawei.com> - 30-41
|
* Thu Aug 17 2023 liyunfei <liyunfei33@huawei.com> - 30-41
|
||||||
- Backport Add support for selecting a clang as a tool
|
- Backport Add support for selecting a clang as a tool
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user