From e90881e93fb1727e8efcf0a642755cfdbdae004ad39ea70e234a4fe0bbb10ae3 Mon Sep 17 00:00:00 2001 From: Nicolas Morey-Chaisemartin Date: Thu, 17 Jan 2019 08:25:54 +0000 Subject: [PATCH] Accepting request 661771 from home:bmwiedemann:branches:science:HPC Add reproduciblecpu.patch to drop -march=native (boo#1100677) OBS-URL: https://build.opensuse.org/request/show/661771 OBS-URL: https://build.opensuse.org/package/show/science:HPC/opa-ff?expand=0&rev=51 --- opa-ff.changes | 5 +++++ opa-ff.spec | 2 ++ reproduciblecpu.patch | 25 +++++++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 reproduciblecpu.patch diff --git a/opa-ff.changes b/opa-ff.changes index 7411a70..9ea9fde 100644 --- a/opa-ff.changes +++ b/opa-ff.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Dec 28 11:19:40 UTC 2018 - Bernhard Wiedemann + +- Add reproduciblecpu.patch to drop -march=native (boo#1100677) + ------------------------------------------------------------------- Thu Oct 25 12:12:28 UTC 2018 - Jan Engelhardt diff --git a/opa-ff.spec b/opa-ff.spec index d834a0b..10bf71a 100644 --- a/opa-ff.spec +++ b/opa-ff.spec @@ -35,6 +35,7 @@ Source1: opa-ff.rpmlintrc Patch1: opa-ff-add-shebang-for-exp-files.patch Patch2: opa-ff-suse-build-fixes.patch Patch3: reproducible.patch +Patch4: reproduciblecpu.patch BuildRequires: gcc-c++ BuildRequires: infiniband-diags-devel BuildRequires: libexpat-devel @@ -128,6 +129,7 @@ Tools for parsing information from provided snapshot files and issuing packets t %patch1 %patch2 %patch3 -p1 +%patch4 -p1 %build export RPM_OPT_FLAGS diff --git a/reproduciblecpu.patch b/reproduciblecpu.patch new file mode 100644 index 0000000..e847e1a --- /dev/null +++ b/reproduciblecpu.patch @@ -0,0 +1,25 @@ +https://github.com/intel/opa-ff/issues/20 +https://bugzilla.opensuse.org/show_bug.cgi?id=1100677 packages do not build reproducibly from compile-time CPU-detection + + +Author: Bernhard M. Wiedemann +Date: 2018-12-28 + + Drop march=native to avoid CPU detection on build machine + + in order to make builds reproducible. + See https://reproducible-builds.org/ for why this is good + +Index: opa-ff-10.8.0.0.201.0.cb934204ad37/IbaTools/stream/Makefile +=================================================================== +--- opa-ff-10.8.0.0.201.0.cb934204ad37.orig/IbaTools/stream/Makefile ++++ opa-ff-10.8.0.0.201.0.cb934204ad37/IbaTools/stream/Makefile +@@ -110,7 +110,7 @@ INCLUDE_SUBDIR = + # (in addition to LOCALDEPLIBS) + #LOCAL_LIB_DIRS = User library directories for libpaths [Empty] + +-CLOCAL = $(CPIE) -march=native -mcmodel=medium -DSTREAM_ARRAY_SIZE=353783808 -fopenmp ++CLOCAL = $(CPIE) -mcmodel=medium -DSTREAM_ARRAY_SIZE=353783808 -fopenmp + LDLOCAL = -fopenmp + + # Include Make Rules definitions and rules