From 64d97f19ff55594b688ec3c875693627ee95a96f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 2 Dec 2020 16:12:37 +0100 Subject: [PATCH] spec: Don't hardcode gcc Use %set_build_flags to get the proper values for $CFLAGS, $CC, etc. and %{toolchain} to get the toolchain identifier --- boost.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/boost.spec b/boost.spec index bb7db15..b2b9740 100644 --- a/boost.spec +++ b/boost.spec @@ -695,6 +695,7 @@ find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x %patch94 -p1 %build +%set_build_flags # Dump the versions being used into the build logs. %if %{with python3} PYTHON3_ABIFLAGS=$(/usr/bin/python3-config --abiflags) @@ -713,7 +714,7 @@ import os ; local RPM_OPT_FLAGS = [ os.environ RPM_OPT_FLAGS ] ; local RPM_LD_FLAGS = [ os.environ RPM_LD_FLAGS ] ; -using gcc : : : $(RPM_OPT_FLAGS) $(RPM_LD_FLAGS) ; +using %{toolchain} : : : $(RPM_OPT_FLAGS) $(RPM_LD_FLAGS) ; %if %{with openmpi} || %{with mpich} using mpi ; %endif @@ -725,7 +726,7 @@ using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{pyth EOF %endif -./bootstrap.sh --with-toolset=gcc --with-icu +./bootstrap.sh --with-toolset=%{toolchain} --with-icu # N.B. When we build the following with PCH, parts of boost (math # library in particular) end up being built second time during @@ -797,7 +798,7 @@ export PATH=/bin${PATH:+:}$PATH echo ============================= build Boost.Build ================== (cd tools/build - ./bootstrap.sh --with-toolset=gcc) + ./bootstrap.sh --with-toolset=%{toolchain}) %check :