Accepting request 702804 from home:marxin:branches:Base:System
- Add adopt-language-specific-build_fooflags-macros-from-F.patch (9a50846ceeef2add2344dd463c5562bd69496a23) from master. OBS-URL: https://build.opensuse.org/request/show/702804 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=497
This commit is contained in:
parent
e676f6a5a3
commit
bad7233d87
63
adopt-language-specific-build_fooflags-macros-from-F.patch
Normal file
63
adopt-language-specific-build_fooflags-macros-from-F.patch
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
From 9a50846ceeef2add2344dd463c5562bd69496a23 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Panu Matilainen <pmatilai@redhat.com>
|
||||||
|
Date: Mon, 6 May 2019 14:44:30 +0300
|
||||||
|
Subject: [PATCH] Adopt language-specific %build_fooflags macros from Fedora
|
||||||
|
|
||||||
|
%{optflags} has been the catchall for all compiler options but this
|
||||||
|
is quite limiting as there's no way to add for example C++ specific
|
||||||
|
options distro-wide. This adds separate %build_cflags, %build_cxxflags,
|
||||||
|
%build_fflags for the gcc-supported languages, and additionally
|
||||||
|
%build_ldflags for distro-wide LDFLAGS setting.
|
||||||
|
|
||||||
|
Based on Florian Weimer's work in Fedoras redhat-rpm-config macros.
|
||||||
|
---
|
||||||
|
macros.in | 26 +++++++++++++++++++++++---
|
||||||
|
1 file changed, 23 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/macros.in b/macros.in
|
||||||
|
index 2ab108776..b6cb52951 100644
|
||||||
|
--- a/macros.in
|
||||||
|
+++ b/macros.in
|
||||||
|
@@ -999,6 +999,24 @@ package or when debugging this package.\
|
||||||
|
%_target_vendor %{_host_vendor}
|
||||||
|
%_target_os %{_host_os}
|
||||||
|
|
||||||
|
+#==============================================================================
|
||||||
|
+# ---- compiler flags.
|
||||||
|
+
|
||||||
|
+# C compiler flags. This is traditionally called CFLAGS in makefiles.
|
||||||
|
+# Historically also available as %%{optflags}, and %%build sets the
|
||||||
|
+# environment variable RPM_OPT_FLAGS to this value.
|
||||||
|
+%build_cflags %{optflags}
|
||||||
|
+
|
||||||
|
+# C++ compiler flags. This is traditionally called CXXFLAGS in makefiles.
|
||||||
|
+%build_cxxflags %{optflags}
|
||||||
|
+
|
||||||
|
+# Fortran compiler flags. Makefiles use both FFLAGS and FCFLAGS as
|
||||||
|
+# the corresponding variable names.
|
||||||
|
+%build_fflags %{optflags} %{?_fmoddir:-I%{_fmoddir}}
|
||||||
|
+
|
||||||
|
+# Link editor flags. This is usually called LDFLAGS in makefiles.
|
||||||
|
+#%build_ldflags -Wl,-z,relro %{?_lto_cflags}
|
||||||
|
+
|
||||||
|
#==============================================================================
|
||||||
|
# ---- specfile macros.
|
||||||
|
# Macro(s) here can be used reliably for reproducible builds.
|
||||||
|
@@ -1010,9 +1028,11 @@ package or when debugging this package.\
|
||||||
|
#
|
||||||
|
%_configure ./configure
|
||||||
|
%configure \
|
||||||
|
- CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
|
||||||
|
- CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
|
||||||
|
- FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
|
||||||
|
+ CFLAGS="${CFLAGS:-%{build_cflags}}" ; export CFLAGS ; \
|
||||||
|
+ CXXFLAGS="${CXXFLAGS:-%{build_cxxflags}}" ; export CXXFLAGS ; \
|
||||||
|
+ FFLAGS="${FFLAGS:-%{build_fflags}}" ; export FFLAGS ; \
|
||||||
|
+ FCFLAGS="${FCFLAGS:-%{build_fflags}}" ; export FCFLAGS ; \
|
||||||
|
+ LDFLAGS="${LDFLAGS:-%{build_ldflags}}" ; export LDFLAGS ; \
|
||||||
|
%{_configure} --host=%{_host} --build=%{_build} \\\
|
||||||
|
--program-prefix=%{?_program_prefix} \\\
|
||||||
|
--disable-dependency-tracking \\\
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
@ -13,7 +13,7 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 14 10:11:34 UTC 2019 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
- Add adopt-language-specific-build_fooflags-macros-from-F.patch
|
||||||
|
(9a50846ceeef2add2344dd463c5562bd69496a23) from master.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 16 08:40:11 UTC 2019 - Stasiek Michalski <hellcp@mailbox.org>
|
Tue Apr 16 08:40:11 UTC 2019 - Stasiek Michalski <hellcp@mailbox.org>
|
||||||
|
|
||||||
|
4
rpm.spec
4
rpm.spec
@ -12,7 +12,7 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@ -129,6 +129,7 @@ Patch117: findsupplements.diff
|
|||||||
Patch118: dwz-compression.patch
|
Patch118: dwz-compression.patch
|
||||||
Patch119: getncpus.diff
|
Patch119: getncpus.diff
|
||||||
Patch120: rpmfc-push-name-epoch-version-release-macro-before-invoking-depgens.patch
|
Patch120: rpmfc-push-name-epoch-version-release-macro-before-invoking-depgens.patch
|
||||||
|
Patch121: adopt-language-specific-build_fooflags-macros-from-F.patch
|
||||||
Patch6464: auto-config-update-aarch64-ppc64le.diff
|
Patch6464: auto-config-update-aarch64-ppc64le.diff
|
||||||
Patch6465: auto-config-update-riscv64.diff
|
Patch6465: auto-config-update-riscv64.diff
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
@ -228,6 +229,7 @@ rm -f rpmdb/db.h
|
|||||||
%patch -P 100 -P 102 -P 103 -P 108
|
%patch -P 100 -P 102 -P 103 -P 108
|
||||||
%patch -P 109 -P 114 -P 117 -P 118
|
%patch -P 109 -P 114 -P 117 -P 118
|
||||||
%patch -P 119 -P 120
|
%patch -P 119 -P 120
|
||||||
|
%patch121 -p1
|
||||||
|
|
||||||
%ifarch aarch64 ppc64le riscv64
|
%ifarch aarch64 ppc64le riscv64
|
||||||
%patch6464
|
%patch6464
|
||||||
|
Loading…
x
Reference in New Issue
Block a user