b44b0b0af2
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
45 lines
1.6 KiB
Diff
45 lines
1.6 KiB
Diff
From 0121faf16873b500274b36955a08c6994e7f6f76 Mon Sep 17 00:00:00 2001
|
|
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
Date: Tue, 13 Dec 2016 12:29:28 +0100
|
|
Subject: [PATCH 2/2] rpm: use __global_*flags
|
|
|
|
Using RPM's %{optflags} is definitely nice, but not enough. LDFLAGS
|
|
are not there, and idea of optflags is too generic. It is supposed
|
|
to work under CC and CXX, but apparently someone forgot that there
|
|
is difference between these two.
|
|
|
|
%__global_*flags is not part of RPM itself, it's coming within
|
|
redhat-rpm-config which makes our macros file not that portable,
|
|
but anyway we already have %__global_ldflags and %ninja_build and
|
|
no one complained.
|
|
|
|
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
---
|
|
data/macros.meson | 10 +++++-----
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/data/macros.meson b/data/macros.meson
|
|
index 5250c348..4eb1ab9a 100644
|
|
--- a/data/macros.meson
|
|
+++ b/data/macros.meson
|
|
@@ -3,11 +3,11 @@
|
|
%__builddir %{_target_platform}
|
|
|
|
%meson \
|
|
- export CFLAGS="%{optflags}" \
|
|
- export CXXFLAGS="%{optflags}" \
|
|
- export FFLAGS="%{optflags} -I%{_fmoddir}" \
|
|
- export FCFLAGS="%{optflags} -I%{_fmoddir}" \
|
|
- export LDFLAGS="%{?__global_ldflags}" \
|
|
+ export CFLAGS="${CFLAGS:-%__global_cflags}" \
|
|
+ export CXXFLAGS="${CXXFLAGS:-%__global_cxxflags}" \
|
|
+ export FFLAGS="${FFLAGS:-%__global_fflags}" \
|
|
+ export FCFLAGS="${FCFLAGS:-%__global_fcflags}" \
|
|
+ export LDFLAGS="${LDFLAGS:-%__global_ldflags}" \
|
|
%{__meson} \\\
|
|
--buildtype=plain \\\
|
|
--prefix=%{_prefix} \\\
|
|
--
|
|
2.11.0
|
|
|