summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolai Merinov <n.merinov@samsung.com>2019-02-12 07:50:35 (GMT)
committerNikolai Merinov <n.merinov@samsung.com>2019-02-12 07:50:35 (GMT)
commit7cc6e4f994f88a857bf2af8924f611d24d1b6ba5 (patch)
tree0a050f34f104d0f28805924bad9b4b0a2886567b
parent7be4274dc37cad80078c81e35c72170efc534bab (diff)
downloadboost-sandbox/nmerinov/llvm.zip
boost-sandbox/nmerinov/llvm.tar.gz
boost-sandbox/nmerinov/llvm.tar.bz2
Save compilation flags to reuse it on install stagesandbox/nmerinov/llvm
-rw-r--r--packaging/boost.spec9
1 files changed, 8 insertions, 1 deletions
diff --git a/packaging/boost.spec b/packaging/boost.spec
index 73520c7..a100597 100644
--- a/packaging/boost.spec
+++ b/packaging/boost.spec
@@ -453,6 +453,10 @@ EOF
--user-config=./user-config.jam ${CFLAGS:+cflags="$CFLAGS"} \
${CXXFLAGS:+cxxflags="$CXXFLAGS"} ${LDFLAGS:+linkflags="$LDFLAGS"}
+# Save flags in order to reuse on link stage
+echo "CFLAGS=\"$CFLAGS\"" > ./.build.flags
+echo "CXXFLAGS=\"$CXXFLAGS\"" >> ./.build.flags
+echo "LDFLAGS=\"$LDFLAGS\"" >> ./.build.flags
%if %build_docs
cd doc
@@ -471,6 +475,8 @@ BOOST_LIBS="chrono,program_options,thread,system,filesystem,date_time,regex,seri
# Read shared build instructions
. ./.build
+# Read saved flags
+. ./.build.flags
%if %build_mpi
# Set PATH, MANPATH and LD_LIBRARY_PATH for mpi
@@ -480,7 +486,8 @@ BOOST_LIBS="chrono,program_options,thread,system,filesystem,date_time,regex,seri
./b2 install \
--prefix=%{buildroot}%{_prefix} --exec-prefix=%{buildroot}%{_bindir} \
--libdir=%{buildroot}%{_libdir} --includedir=%{buildroot}%{_includedir} \
- --user-config=./user-config.jam
+ --user-config=./user-config.jam ${CFLAGS:+cflags="$CFLAGS"} \
+ ${CXXFLAGS:+cxxflags="$CXXFLAGS"} ${LDFLAGS:+linkflags="$LDFLAGS"}
# do not install the python module - as long as noone needs it, it requires more fixes
# see https://bugzilla.redhat.com/show_bug.cgi?id=801534 for details