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

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