aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>2020-04-01 22:44:37 +0100
committerKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>2020-04-02 13:42:26 +0100
commitfcd14017007db35a4a41ef4fd6b69a5e02edbd5e (patch)
tree0fa6642ab271cfb4e4e2b7078aef66befa89b4ee /package
parentb74386acc6793ee7effe92153e93e3f9fad7fc9c (diff)
downloadupstream-fcd14017007db35a4a41ef4fd6b69a5e02edbd5e.tar.gz
upstream-fcd14017007db35a4a41ef4fd6b69a5e02edbd5e.tar.bz2
upstream-fcd14017007db35a4a41ef4fd6b69a5e02edbd5e.zip
grub2: fix build when ASLR enabled
Disable ASLR and filter '-fno-plt' from CFLAGS: solves building when ASLR enabled by basically disabling ASLR. Solves errors similar to: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE or module missing GLOBAL_OFFSET_TABLE Suggested-by: 李国 <uxgood.org@gmail.com> Acked-by: Petr Štetiar <ynezz@true.cz> Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Diffstat (limited to 'package')
-rw-r--r--package/boot/grub2/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile
index 840401fa3a..46e3597cc2 100644
--- a/package/boot/grub2/Makefile
+++ b/package/boot/grub2/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=grub
PKG_CPE_ID:=cpe:/a:gnu:grub2
PKG_VERSION:=2.04
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/grub
@@ -20,6 +20,7 @@ PKG_HASH:=e5292496995ad42dabe843a0192cf2a2c502e7ffcc7479398232b10a472df77d
HOST_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=grub2/host
+PKG_ASLR_PIE:=0
PKG_SSP:=0
PKG_FLAGS:=nonshared
@@ -83,7 +84,7 @@ HOST_MAKE_FLAGS += \
TARGET_RANLIB=$(TARGET_RANLIB) \
LIBLZMA=$(STAGING_DIR_HOST)/lib/liblzma.a
-TARGET_CFLAGS :=
+TARGET_CFLAGS := $(filter-out -fno-plt,$(TARGET_CFLAGS))
define Host/Configure
$(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in