[openwrt/openwrt] grub2: opt-out of gc-sections usage

LEDE Commits lede-commits at lists.infradead.org
Sat Jul 15 02:27:37 PDT 2023


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/6ed70d8a24e71e1e2dd7d2eefad6418eab07c0cf

commit 6ed70d8a24e71e1e2dd7d2eefad6418eab07c0cf
Author: Javier Marcet <javier at marcet.info>
AuthorDate: Sun Jul 9 17:55:35 2023 +0200

    grub2: opt-out of gc-sections usage
    
    This fixes building with USE_GC_SECTIONS enabled:
    
    ./staging_dir/toolchain-x86_64_gcc-12.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld.bfd: --gc-sections requires a defined symbol root specified by -e or -u
    collect2: error: ld returned 1 exit status
    make[4]: *** [Makefile:27665: disk.module] Error 1
    make[4]: Leaving directory './build_dir/target-x86_64_musl/linux-x86_64/grub-efi/grub-2.06/grub-core'
    make[3]: *** [Makefile:26916: all] Error 2
    make[3]: Leaving directory './build_dir/target-x86_64_musl/linux-x86_64/grub-efi/grub-2.06/grub-core'
    make[2]: *** [Makefile:205: ./build_dir/target-x86_64_musl/linux-x86_64/grub-efi/grub-2.06/.built] Error 2
    make[2]: Leaving directory './package/boot/grub2'
    time: package/boot/grub2/efi/compile#3.21#1.34#4.28
        ERROR: package/boot/grub2 failed to build (build variant: efi).
    
    Signed-off-by: Javier Marcet <javier at marcet.info>
---
 package/boot/grub2/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile
index 44dafe1ef1..f274ce2289 100644
--- a/package/boot/grub2/Makefile
+++ b/package/boot/grub2/Makefile
@@ -7,7 +7,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=grub
 PKG_VERSION:=2.06
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/grub
@@ -25,7 +25,7 @@ ifneq ($(BUILD_VARIANT),none)
 endif
 
 PKG_FLAGS:=nonshared
-PKG_BUILD_FLAGS:=no-lto no-mold
+PKG_BUILD_FLAGS:=no-gc-sections no-lto no-mold
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk




More information about the lede-commits mailing list