From 6ea6862e1f2ab81bd8ac39d766f80128dde18368 Mon Sep 17 00:00:00 2001 From: Vector Li Date: Tue, 7 Feb 2023 21:05:04 +0800 Subject: [PATCH] Build binaries with relro/pie/bind_now Signed-off-by: Vector Li --- restraint.spec | 1 + specfiles/restraint-upstream.spec | 1 + 2 files changed, 2 insertions(+) diff --git a/restraint.spec b/restraint.spec index 1a4e8ff6..7cd403e3 100644 --- a/restraint.spec +++ b/restraint.spec @@ -160,6 +160,7 @@ cp %{_sourcedir}/*.tar.* third-party/ %build export CFLAGS="$RPM_OPT_FLAGS" +export LDFLAGS="$RPM_LD_FLAGS" %if 0%{?rhel} == 5 %ifarch i386 # glib wants at least i486 for atomic instructions. RHEL6+ is already using i686. diff --git a/specfiles/restraint-upstream.spec b/specfiles/restraint-upstream.spec index d5636790..20d02185 100644 --- a/specfiles/restraint-upstream.spec +++ b/specfiles/restraint-upstream.spec @@ -54,6 +54,7 @@ restAPI allowing all results and logs to be recorded from the test machine. %build export CFLAGS="$RPM_OPT_FLAGS" +export LDFLAGS="$RPM_LD_FLAGS" pushd src make %{?_smp_mflags}