Blame SOURCES/0260-Try-to-set-fPIE-and-friends-on-libgnu.a.patch

8631a2
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8631a2
From: Peter Jones <pjones@redhat.com>
8631a2
Date: Tue, 15 Jan 2019 14:57:25 -0500
8631a2
Subject: [PATCH] Try to set -fPIE and friends on libgnu.a
8631a2
8631a2
In order to make sure UTIL_CFLAGS and UTIL_LDFLAGS can correctly get
8631a2
-Wl,-z,relro,-z,now , we need everything going in them to be built with at
8631a2
least -fPIC (and preferably -fPIE) wherever we can, or else we get relocations
8631a2
in some component object that can't be used with the link type that's being
8631a2
used for the final ELF object.
8631a2
8631a2
So this makes sure libgnu.a gets built with HOST_CFLAGS and HOST_LDFLAGS,
8631a2
which are what is later used to define UTIL_CFLAGS and UTIL_LDFLAGS, and
8631a2
includes -fPIE.
8631a2
8631a2
Fixes an rpmdiff check.
8631a2
8631a2
Related: rhbz#1658500
8631a2
8631a2
Signed-off-by: Peter Jones <pjones@redhat.com>
8631a2
---
8631a2
 grub-core/gnulib/Makefile.am | 4 ++--
8631a2
 1 file changed, 2 insertions(+), 2 deletions(-)
8631a2
8631a2
diff --git a/grub-core/gnulib/Makefile.am b/grub-core/gnulib/Makefile.am
8631a2
index b7c5e60e1c3..bd3621930ff 100644
8631a2
--- a/grub-core/gnulib/Makefile.am
8631a2
+++ b/grub-core/gnulib/Makefile.am
8631a2
@@ -38,8 +38,8 @@ CLEANFILES =
8631a2
 DISTCLEANFILES =
8631a2
 MAINTAINERCLEANFILES =
8631a2
 
8631a2
-AM_CPPFLAGS =
8631a2
-AM_CFLAGS =
8631a2
+AM_CPPFLAGS = $(HOST_CPPFLAGS)
8631a2
+AM_CFLAGS = $(HOST_CFLAGS)
8631a2
 
8631a2
 noinst_LIBRARIES += libgnu.a
8631a2