diff --git a/mkfit-2.0.0-non-x86_64-fix.patch b/mkfit-2.0.0-non-x86_64-fix.patch new file mode 100644 index 00000000000..0a2a9091226 --- /dev/null +++ b/mkfit-2.0.0-non-x86_64-fix.patch @@ -0,0 +1,10 @@ +diff --git a/immintrin.h b/immintrin.h +new file mode 100644 +index 0000000..363d136 +--- /dev/null ++++ b/immintrin.h +@@ -0,0 +1,4 @@ ++#include ++#define _mm_malloc(a, b) aligned_alloc(b, a) ++#define _mm_free(p) free(p) ++#define _mm_prefetch(a,b) __builtin_prefetch(a) diff --git a/mkfit-toolfile.spec b/mkfit-toolfile.spec index cb836d2cab8..24dc6578c92 100644 --- a/mkfit-toolfile.spec +++ b/mkfit-toolfile.spec @@ -17,6 +17,7 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/mkfit.xml + EOF_TOOLFILE diff --git a/mkfit.spec b/mkfit.spec index 84a6e0b80e6..5bedf7d94c9 100644 --- a/mkfit.spec +++ b/mkfit.spec @@ -5,12 +5,29 @@ Source: git+https://github.com/%{github_user}/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz Requires: tbb +BuildRequires: gmake +Patch0: mkfit-2.0.0-non-x86_64-fix %prep %setup -q -n %{n}-%{realversion} +%ifnarch x86_64 +%patch0 -p1 +%endif + +sed -i -e 's|-std=c++14|-std=c++1z|' Makefile.config + %build -make TBB_PREFIX=$TBB_ROOT VEC_GCC="-march=core2" +%ifarch x86_64 +BUILD_ARGS=VEC_GCC="-march=core2" +%endif +%ifarch aarch64 +BUILD_ARGS=VEC_GCC="-march=native" +%endif +%ifarch ppc64le +BUILD_ARGS=VEC_GCC="-mcpu=native" +%endif +make %{makeprocesses} TBB_PREFIX=$TBB_ROOT ${BUILD_ARGS} %install mkdir %{i}/include %{i}/include/mkFit %{i}/Geoms