diff --git a/PIE.patch b/PIE.patch new file mode 100644 index 0000000..6f9338c --- /dev/null +++ b/PIE.patch @@ -0,0 +1,14 @@ +Index: mstflint-4.16.0/configure.ac +=================================================================== +--- mstflint-4.16.0.orig/configure.ac ++++ mstflint-4.16.0/configure.ac +@@ -58,6 +58,9 @@ LDL="" + default_en_inband="" + + LDFLAGS="${LDFLAGS} -L/usr/lib64 -L/usr/local/lib -L/usr/local/lib64" ++if test "$host_cpu" != "s390x"; then ++ LDFLAGS="${LDFLAGS} -pie" ++fi + CXXFLAGS="${CXXFLAGS} -isystem /usr/local/include" + if test "x$OS" = "xFreeBSD"; then + AC_MSG_NOTICE(FreeBSD Build) diff --git a/mstflint.changes b/mstflint.changes index 4a78676..778fe95 100644 --- a/mstflint.changes +++ b/mstflint.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue May 25 16:58:42 UTC 2021 - Wolfgang Frisch + +- Link as position independent executables (bsc#1184124). + - Added PIE.patch + ------------------------------------------------------------------- Wed Apr 7 11:52:58 UTC 2021 - Nicolas Morey-Chaisemartin diff --git a/mstflint.spec b/mstflint.spec index eb37684..a91a814 100644 --- a/mstflint.spec +++ b/mstflint.spec @@ -30,6 +30,7 @@ Source: https://github.com/Mellanox/mstflint/releases/download/v%{versio Patch1: Remove-date-time-info-from-build.patch Patch4: Fix-gcc7-and-gcc8.patch Patch5: fix-race-condition-during-install.patch +Patch6: PIE.patch BuildRequires: gcc-c++ BuildRequires: infiniband-diags-devel BuildRequires: libibverbs-devel @@ -52,6 +53,7 @@ the downloads page at the Mellanox web site. %patch1 %patch4 %patch5 +%patch6 -p1 %build ./autogen.sh