diff --git a/compilation_flags.file b/compilation_flags.file
index c2f2adf3c33..0e9d77a4ee1 100644
--- a/compilation_flags.file
+++ b/compilation_flags.file
@@ -1,4 +1,4 @@
%if "%{?ppc64le_build_flags:set}" != "set"
-%define ppc64le_build_flags -mlong-double-64 -mcpu=power8 -mtune=power8 --param=l1-cache-size=64 --param=l1-cache-line-size=128 --param=l2-cache-size=512
+%define ppc64le_build_flags -mcpu=powerpc64le -mtune=power8 --param=l1-cache-size=64 --param=l1-cache-line-size=128 --param=l2-cache-size=512
%endif
diff --git a/fftjet.spec b/fftjet.spec
index 5d6307076c5..9c51500b526 100644
--- a/fftjet.spec
+++ b/fftjet.spec
@@ -1,4 +1,5 @@
### RPM external fftjet 1.5.0
+## INCLUDE compilation_flags
Source: http://www.hepforge.org/archive/fftjet/%n-%realversion.tar.gz
Requires: fftw3
@@ -25,7 +26,7 @@ touch pkg-config ; chmod +x pkg-config
./configure $PLATF_CONF_OPTS --disable-dependency-tracking --enable-threads \
--prefix=%i F77="$F77" CXX="$CXX" DEPS_CFLAGS=-I$FFTW3_ROOT/include \
%ifarch ppc64le
- CXXFLAGS="-O2 -mlong-double-64" \
+ CXXFLAGS="-O2 %{ppc64le_build_flags}" \
%else
CXXFLAGS="-O2" \
%endif
diff --git a/fmt.spec b/fmt.spec
index 2b8ce79a7ee..c97098893df 100644
--- a/fmt.spec
+++ b/fmt.spec
@@ -1,5 +1,5 @@
### RPM external fmt 7.0.1
-
+## INCLUDE compilation_flags
Source: https://github.com/fmtlib/fmt/archive/%{realversion}.tar.gz
BuildRequires: gmake cmake
@@ -15,7 +15,7 @@ cmake ../%{n}-%{realversion} \
-DCMAKE_INSTALL_PREFIX:STRING=%{i} \
-DCMAKE_INSTALL_LIBDIR:STRING=lib \
%ifarch ppc64le
- -DCMAKE_CXX_FLAGS="-mlong-double-64" \
+ -DCMAKE_CXX_FLAGS="%{ppc64le_build_flags}" \
%endif
-DBUILD_SHARED_LIBS=TRUE
diff --git a/geant4.spec b/geant4.spec
index fccf10ab52c..624587f2512 100644
--- a/geant4.spec
+++ b/geant4.spec
@@ -1,4 +1,5 @@
### RPM external geant4 10.7.1
+## INCLUDE compilation_flags
%define tag %{realversion}
%define branch geant4-10.7-release
%define github_user Geant4
@@ -32,9 +33,9 @@ export VecGeom_DIR=${VECGEOM_ROOT}/lib/cmake/VecGeom
cmake ../%{n}.%{realversion} \
-DCMAKE_CXX_COMPILER="g++" \
%ifarch ppc64le
- -DCMAKE_CXX_FLAGS="-fPIC -mlong-double-64" \
- -DCMAKE_STATIC_LIBRARY_CXX_FLAGS="-fPIC -mlong-double-64" \
- -DCMAKE_STATIC_LIBRARY_C_FLAGS="-fPIC -mlong-double-64" \
+ -DCMAKE_CXX_FLAGS="-fPIC %{ppc64le_build_flags}" \
+ -DCMAKE_STATIC_LIBRARY_CXX_FLAGS="-fPIC %{ppc64le_build_flags}" \
+ -DCMAKE_STATIC_LIBRARY_C_FLAGS="-fPIC %{ppc64le_build_flags}" \
%else
-DCMAKE_CXX_FLAGS="-fPIC" \
-DCMAKE_STATIC_LIBRARY_CXX_FLAGS="-fPIC" \
diff --git a/llvm-gcc-toolfile.spec b/llvm-gcc-toolfile.spec
index 0f7029932b3..703a1478161 100644
--- a/llvm-gcc-toolfile.spec
+++ b/llvm-gcc-toolfile.spec
@@ -53,7 +53,6 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/llvm-cxxcompiler.xml
-