From 1377a5d1a6e1220138b70537b968ac684352714f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 22 Feb 2023 22:48:10 +0000 Subject: sys-boot/grub : >=sys-fs/e2fsprogs-1.47.0 compat --- metadata/md5-cache/sys-boot/grub-2.04-r12 | 17 -- metadata/md5-cache/sys-boot/grub-2.04-r13 | 17 ++ metadata/pkg_desc_index | 2 +- ...ld-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch | 313 +++++++++++++++++++++ ...ld-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch | 313 --------------------- .../files/05-fs-ext2-ignore-checksum-seed.patch | 62 ++++ sys-boot/grub/grub-2.04-r12.ebuild | 298 -------------------- sys-boot/grub/grub-2.04-r13.ebuild | 299 ++++++++++++++++++++ 8 files changed, 692 insertions(+), 629 deletions(-) delete mode 100644 metadata/md5-cache/sys-boot/grub-2.04-r12 create mode 100644 metadata/md5-cache/sys-boot/grub-2.04-r13 create mode 100644 sys-boot/grub/files/00-build-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch delete mode 100644 sys-boot/grub/files/0001-build-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch create mode 100644 sys-boot/grub/files/05-fs-ext2-ignore-checksum-seed.patch delete mode 100644 sys-boot/grub/grub-2.04-r12.ebuild create mode 100644 sys-boot/grub/grub-2.04-r13.ebuild diff --git a/metadata/md5-cache/sys-boot/grub-2.04-r12 b/metadata/md5-cache/sys-boot/grub-2.04-r12 deleted file mode 100644 index da1a0e7f..00000000 --- a/metadata/md5-cache/sys-boot/grub-2.04-r12 +++ /dev/null @@ -1,17 +0,0 @@ -BDEPEND=app-misc/pax-utils sys-devel/flex sys-devel/bison sys-devel/automake sys-apps/help2man sys-apps/texinfo fonts? ( media-libs/freetype:2 virtual/pkgconfig ) test? ( app-admin/genromfs app-arch/cpio app-arch/lzop app-emulation/qemu dev-libs/libisoburn sys-apps/miscfiles sys-block/parted sys-fs/squashfs-tools ) themes? ( app-arch/unzip media-libs/freetype:2 virtual/pkgconfig ) truetype? ( virtual/pkgconfig ) sys-devel/gnuconfig >=app-portage/elt-patches-20170815 || ( >=sys-devel/automake-1.16.5:1.16 ) >=sys-devel/autoconf-2.71-r5 -DEFINED_PHASES=compile configure install postinst prepare test unpack -DEPEND=app-arch/xz-utils >=sys-libs/ncurses-5.2-r5:0= sdl? ( media-libs/libsdl ) device-mapper? ( >=sys-fs/lvm2-2.02.45 ) mount? ( sys-fs/fuse:0 ) truetype? ( media-libs/freetype:2= ) ppc? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) ppc64? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) grub_platforms_xen? ( app-emulation/xen-tools:= ) grub_platforms_xen-32? ( app-emulation/xen-tools:= ) grub_platforms_xen-pvh? ( app-emulation/xen-tools:= ) -DESCRIPTION=GNU GRUB boot loader -EAPI=7 -HOMEPAGE=https://www.gnu.org/software/grub/ -INHERIT=autotools bash-completion-r1 flag-o-matic multibuild pax-utils toolchain-funcs -IUSE=device-mapper doc efiemu +fonts mount nls sdl test +themes truetype grub_platforms_coreboot grub_platforms_efi-32 grub_platforms_efi-64 grub_platforms_emu grub_platforms_ieee1275 grub_platforms_loongson grub_platforms_multiboot grub_platforms_qemu grub_platforms_qemu-mips grub_platforms_pc grub_platforms_uboot grub_platforms_xen grub_platforms_xen-32 grub_platforms_xen-pvh -KEYWORDS=~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 -LICENSE=GPL-3 fonts? ( GPL-2-with-font-exception ) themes? ( BitstreamVera ) -RDEPEND=app-arch/xz-utils >=sys-libs/ncurses-5.2-r5:0= sdl? ( media-libs/libsdl ) device-mapper? ( >=sys-fs/lvm2-2.02.45 ) mount? ( sys-fs/fuse:0 ) truetype? ( media-libs/freetype:2= ) ppc? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) ppc64? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) grub_platforms_xen? ( app-emulation/xen-tools:= ) grub_platforms_xen-32? ( app-emulation/xen-tools:= ) grub_platforms_xen-pvh? ( app-emulation/xen-tools:= ) kernel_linux? ( grub_platforms_efi-32? ( sys-boot/efibootmgr ) grub_platforms_efi-64? ( sys-boot/efibootmgr ) ) !sys-boot/grub:0 !sys-boot/grub-static nls? ( sys-devel/gettext ) -REQUIRED_USE=grub_platforms_coreboot? ( fonts ) grub_platforms_qemu? ( fonts ) grub_platforms_ieee1275? ( fonts ) grub_platforms_loongson? ( fonts ) -RESTRICT=!test? ( test ) -SLOT=2/2.04-r12 -SRC_URI=mirror://gnu/grub/grub-2.04.tar.xz fonts? ( mirror://gnu/unifont/unifont-12.1.02/unifont-12.1.02.pcf.gz ) themes? ( mirror://sourceforge/dejavu/dejavu-sans-ttf-2.37.zip ) -_eclasses_=autotools 6dcd6b6a486e79928e1243ff9ba41fcc bash-completion-r1 f5e7a020fd9c741740756aac61bf75ff edos2unix 33e347e171066657f91f8b0c72ec8773 eutils 8f942ebdcf04334697649d4a0bf65a32 flag-o-matic 69394e25812406faa1f90edaf4969395 gnuconfig b6b3e92f8b8c996400074b5f61a59256 libtool 241a8f577b9781a42a7421e53448a44e multibuild bddcb51b74f4a76724ff7cf8e7388869 multilib 5ca4e49abed8e3a2f7b56920eadee157 out-of-source-utils 1a9007554652a6e627edbccb3c25a439 pax-utils 91d47e5d20627c717aa878b9167c62a8 strip-linguas ac3ee41ee2d31d8c41a77c0838320cc7 toolchain-funcs 6001248ef162a5fa2a21ce132a212f6b wrapper 4a1902f969e5718126434fc35f3a0d9c -_md5_=e09dbc3a4ff424c670f6d77cb2b8602e diff --git a/metadata/md5-cache/sys-boot/grub-2.04-r13 b/metadata/md5-cache/sys-boot/grub-2.04-r13 new file mode 100644 index 00000000..942db729 --- /dev/null +++ b/metadata/md5-cache/sys-boot/grub-2.04-r13 @@ -0,0 +1,17 @@ +BDEPEND=app-misc/pax-utils sys-devel/flex sys-devel/bison sys-devel/automake sys-apps/help2man sys-apps/texinfo fonts? ( media-libs/freetype:2 virtual/pkgconfig ) test? ( app-admin/genromfs app-arch/cpio app-arch/lzop app-emulation/qemu dev-libs/libisoburn sys-apps/miscfiles sys-block/parted sys-fs/squashfs-tools ) themes? ( app-arch/unzip media-libs/freetype:2 virtual/pkgconfig ) truetype? ( virtual/pkgconfig ) sys-devel/gnuconfig >=app-portage/elt-patches-20170815 || ( >=sys-devel/automake-1.16.5:1.16 ) >=sys-devel/autoconf-2.71-r5 +DEFINED_PHASES=compile configure install postinst prepare test unpack +DEPEND=app-arch/xz-utils >=sys-libs/ncurses-5.2-r5:0= sdl? ( media-libs/libsdl ) device-mapper? ( >=sys-fs/lvm2-2.02.45 ) mount? ( sys-fs/fuse:0 ) truetype? ( media-libs/freetype:2= ) ppc? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) ppc64? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) grub_platforms_xen? ( app-emulation/xen-tools:= ) grub_platforms_xen-32? ( app-emulation/xen-tools:= ) grub_platforms_xen-pvh? ( app-emulation/xen-tools:= ) +DESCRIPTION=GNU GRUB boot loader +EAPI=7 +HOMEPAGE=https://www.gnu.org/software/grub/ +INHERIT=autotools bash-completion-r1 flag-o-matic multibuild pax-utils toolchain-funcs +IUSE=device-mapper doc efiemu +fonts mount nls sdl test +themes truetype grub_platforms_coreboot grub_platforms_efi-32 grub_platforms_efi-64 grub_platforms_emu grub_platforms_ieee1275 grub_platforms_loongson grub_platforms_multiboot grub_platforms_qemu grub_platforms_qemu-mips grub_platforms_pc grub_platforms_uboot grub_platforms_xen grub_platforms_xen-32 grub_platforms_xen-pvh +KEYWORDS=~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 +LICENSE=GPL-3 fonts? ( GPL-2-with-font-exception ) themes? ( BitstreamVera ) +RDEPEND=app-arch/xz-utils >=sys-libs/ncurses-5.2-r5:0= sdl? ( media-libs/libsdl ) device-mapper? ( >=sys-fs/lvm2-2.02.45 ) mount? ( sys-fs/fuse:0 ) truetype? ( media-libs/freetype:2= ) ppc? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) ppc64? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) grub_platforms_xen? ( app-emulation/xen-tools:= ) grub_platforms_xen-32? ( app-emulation/xen-tools:= ) grub_platforms_xen-pvh? ( app-emulation/xen-tools:= ) kernel_linux? ( grub_platforms_efi-32? ( sys-boot/efibootmgr ) grub_platforms_efi-64? ( sys-boot/efibootmgr ) ) !sys-boot/grub:0 !sys-boot/grub-static nls? ( sys-devel/gettext ) +REQUIRED_USE=grub_platforms_coreboot? ( fonts ) grub_platforms_qemu? ( fonts ) grub_platforms_ieee1275? ( fonts ) grub_platforms_loongson? ( fonts ) +RESTRICT=!test? ( test ) +SLOT=2/2.04-r13 +SRC_URI=mirror://gnu/grub/grub-2.04.tar.xz fonts? ( mirror://gnu/unifont/unifont-12.1.02/unifont-12.1.02.pcf.gz ) themes? ( mirror://sourceforge/dejavu/dejavu-sans-ttf-2.37.zip ) +_eclasses_=autotools 6dcd6b6a486e79928e1243ff9ba41fcc bash-completion-r1 f5e7a020fd9c741740756aac61bf75ff edos2unix 33e347e171066657f91f8b0c72ec8773 eutils 8f942ebdcf04334697649d4a0bf65a32 flag-o-matic 69394e25812406faa1f90edaf4969395 gnuconfig b6b3e92f8b8c996400074b5f61a59256 libtool 241a8f577b9781a42a7421e53448a44e multibuild bddcb51b74f4a76724ff7cf8e7388869 multilib 5ca4e49abed8e3a2f7b56920eadee157 out-of-source-utils 1a9007554652a6e627edbccb3c25a439 pax-utils 91d47e5d20627c717aa878b9167c62a8 strip-linguas ac3ee41ee2d31d8c41a77c0838320cc7 toolchain-funcs 6001248ef162a5fa2a21ce132a212f6b wrapper 4a1902f969e5718126434fc35f3a0d9c +_md5_=c9c8b19bbae10a9e4248409d87d3a15d diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index index 17946c84..443c2077 100644 --- a/metadata/pkg_desc_index +++ b/metadata/pkg_desc_index @@ -45,7 +45,7 @@ sys-auth/elogind 246.10-r3: The systemd project's logind, extracted to a standal sys-auth/polkit-qt 0.113.0-r11: PolicyKit Qt API wrapper library (meta package) sys-auth/polkit-qt5 0.113.0-r5: Qt wrapper around polkit-1 client libraries sys-boot/etcher 1.5.116: Flash OS images to SD cards & USB drives, safely and easily. -sys-boot/grub 2.04-r12: GNU GRUB boot loader +sys-boot/grub 2.04-r13: GNU GRUB boot loader sys-boot/os-prober 1.77-r10: Utility to detect other OSs on a set of drives sys-boot/plymouth 0.9.4-r11: Graphical boot animation (splash) and logger sys-boot/unetbootin-static 625-r3: Universal Netboot Installer creates Live USB systems for various OS distributions diff --git a/sys-boot/grub/files/00-build-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch b/sys-boot/grub/files/00-build-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch new file mode 100644 index 00000000..357c825f --- /dev/null +++ b/sys-boot/grub/files/00-build-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch @@ -0,0 +1,313 @@ +From 6643507ce30f775008e093580f0c9499dfb2c485 Mon Sep 17 00:00:00 2001 +From: Simon Hardy +Date: Tue, 24 Mar 2020 13:29:12 +0000 +Subject: build: Fix GRUB i386-pc build with Ubuntu gcc + +With recent versions of gcc on Ubuntu a very large lzma_decompress.img file is +output. (e.g. 134479600 bytes instead of 2864.) This causes grub-mkimage to +fail with: "error: Decompressor is too big." + +This seems to be caused by a section .note.gnu.property that is placed at an +offset such that objcopy needs to pad the img file with zeros. + +This issue is present on: +Ubuntu 19.10 with gcc (Ubuntu 8.3.0-26ubuntu1~19.10) 8.3.0 +Ubuntu 19.10 with gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008 + +This issue is not present on: +Ubuntu 19.10 with gcc (Ubuntu 7.5.0-3ubuntu1~19.10) 7.5.0 +RHEL 8.0 with gcc 8.3.1 20190507 (Red Hat 8.3.1-4) + +The issue can be fixed by removing the section using objcopy as shown in +this patch. + +Signed-off-by: Simon Hardy +Reviewed-by: Daniel Kiper +[Retrieved (and updated to directly patch Makefile.in instead of +gentpl.py to avoid adding a dependency on python) from: +http://git.savannah.gnu.org/cgit/grub.git/commit/?id=6643507ce30f775008e093580f0c9499dfb2c485] +Signed-off-by: Fabrice Fontaine +[yann.morin.1998@free.fr: + - keep the part patching gentpl.py + - restore it as a git-formatted patch + - introduce the hunk about the generated .am file +] +Signed-off-by: Yann E. MORIN +--- + gentpl.py | 2 1 1 0 +- + grub-core/Makefile.in | 38 19 19 0 +++++++++++++++++++------------------- + 2 files changed, 20 insertions(+), 20 deletions(-) + +diff --git a/gentpl.py b/gentpl.py +index 387588c05..c86550d4f 100644 +--- a/gentpl.py ++++ b/gentpl.py +@@ -766,7 +766,7 @@ def image(defn, platform): + if test x$(TARGET_APPLE_LINKER) = x1; then \ + $(MACHO2IMG) $< $@; \ + else \ +- $(TARGET_OBJCOPY) $(""" + cname(defn) + """_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; \ ++ $(TARGET_OBJCOPY) $(""" + cname(defn) + """_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; \ + fi + """) + +diff --git a/grub-core/Makefile.core.am b/grub-core/Makefile.core.am +index 387588c05..c86550d4f 100644 +--- a/grub-core/Makefile.core.am ++++ 2/grub-core/Makefile.core.am +@@ -22897,7 +22897,7 @@ + CLEANFILES += boot.img + + boot.img: boot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -22918,7 +22918,7 @@ + CLEANFILES += boot.img + + boot.img: boot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -22939,7 +22939,7 @@ + CLEANFILES += boot.img + + boot.img: boot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -22960,7 +22960,7 @@ + CLEANFILES += boot_hybrid.img + + boot_hybrid.img: boot_hybrid.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_hybrid_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_hybrid_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -22981,7 +22981,7 @@ + CLEANFILES += cdboot.img + + cdboot.img: cdboot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23002,7 +23002,7 @@ + CLEANFILES += cdboot.img + + cdboot.img: cdboot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23023,7 +23023,7 @@ + CLEANFILES += pxeboot.img + + pxeboot.img: pxeboot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(pxeboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(pxeboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23044,7 +23044,7 @@ + CLEANFILES += diskboot.img + + diskboot.img: diskboot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23065,7 +23065,7 @@ + CLEANFILES += diskboot.img + + diskboot.img: diskboot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23086,7 +23086,7 @@ + CLEANFILES += lnxboot.img + + lnxboot.img: lnxboot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lnxboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lnxboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23107,7 +23107,7 @@ + CLEANFILES += xz_decompress.img + + xz_decompress.img: xz_decompress.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23128,7 +23128,7 @@ + CLEANFILES += xz_decompress.img + + xz_decompress.img: xz_decompress.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23149,7 +23149,7 @@ + CLEANFILES += xz_decompress.img + + xz_decompress.img: xz_decompress.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23170,7 +23170,7 @@ + CLEANFILES += none_decompress.img + + none_decompress.img: none_decompress.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23191,7 +23191,7 @@ + CLEANFILES += none_decompress.img + + none_decompress.img: none_decompress.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23212,7 +23212,7 @@ + CLEANFILES += none_decompress.img + + none_decompress.img: none_decompress.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23233,7 +23233,7 @@ + CLEANFILES += lzma_decompress.img + + lzma_decompress.img: lzma_decompress.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lzma_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lzma_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23254,7 +23254,7 @@ + CLEANFILES += fwstart.img + + fwstart.img: fwstart.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23275,7 +23275,7 @@ + CLEANFILES += fwstart_fuloong2f.img + + fwstart_fuloong2f.img: fwstart_fuloong2f.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_fuloong2f_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_fuloong2f_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +diff --git a/grub-core/Makefile.in b/grub-core/Makefile.in +index 387588c05..c86550d4f 100644 +--- a/grub-core/Makefile.in ++++ b/grub-core/Makefile.in +@@ -46531,61 +46531,61 @@ + @COND_riscv64_efi_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(TARGET_STRIP) -S -x $(kernel_exec) -o $@.bin $<; $(TARGET_OBJCONV) -f$(TARGET_MODULE_FORMAT) -nr:_grub_mod_init:grub_mod_init -nr:_grub_mod_fini:grub_mod_fini -ed2022 -ed2016 -wd1106 -nu -nd $@.bin $@; rm -f $@.bin; elif test ! -z '$(TARGET_OBJ2ELF)'; then $(TARGET_STRIP) $(kernel_exec_STRIPFLAGS) -o $@.bin $< && $(TARGET_OBJ2ELF) $@.bin $@ || (rm -f $@; rm -f $@.bin; exit 1); rm -f $@.bin; else $(TARGET_STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<; fi + + @COND_i386_pc_TRUE@boot.img: boot.image$(EXEEXT) +-@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_i386_qemu_TRUE@boot.img: boot.image$(EXEEXT) +-@COND_i386_qemu_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_qemu_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_sparc64_ieee1275_TRUE@boot.img: boot.image$(EXEEXT) +-@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_i386_pc_TRUE@boot_hybrid.img: boot_hybrid.image$(EXEEXT) +-@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_hybrid_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_hybrid_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_i386_pc_TRUE@cdboot.img: cdboot.image$(EXEEXT) +-@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_sparc64_ieee1275_TRUE@cdboot.img: cdboot.image$(EXEEXT) +-@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_i386_pc_TRUE@pxeboot.img: pxeboot.image$(EXEEXT) +-@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(pxeboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(pxeboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_i386_pc_TRUE@diskboot.img: diskboot.image$(EXEEXT) +-@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_sparc64_ieee1275_TRUE@diskboot.img: diskboot.image$(EXEEXT) +-@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_i386_pc_TRUE@lnxboot.img: lnxboot.image$(EXEEXT) +-@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lnxboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lnxboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_loongson_TRUE@xz_decompress.img: xz_decompress.image$(EXEEXT) +-@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_arc_TRUE@xz_decompress.img: xz_decompress.image$(EXEEXT) +-@COND_mips_arc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_arc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_qemu_mips_TRUE@xz_decompress.img: xz_decompress.image$(EXEEXT) +-@COND_mips_qemu_mips_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_qemu_mips_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_loongson_TRUE@none_decompress.img: none_decompress.image$(EXEEXT) +-@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_arc_TRUE@none_decompress.img: none_decompress.image$(EXEEXT) +-@COND_mips_arc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_arc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_qemu_mips_TRUE@none_decompress.img: none_decompress.image$(EXEEXT) +-@COND_mips_qemu_mips_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_qemu_mips_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_i386_pc_TRUE@lzma_decompress.img: lzma_decompress.image$(EXEEXT) +-@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lzma_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lzma_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_loongson_TRUE@fwstart.img: fwstart.image$(EXEEXT) +-@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_loongson_TRUE@fwstart_fuloong2f.img: fwstart_fuloong2f.image$(EXEEXT) +-@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_fuloong2f_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_fuloong2f_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_MAN_PAGES_TRUE@@COND_emu_TRUE@grub-emu.1: grub-emu + @COND_MAN_PAGES_TRUE@@COND_emu_TRUE@ chmod a+x grub-emu diff --git a/sys-boot/grub/files/0001-build-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch b/sys-boot/grub/files/0001-build-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch deleted file mode 100644 index 357c825f..00000000 --- a/sys-boot/grub/files/0001-build-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch +++ /dev/null @@ -1,313 +0,0 @@ -From 6643507ce30f775008e093580f0c9499dfb2c485 Mon Sep 17 00:00:00 2001 -From: Simon Hardy -Date: Tue, 24 Mar 2020 13:29:12 +0000 -Subject: build: Fix GRUB i386-pc build with Ubuntu gcc - -With recent versions of gcc on Ubuntu a very large lzma_decompress.img file is -output. (e.g. 134479600 bytes instead of 2864.) This causes grub-mkimage to -fail with: "error: Decompressor is too big." - -This seems to be caused by a section .note.gnu.property that is placed at an -offset such that objcopy needs to pad the img file with zeros. - -This issue is present on: -Ubuntu 19.10 with gcc (Ubuntu 8.3.0-26ubuntu1~19.10) 8.3.0 -Ubuntu 19.10 with gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008 - -This issue is not present on: -Ubuntu 19.10 with gcc (Ubuntu 7.5.0-3ubuntu1~19.10) 7.5.0 -RHEL 8.0 with gcc 8.3.1 20190507 (Red Hat 8.3.1-4) - -The issue can be fixed by removing the section using objcopy as shown in -this patch. - -Signed-off-by: Simon Hardy -Reviewed-by: Daniel Kiper -[Retrieved (and updated to directly patch Makefile.in instead of -gentpl.py to avoid adding a dependency on python) from: -http://git.savannah.gnu.org/cgit/grub.git/commit/?id=6643507ce30f775008e093580f0c9499dfb2c485] -Signed-off-by: Fabrice Fontaine -[yann.morin.1998@free.fr: - - keep the part patching gentpl.py - - restore it as a git-formatted patch - - introduce the hunk about the generated .am file -] -Signed-off-by: Yann E. MORIN ---- - gentpl.py | 2 1 1 0 +- - grub-core/Makefile.in | 38 19 19 0 +++++++++++++++++++------------------- - 2 files changed, 20 insertions(+), 20 deletions(-) - -diff --git a/gentpl.py b/gentpl.py -index 387588c05..c86550d4f 100644 ---- a/gentpl.py -+++ b/gentpl.py -@@ -766,7 +766,7 @@ def image(defn, platform): - if test x$(TARGET_APPLE_LINKER) = x1; then \ - $(MACHO2IMG) $< $@; \ - else \ -- $(TARGET_OBJCOPY) $(""" + cname(defn) + """_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; \ -+ $(TARGET_OBJCOPY) $(""" + cname(defn) + """_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; \ - fi - """) - -diff --git a/grub-core/Makefile.core.am b/grub-core/Makefile.core.am -index 387588c05..c86550d4f 100644 ---- a/grub-core/Makefile.core.am -+++ 2/grub-core/Makefile.core.am -@@ -22897,7 +22897,7 @@ - CLEANFILES += boot.img - - boot.img: boot.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -22918,7 +22918,7 @@ - CLEANFILES += boot.img - - boot.img: boot.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -22939,7 +22939,7 @@ - CLEANFILES += boot.img - - boot.img: boot.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -22960,7 +22960,7 @@ - CLEANFILES += boot_hybrid.img - - boot_hybrid.img: boot_hybrid.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_hybrid_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_hybrid_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -22981,7 +22981,7 @@ - CLEANFILES += cdboot.img - - cdboot.img: cdboot.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -23002,7 +23002,7 @@ - CLEANFILES += cdboot.img - - cdboot.img: cdboot.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -23023,7 +23023,7 @@ - CLEANFILES += pxeboot.img - - pxeboot.img: pxeboot.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(pxeboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(pxeboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -23044,7 +23044,7 @@ - CLEANFILES += diskboot.img - - diskboot.img: diskboot.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -23065,7 +23065,7 @@ - CLEANFILES += diskboot.img - - diskboot.img: diskboot.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -23086,7 +23086,7 @@ - CLEANFILES += lnxboot.img - - lnxboot.img: lnxboot.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lnxboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lnxboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -23107,7 +23107,7 @@ - CLEANFILES += xz_decompress.img - - xz_decompress.img: xz_decompress.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -23128,7 +23128,7 @@ - CLEANFILES += xz_decompress.img - - xz_decompress.img: xz_decompress.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -23149,7 +23149,7 @@ - CLEANFILES += xz_decompress.img - - xz_decompress.img: xz_decompress.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -23170,7 +23170,7 @@ - CLEANFILES += none_decompress.img - - none_decompress.img: none_decompress.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -23191,7 +23191,7 @@ - CLEANFILES += none_decompress.img - - none_decompress.img: none_decompress.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -23212,7 +23212,7 @@ - CLEANFILES += none_decompress.img - - none_decompress.img: none_decompress.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -23233,7 +23233,7 @@ - CLEANFILES += lzma_decompress.img - - lzma_decompress.img: lzma_decompress.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lzma_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lzma_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -23254,7 +23254,7 @@ - CLEANFILES += fwstart.img - - fwstart.img: fwstart.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -@@ -23275,7 +23275,7 @@ - CLEANFILES += fwstart_fuloong2f.img - - fwstart_fuloong2f.img: fwstart_fuloong2f.image$(EXEEXT) -- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_fuloong2f_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_fuloong2f_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - endif - -diff --git a/grub-core/Makefile.in b/grub-core/Makefile.in -index 387588c05..c86550d4f 100644 ---- a/grub-core/Makefile.in -+++ b/grub-core/Makefile.in -@@ -46531,61 +46531,61 @@ - @COND_riscv64_efi_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(TARGET_STRIP) -S -x $(kernel_exec) -o $@.bin $<; $(TARGET_OBJCONV) -f$(TARGET_MODULE_FORMAT) -nr:_grub_mod_init:grub_mod_init -nr:_grub_mod_fini:grub_mod_fini -ed2022 -ed2016 -wd1106 -nu -nd $@.bin $@; rm -f $@.bin; elif test ! -z '$(TARGET_OBJ2ELF)'; then $(TARGET_STRIP) $(kernel_exec_STRIPFLAGS) -o $@.bin $< && $(TARGET_OBJ2ELF) $@.bin $@ || (rm -f $@; rm -f $@.bin; exit 1); rm -f $@.bin; else $(TARGET_STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<; fi - - @COND_i386_pc_TRUE@boot.img: boot.image$(EXEEXT) --@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_i386_qemu_TRUE@boot.img: boot.image$(EXEEXT) --@COND_i386_qemu_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_i386_qemu_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_sparc64_ieee1275_TRUE@boot.img: boot.image$(EXEEXT) --@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_i386_pc_TRUE@boot_hybrid.img: boot_hybrid.image$(EXEEXT) --@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_hybrid_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_hybrid_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_i386_pc_TRUE@cdboot.img: cdboot.image$(EXEEXT) --@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_sparc64_ieee1275_TRUE@cdboot.img: cdboot.image$(EXEEXT) --@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_i386_pc_TRUE@pxeboot.img: pxeboot.image$(EXEEXT) --@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(pxeboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(pxeboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_i386_pc_TRUE@diskboot.img: diskboot.image$(EXEEXT) --@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_sparc64_ieee1275_TRUE@diskboot.img: diskboot.image$(EXEEXT) --@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_i386_pc_TRUE@lnxboot.img: lnxboot.image$(EXEEXT) --@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lnxboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lnxboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_mips_loongson_TRUE@xz_decompress.img: xz_decompress.image$(EXEEXT) --@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_mips_arc_TRUE@xz_decompress.img: xz_decompress.image$(EXEEXT) --@COND_mips_arc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_mips_arc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_mips_qemu_mips_TRUE@xz_decompress.img: xz_decompress.image$(EXEEXT) --@COND_mips_qemu_mips_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_mips_qemu_mips_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_mips_loongson_TRUE@none_decompress.img: none_decompress.image$(EXEEXT) --@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_mips_arc_TRUE@none_decompress.img: none_decompress.image$(EXEEXT) --@COND_mips_arc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_mips_arc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_mips_qemu_mips_TRUE@none_decompress.img: none_decompress.image$(EXEEXT) --@COND_mips_qemu_mips_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_mips_qemu_mips_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_i386_pc_TRUE@lzma_decompress.img: lzma_decompress.image$(EXEEXT) --@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lzma_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lzma_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_mips_loongson_TRUE@fwstart.img: fwstart.image$(EXEEXT) --@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_mips_loongson_TRUE@fwstart_fuloong2f.img: fwstart_fuloong2f.image$(EXEEXT) --@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_fuloong2f_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi -+@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_fuloong2f_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi - - @COND_MAN_PAGES_TRUE@@COND_emu_TRUE@grub-emu.1: grub-emu - @COND_MAN_PAGES_TRUE@@COND_emu_TRUE@ chmod a+x grub-emu diff --git a/sys-boot/grub/files/05-fs-ext2-ignore-checksum-seed.patch b/sys-boot/grub/files/05-fs-ext2-ignore-checksum-seed.patch new file mode 100644 index 00000000..9024b479 --- /dev/null +++ b/sys-boot/grub/files/05-fs-ext2-ignore-checksum-seed.patch @@ -0,0 +1,62 @@ +https://bugs.gentoo.org/894200 +https://git.savannah.gnu.org/cgit/grub.git/patch/?id=7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763 + +From 7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763 Mon Sep 17 00:00:00 2001 +From: Javier Martinez Canillas +Date: Fri, 11 Jun 2021 21:36:16 +0200 +Subject: fs/ext2: Ignore checksum seed incompat feature + +This incompat feature is used to denote that the filesystem stored its +metadata checksum seed in the superblock. This is used to allow tune2fs +changing the UUID on a mounted metdata_csum filesystem without having +to rewrite all the disk metadata. However, the GRUB doesn't use the +metadata checksum at all. So, it can just ignore this feature if it +is enabled. This is consistent with the GRUB filesystem code in general +which just does a best effort to access the filesystem's data. + +The checksum seed incompat feature has to be removed from the ignore +list if the support for metadata checksum verification is added to the +GRUB ext2 driver later. + +Suggested-by: Eric Sandeen +Suggested-by: Lukas Czerner +Signed-off-by: Javier Martinez Canillas +Reviewed-by: Lukas Czerner +Reviewed-by: Daniel Kiper +--- + grub-core/fs/ext2.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c +index e7dd78e..4953a15 100644 +--- a/grub-core/fs/ext2.c ++++ b/grub-core/fs/ext2.c +@@ -103,6 +103,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); + #define EXT4_FEATURE_INCOMPAT_64BIT 0x0080 + #define EXT4_FEATURE_INCOMPAT_MMP 0x0100 + #define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200 ++#define EXT4_FEATURE_INCOMPAT_CSUM_SEED 0x2000 + #define EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000 + + /* The set of back-incompatible features this driver DOES support. Add (OR) +@@ -123,10 +124,15 @@ GRUB_MOD_LICENSE ("GPLv3+"); + * mmp: Not really back-incompatible - was added as such to + * avoid multiple read-write mounts. Safe to ignore for this + * RO driver. ++ * checksum seed: Not really back-incompatible - was added to allow tools ++ * such as tune2fs to change the UUID on a mounted metadata ++ * checksummed filesystem. Safe to ignore for now since the ++ * driver doesn't support checksum verification. However, it ++ * has to be removed from this list if the support is added later. + */ + #define EXT2_DRIVER_IGNORED_INCOMPAT ( EXT3_FEATURE_INCOMPAT_RECOVER \ +- | EXT4_FEATURE_INCOMPAT_MMP) +- ++ | EXT4_FEATURE_INCOMPAT_MMP \ ++ | EXT4_FEATURE_INCOMPAT_CSUM_SEED) + + #define EXT3_JOURNAL_MAGIC_NUMBER 0xc03b3998U + +-- +cgit v1.1 + diff --git a/sys-boot/grub/grub-2.04-r12.ebuild b/sys-boot/grub/grub-2.04-r12.ebuild deleted file mode 100644 index 286d5017..00000000 --- a/sys-boot/grub/grub-2.04-r12.ebuild +++ /dev/null @@ -1,298 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -if [[ ${PV} == 9999 ]]; then - GRUB_BOOTSTRAP=1 -fi - -GRUB_AUTORECONF=1 - -if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then - PYTHON_COMPAT=( python{2_7,3_{8,9,10}} ) - inherit python-any-r1 -fi - -if [[ -n ${GRUB_AUTORECONF} ]]; then - WANT_LIBTOOL=none - inherit autotools -fi - -inherit bash-completion-r1 flag-o-matic multibuild pax-utils toolchain-funcs - -if [[ ${PV} != 9999 ]]; then - if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then - # The quote style is to work with <=bash-4.2 and >=bash-4.3 #503860 - MY_P=${P/_/'~'} - SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz" - S=${WORKDIR}/${MY_P} - else - SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - S=${WORKDIR}/${P%_*} - fi - KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" -else - inherit git-r3 - EGIT_REPO_URI="https://git.savannah.gnu.org/git/grub.git" -fi - -PATCHES=( - "${FILESDIR}"/0001-build-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch - "${FILESDIR}"/01-gfxpayload.patch - "${FILESDIR}"/02-KERNEL_GLOBS.patch - "${FILESDIR}"/03-sparc64-bios-boot.patch - "${FILESDIR}"/04-fgrep.patch -) - -DEJAVU=dejavu-sans-ttf-2.37 -UNIFONT=unifont-12.1.02 -SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz ) - themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )" - -DESCRIPTION="GNU GRUB boot loader" -HOMEPAGE="https://www.gnu.org/software/grub/" - -# Includes licenses for dejavu and unifont -LICENSE="GPL-3 fonts? ( GPL-2-with-font-exception ) themes? ( BitstreamVera )" -SLOT="2/${PVR}" -IUSE="device-mapper doc efiemu +fonts mount nls sdl test +themes truetype" - -GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot qemu qemu-mips pc uboot xen xen-32 xen-pvh ) -IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}" - -REQUIRED_USE=" - grub_platforms_coreboot? ( fonts ) - grub_platforms_qemu? ( fonts ) - grub_platforms_ieee1275? ( fonts ) - grub_platforms_loongson? ( fonts ) -" - -BDEPEND=" - ${PYTHON_DEPS} - app-misc/pax-utils - sys-devel/flex - sys-devel/bison - sys-devel/automake - sys-apps/help2man - sys-apps/texinfo - fonts? ( - media-libs/freetype:2 - virtual/pkgconfig - ) - test? ( - app-admin/genromfs - app-arch/cpio - app-arch/lzop - app-emulation/qemu - dev-libs/libisoburn - sys-apps/miscfiles - sys-block/parted - sys-fs/squashfs-tools - ) - themes? ( - app-arch/unzip - media-libs/freetype:2 - virtual/pkgconfig - ) - truetype? ( virtual/pkgconfig ) -" -DEPEND=" - app-arch/xz-utils - >=sys-libs/ncurses-5.2-r5:0= - sdl? ( media-libs/libsdl ) - device-mapper? ( >=sys-fs/lvm2-2.02.45 ) - mount? ( sys-fs/fuse:0 ) - truetype? ( media-libs/freetype:2= ) - ppc? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) - ppc64? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) - grub_platforms_xen? ( app-emulation/xen-tools:= ) - grub_platforms_xen-32? ( app-emulation/xen-tools:= ) - grub_platforms_xen-pvh? ( app-emulation/xen-tools:= ) -" -RDEPEND="${DEPEND} - kernel_linux? ( - grub_platforms_efi-32? ( sys-boot/efibootmgr ) - grub_platforms_efi-64? ( sys-boot/efibootmgr ) - ) - !sys-boot/grub:0 !sys-boot/grub-static - nls? ( sys-devel/gettext ) -" - -RESTRICT="!test? ( test )" - -QA_EXECSTACK="usr/bin/grub-emu* usr/lib/grub/*" -QA_PRESTRIPPED="usr/lib/grub/.*" -QA_MULTILIB_PATHS="usr/lib/grub/.*" -QA_WX_LOAD="usr/lib/grub/*" - -src_unpack() { - if [[ ${PV} == 9999 ]]; then - git-r3_src_unpack - pushd "${P}" >/dev/null || die - local GNULIB_URI="https://git.savannah.gnu.org/git/gnulib.git" - local GNULIB_REVISION=$(source bootstrap.conf >/dev/null; echo "${GNULIB_REVISION}") - git-r3_fetch "${GNULIB_URI}" "${GNULIB_REVISION}" - git-r3_checkout "${GNULIB_URI}" gnulib - popd >/dev/null || die - fi - default -} - -src_prepare() { - default - - sed -i -e /autoreconf/d autogen.sh || die - - # Nothing in Gentoo packages 'american-english' in the exact path - # wanted for the test, but all that is needed is a compressible text - # file, and we do have 'words' from miscfiles in the same path. - sed -i \ - -e '/CFILESSRC.*=/s,american-english,words,' \ - tests/util/grub-fs-tester.in \ - || die - - if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then - python_setup - fi - - if [[ -n ${GRUB_BOOTSTRAP} ]]; then - eautopoint --force - AUTOPOINT=: AUTORECONF=: ./bootstrap || die - elif [[ -n ${GRUB_AUTOGEN} ]]; then - ./autogen.sh || die - fi - - if [[ -n ${GRUB_AUTORECONF} ]]; then - eautoreconf - fi -} - -grub_do() { - multibuild_foreach_variant run_in_build_dir "$@" -} - -grub_do_once() { - multibuild_for_best_variant run_in_build_dir "$@" -} - -grub_configure() { - local platform - - case ${MULTIBUILD_VARIANT} in - efi*) platform=efi ;; - xen-pvh) platform=xen_pvh ;; - xen*) platform=xen ;; - guessed) ;; - *) platform=${MULTIBUILD_VARIANT} ;; - esac - - case ${MULTIBUILD_VARIANT} in - *-32) - if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then - local CTARGET=i386 - fi ;; - *-64) - if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then - local CTARGET=x86_64 - local -x TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}" - local -x TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}" - fi ;; - esac - - local myeconfargs=( - --disable-werror - --program-prefix= - --libdir="${EPREFIX}"/usr/lib - --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html - --disable-libzfs - --program-transform-name="s,grub,grub2," - $(use_enable device-mapper) - $(use_enable mount grub-mount) - $(use_enable nls) - $(use_enable themes grub-themes) - $(use_enable truetype grub-mkfont) - $(use_enable sdl grub-emu-sdl) - ${platform:+--with-platform=}${platform} - - # Let configure detect this where supported - $(usex efiemu '' '--disable-efiemu') - ) - - if use fonts; then - ln -rs "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die - fi - - if use themes; then - ln -rs "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die - fi - - local ECONF_SOURCE="${S}" - econf "${myeconfargs[@]}" -} - -src_configure() { - # Bug 508758. - replace-flags -O3 -O2 - - # We don't want to leak flags onto boot code. - export HOST_CCASFLAGS=${CCASFLAGS} - export HOST_CFLAGS=${CFLAGS} - export HOST_CPPFLAGS=${CPPFLAGS} - export HOST_LDFLAGS=${LDFLAGS} - unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS - - tc-ld-disable-gold #439082 #466536 #526348 - export TARGET_LDFLAGS="${TARGET_LDFLAGS} ${LDFLAGS}" - unset LDFLAGS - - tc-export CC NM OBJCOPY RANLIB STRIP - tc-export BUILD_CC # Bug 485592 - - MULTIBUILD_VARIANTS=() - local p - for p in "${GRUB_ALL_PLATFORMS[@]}"; do - use "grub_platforms_${p}" && MULTIBUILD_VARIANTS+=( "${p}" ) - done - [[ ${#MULTIBUILD_VARIANTS[@]} -eq 0 ]] && MULTIBUILD_VARIANTS=( guessed ) - grub_do grub_configure -} - -src_compile() { - grub_do emake - use doc && grub_do_once emake -C docs html -} - -src_test() { - # The qemu dependency is a bit complex. - # You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform. - grub_do emake check -} - -src_install() { - grub_do emake install DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)" - use doc && grub_do_once emake -C docs install-html DESTDIR="${D}" - - einstalldocs - - # https://bugs.gentoo.org/231935 - dostrip -x /usr/lib/grub -} - -pkg_postinst() { - elog "For information on how to configure GRUB2 please refer to the guide:" - elog " https://wiki.gentoo.org/wiki/GRUB2_Quick_Start" - - if has_version 'sys-boot/grub:0'; then - elog "A migration guide for GRUB Legacy users is available:" - elog " https://wiki.gentoo.org/wiki/GRUB2_Migration" - fi - - if [[ -z ${REPLACING_VERSIONS} ]]; then - elog - elog "You may consider installing the following optional packages:" - optfeature "Detect other operating systems (grub-mkconfig)" sys-boot/os-prober - optfeature "Create rescue media (grub-mkrescue)" dev-libs/libisoburn - optfeature "Enable RAID device detection" sys-fs/mdadm - fi -} diff --git a/sys-boot/grub/grub-2.04-r13.ebuild b/sys-boot/grub/grub-2.04-r13.ebuild new file mode 100644 index 00000000..10dfddc7 --- /dev/null +++ b/sys-boot/grub/grub-2.04-r13.ebuild @@ -0,0 +1,299 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +if [[ ${PV} == 9999 ]]; then + GRUB_BOOTSTRAP=1 +fi + +GRUB_AUTORECONF=1 + +if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then + PYTHON_COMPAT=( python{2_7,3_{8,9,10}} ) + inherit python-any-r1 +fi + +if [[ -n ${GRUB_AUTORECONF} ]]; then + WANT_LIBTOOL=none + inherit autotools +fi + +inherit bash-completion-r1 flag-o-matic multibuild pax-utils toolchain-funcs + +if [[ ${PV} != 9999 ]]; then + if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then + # The quote style is to work with <=bash-4.2 and >=bash-4.3 #503860 + MY_P=${P/_/'~'} + SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz" + S=${WORKDIR}/${MY_P} + else + SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + S=${WORKDIR}/${P%_*} + fi + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +else + inherit git-r3 + EGIT_REPO_URI="https://git.savannah.gnu.org/git/grub.git" +fi + +PATCHES=( + "${FILESDIR}"/00-build-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch + "${FILESDIR}"/01-gfxpayload.patch + "${FILESDIR}"/02-KERNEL_GLOBS.patch + "${FILESDIR}"/03-sparc64-bios-boot.patch + "${FILESDIR}"/04-fgrep.patch + "${FILESDIR}"/05-fs-ext2-ignore-checksum-seed.patch +) + +DEJAVU=dejavu-sans-ttf-2.37 +UNIFONT=unifont-12.1.02 +SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz ) + themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )" + +DESCRIPTION="GNU GRUB boot loader" +HOMEPAGE="https://www.gnu.org/software/grub/" + +# Includes licenses for dejavu and unifont +LICENSE="GPL-3 fonts? ( GPL-2-with-font-exception ) themes? ( BitstreamVera )" +SLOT="2/${PVR}" +IUSE="device-mapper doc efiemu +fonts mount nls sdl test +themes truetype" + +GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot qemu qemu-mips pc uboot xen xen-32 xen-pvh ) +IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}" + +REQUIRED_USE=" + grub_platforms_coreboot? ( fonts ) + grub_platforms_qemu? ( fonts ) + grub_platforms_ieee1275? ( fonts ) + grub_platforms_loongson? ( fonts ) +" + +BDEPEND=" + ${PYTHON_DEPS} + app-misc/pax-utils + sys-devel/flex + sys-devel/bison + sys-devel/automake + sys-apps/help2man + sys-apps/texinfo + fonts? ( + media-libs/freetype:2 + virtual/pkgconfig + ) + test? ( + app-admin/genromfs + app-arch/cpio + app-arch/lzop + app-emulation/qemu + dev-libs/libisoburn + sys-apps/miscfiles + sys-block/parted + sys-fs/squashfs-tools + ) + themes? ( + app-arch/unzip + media-libs/freetype:2 + virtual/pkgconfig + ) + truetype? ( virtual/pkgconfig ) +" +DEPEND=" + app-arch/xz-utils + >=sys-libs/ncurses-5.2-r5:0= + sdl? ( media-libs/libsdl ) + device-mapper? ( >=sys-fs/lvm2-2.02.45 ) + mount? ( sys-fs/fuse:0 ) + truetype? ( media-libs/freetype:2= ) + ppc? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) + ppc64? ( >=sys-apps/ibm-powerpc-utils-1.3.5 ) + grub_platforms_xen? ( app-emulation/xen-tools:= ) + grub_platforms_xen-32? ( app-emulation/xen-tools:= ) + grub_platforms_xen-pvh? ( app-emulation/xen-tools:= ) +" +RDEPEND="${DEPEND} + kernel_linux? ( + grub_platforms_efi-32? ( sys-boot/efibootmgr ) + grub_platforms_efi-64? ( sys-boot/efibootmgr ) + ) + !sys-boot/grub:0 !sys-boot/grub-static + nls? ( sys-devel/gettext ) +" + +RESTRICT="!test? ( test )" + +QA_EXECSTACK="usr/bin/grub-emu* usr/lib/grub/*" +QA_PRESTRIPPED="usr/lib/grub/.*" +QA_MULTILIB_PATHS="usr/lib/grub/.*" +QA_WX_LOAD="usr/lib/grub/*" + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + pushd "${P}" >/dev/null || die + local GNULIB_URI="https://git.savannah.gnu.org/git/gnulib.git" + local GNULIB_REVISION=$(source bootstrap.conf >/dev/null; echo "${GNULIB_REVISION}") + git-r3_fetch "${GNULIB_URI}" "${GNULIB_REVISION}" + git-r3_checkout "${GNULIB_URI}" gnulib + popd >/dev/null || die + fi + default +} + +src_prepare() { + default + + sed -i -e /autoreconf/d autogen.sh || die + + # Nothing in Gentoo packages 'american-english' in the exact path + # wanted for the test, but all that is needed is a compressible text + # file, and we do have 'words' from miscfiles in the same path. + sed -i \ + -e '/CFILESSRC.*=/s,american-english,words,' \ + tests/util/grub-fs-tester.in \ + || die + + if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then + python_setup + fi + + if [[ -n ${GRUB_BOOTSTRAP} ]]; then + eautopoint --force + AUTOPOINT=: AUTORECONF=: ./bootstrap || die + elif [[ -n ${GRUB_AUTOGEN} ]]; then + ./autogen.sh || die + fi + + if [[ -n ${GRUB_AUTORECONF} ]]; then + eautoreconf + fi +} + +grub_do() { + multibuild_foreach_variant run_in_build_dir "$@" +} + +grub_do_once() { + multibuild_for_best_variant run_in_build_dir "$@" +} + +grub_configure() { + local platform + + case ${MULTIBUILD_VARIANT} in + efi*) platform=efi ;; + xen-pvh) platform=xen_pvh ;; + xen*) platform=xen ;; + guessed) ;; + *) platform=${MULTIBUILD_VARIANT} ;; + esac + + case ${MULTIBUILD_VARIANT} in + *-32) + if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then + local CTARGET=i386 + fi ;; + *-64) + if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then + local CTARGET=x86_64 + local -x TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}" + local -x TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}" + fi ;; + esac + + local myeconfargs=( + --disable-werror + --program-prefix= + --libdir="${EPREFIX}"/usr/lib + --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html + --disable-libzfs + --program-transform-name="s,grub,grub2," + $(use_enable device-mapper) + $(use_enable mount grub-mount) + $(use_enable nls) + $(use_enable themes grub-themes) + $(use_enable truetype grub-mkfont) + $(use_enable sdl grub-emu-sdl) + ${platform:+--with-platform=}${platform} + + # Let configure detect this where supported + $(usex efiemu '' '--disable-efiemu') + ) + + if use fonts; then + ln -rs "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die + fi + + if use themes; then + ln -rs "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die + fi + + local ECONF_SOURCE="${S}" + econf "${myeconfargs[@]}" +} + +src_configure() { + # Bug 508758. + replace-flags -O3 -O2 + + # We don't want to leak flags onto boot code. + export HOST_CCASFLAGS=${CCASFLAGS} + export HOST_CFLAGS=${CFLAGS} + export HOST_CPPFLAGS=${CPPFLAGS} + export HOST_LDFLAGS=${LDFLAGS} + unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS + + tc-ld-disable-gold #439082 #466536 #526348 + export TARGET_LDFLAGS="${TARGET_LDFLAGS} ${LDFLAGS}" + unset LDFLAGS + + tc-export CC NM OBJCOPY RANLIB STRIP + tc-export BUILD_CC # Bug 485592 + + MULTIBUILD_VARIANTS=() + local p + for p in "${GRUB_ALL_PLATFORMS[@]}"; do + use "grub_platforms_${p}" && MULTIBUILD_VARIANTS+=( "${p}" ) + done + [[ ${#MULTIBUILD_VARIANTS[@]} -eq 0 ]] && MULTIBUILD_VARIANTS=( guessed ) + grub_do grub_configure +} + +src_compile() { + grub_do emake + use doc && grub_do_once emake -C docs html +} + +src_test() { + # The qemu dependency is a bit complex. + # You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform. + grub_do emake check +} + +src_install() { + grub_do emake install DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)" + use doc && grub_do_once emake -C docs install-html DESTDIR="${D}" + + einstalldocs + + # https://bugs.gentoo.org/231935 + dostrip -x /usr/lib/grub +} + +pkg_postinst() { + elog "For information on how to configure GRUB2 please refer to the guide:" + elog " https://wiki.gentoo.org/wiki/GRUB2_Quick_Start" + + if has_version 'sys-boot/grub:0'; then + elog "A migration guide for GRUB Legacy users is available:" + elog " https://wiki.gentoo.org/wiki/GRUB2_Migration" + fi + + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog + elog "You may consider installing the following optional packages:" + optfeature "Detect other operating systems (grub-mkconfig)" sys-boot/os-prober + optfeature "Create rescue media (grub-mkrescue)" dev-libs/libisoburn + optfeature "Enable RAID device detection" sys-fs/mdadm + fi +} -- cgit v1.2.3