X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/9e0a57b449c8575004476f06b8435648fcf44a26..e6a1045cbf4967a8e6d3207fe68abac025c7b6cf:/target/linux/x86-2.6/image/grub/Makefile diff --git a/target/linux/x86-2.6/image/grub/Makefile b/target/linux/x86-2.6/image/grub/Makefile index e30443e18..d37803012 100644 --- a/target/linux/x86-2.6/image/grub/Makefile +++ b/target/linux/x86-2.6/image/grub/Makefile @@ -23,33 +23,19 @@ PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/grub-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk ifeq ($(HOST_ARCH),x86_64) - define Build/Configure - (cd $(PKG_BUILD_DIR); \ - LDFLAGS="-static" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_NLS) \ - ) - endef +CONFIGURE_FLAGS:= \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) else - define Build/Configure +CONFIGURE_FLAGS:= +endif + +define Build/Configure (cd $(PKG_BUILD_DIR); \ LDFLAGS="-static" \ ./configure \ + $(CONFIGURE_FLAGS) \ --program-prefix="" \ --program-suffix="" \ --prefix=/usr \ @@ -62,12 +48,19 @@ else --localstatedir=/var \ --mandir=/usr/man \ --infodir=/usr/info \ + $(DISABLE_NLS) \ + --disable-auto-linux-mem-opt \ ) - endef -endif +endef +# +# ./configure detects whether the host compiler supports +# -fno-stack-protector but only sets STAGE2_CFLAGS accordingly +# define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) \ + GRUB_CFLAGS="\$$$$(STAGE2_CFLAGS)" \ + STAGE1_CFLAGS="\$$$$(STAGE2_CFLAGS)" endef define Build/InstallDev