Skip to content

Commit

Permalink
grub2: pass compilation parameters more accurately
Browse files Browse the repository at this point in the history
In order for the grub2 boot-related code to compile normally, we have
made many adjustments to the compilation parameters. These adjustments
are not necessary for tools-related code. We apply these parameter
adjustments only to the boot-related code.

Signed-off-by: 李国 <uxgood.org@gmail.com>
  • Loading branch information
uxgood authored and aparcar committed Jun 20, 2021
1 parent ca94104 commit e472375
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions package/boot/grub2/Makefile
Expand Up @@ -17,8 +17,10 @@ PKG_HASH:=2c87f1f21e2ab50043e6cd9163c08f1b6c3a6171556bf23ff9ed65b074145484
HOST_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=grub2/host

PKG_ASLR_PIE:=0
PKG_SSP:=0
ifneq ($(BUILD_VARIANT),none)
PKG_ASLR_PIE:=0
PKG_SSP:=0
endif

PKG_FLAGS:=nonshared

Expand Down Expand Up @@ -96,9 +98,9 @@ HOST_MAKE_FLAGS += \
TARGET_RANLIB=$(TARGET_RANLIB) \
LIBLZMA=$(STAGING_DIR_HOST)/lib/liblzma.a

TARGET_CFLAGS := $(filter-out -O2 -O3 -fno-plt,$(TARGET_CFLAGS))

ifneq ($(BUILD_VARIANT),none)
TARGET_CFLAGS := $(filter-out -O2 -O3 -fno-plt,$(TARGET_CFLAGS))
MAKE_PATH := grub-core
endif

Expand Down

0 comments on commit e472375

Please sign in to comment.