From 7cc6e4f994f88a857bf2af8924f611d24d1b6ba5 Mon Sep 17 00:00:00 2001 From: Nikolai Merinov Date: Tue, 12 Feb 2019 10:50:35 +0300 Subject: Save compilation flags to reuse it on install stage --- packaging/boost.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'packaging/boost.spec') diff --git a/packaging/boost.spec b/packaging/boost.spec index 73520c7284..a100597b12 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 -- cgit v1.2.3