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>
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
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