diff options
author | Arsen Arsenović <arsen@aarsen.me> | 2022-02-14 13:00:50 +0100 |
---|---|---|
committer | Arsen Arsenović <arsen@aarsen.me> | 2022-02-14 13:00:50 +0100 |
commit | ec12547075bd3f027744356a9e096cb4daa86794 (patch) | |
tree | cfb9ff6f18f5a6cb9bfc02483f6ccdea6382cba9 /sys-boot | |
parent | sys-boot/limine: drop old (diff) | |
download | guru-ec12547075bd3f027744356a9e096cb4daa86794.tar.gz guru-ec12547075bd3f027744356a9e096cb4daa86794.tar.bz2 guru-ec12547075bd3f027744356a9e096cb4daa86794.zip |
sys-boot/limine: fix ldflags
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Arsen Arsenović <arsen@aarsen.me>
Diffstat (limited to 'sys-boot')
-rw-r--r-- | sys-boot/limine/files/limine-2.83-build-Make-eltorito-efi-build-manually-toggleable.patch | 66 | ||||
-rw-r--r-- | sys-boot/limine/files/limine-2.84.2-r1-limine-install-respect-ldflags.patch | 22 | ||||
-rw-r--r-- | sys-boot/limine/limine-2.84.2-r1.ebuild (renamed from sys-boot/limine/limine-2.84.2.ebuild) | 14 |
3 files changed, 34 insertions, 68 deletions
diff --git a/sys-boot/limine/files/limine-2.83-build-Make-eltorito-efi-build-manually-toggleable.patch b/sys-boot/limine/files/limine-2.83-build-Make-eltorito-efi-build-manually-toggleable.patch deleted file mode 100644 index 0ca799d15..000000000 --- a/sys-boot/limine/files/limine-2.83-build-Make-eltorito-efi-build-manually-toggleable.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 23ee0bf491d077e3c022028cf7040dd5a7597e94 Mon Sep 17 00:00:00 2001 -From: mintsuki <mintsuki@protonmail.com> -Date: Tue, 8 Feb 2022 15:35:54 +0100 -Subject: [PATCH] build: Make eltorito-efi build manually toggleable - ---- -Pulled from upstream - - GNUmakefile.in | 4 ++++ - configure.ac | 11 +++++++++++ - 2 files changed, 15 insertions(+) - -diff --git a/GNUmakefile.in b/GNUmakefile.in -index 334f7c66..fcb7d6ef 100644 ---- a/GNUmakefile.in -+++ b/GNUmakefile.in -@@ -16,6 +16,8 @@ NASMESCAPE = $(subst ','"'$(COMMA) \"'\"$(COMMA) '"',$(1)) - override PATH := $(BUILDDIR)/toolchain/bin:/usr/local/bin:$(PATH) - export PATH - -+override BUILD_ELTORITO_EFI := @build_eltorito_efi@ -+ - WERROR ?= @werror@ - export WERROR - -@@ -140,6 +142,7 @@ limine-bios: common-bios decompressor - - .PHONY: limine-eltorito-efi - limine-eltorito-efi: -+ifeq ($(BUILD_ELTORITO_EFI), yes) - mkdir -p '$(call SHESCAPE,$(BINDIR))' - dd if=/dev/zero of='$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' bs=512 count=2880 2>/dev/null - ( mformat -i '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' -f 1440 :: && \ -@@ -150,6 +153,7 @@ limine-eltorito-efi: - ( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/common-uefi32/BOOTIA32.EFI' ] && \ - mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' '$(call SHESCAPE,$(BUILDDIR))/common-uefi32/BOOTIA32.EFI' ::/EFI/BOOT ) || true ) \ - ) || rm -f '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' -+endif - - .PHONY: limine-uefi - limine-uefi: limine-uefi32 limine-uefi64 -diff --git a/configure.ac b/configure.ac -index 1d1315d6..4a4b521a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -41,9 +41,20 @@ if ! test "x$GZIP_FOUND" = "xyes"; then - AC_MSG_ERROR([gzip not found, please install gzip before configuring]) - fi - -+BUILD_ELTORITO_EFI="yes" -+ -+AC_ARG_ENABLE([eltorito-efi], -+ AS_HELP_STRING([--disable-eltorito-efi], [disable limine-eltorito-efi.bin build]), -+ BUILD_ELTORITO_EFI="$enableval") -+ - AC_CHECK_PROG([MTOOLS_FOUND], [mcopy], [yes]) - if ! test "x$MTOOLS_FOUND" = "xyes"; then - AC_MSG_WARN([mtools not found, install mtools to build limine-eltorito-efi.bin]) -+ BUILD_ELTORITO_EFI="no" -+fi -+ -+if test "$BUILD_ELTORITO_EFI" = "yes"; then -+ AC_SUBST(build_eltorito_efi, [yes]) - fi - - AC_ARG_VAR(HOST_CC, [C compiler for the build host [default: $CC]]) diff --git a/sys-boot/limine/files/limine-2.84.2-r1-limine-install-respect-ldflags.patch b/sys-boot/limine/files/limine-2.84.2-r1-limine-install-respect-ldflags.patch new file mode 100644 index 000000000..bdf937d2b --- /dev/null +++ b/sys-boot/limine/files/limine-2.84.2-r1-limine-install-respect-ldflags.patch @@ -0,0 +1,22 @@ +From 3ff7047e3bafd17a3b3b284f9e054557d4f66602 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me> +Date: Mon, 14 Feb 2022 12:57:34 +0100 +Subject: [PATCH] limine-install: respect ldflags + +--- + limine-install/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/limine-install/Makefile b/limine-install/Makefile +index ef29143..1f6ccbe 100644 +--- a/limine-install/Makefile ++++ b/limine-install/Makefile +@@ -35,4 +35,4 @@ clean: + rm -f limine-install limine-install.exe + + limine-install: limine-install.c +- $(CC) $(CFLAGS) -std=c11 limine-install.c -o $@ ++ $(CC) $(LDFLAGS) $(CFLAGS) -std=c11 limine-install.c -o $@ +-- +2.34.1 + diff --git a/sys-boot/limine/limine-2.84.2.ebuild b/sys-boot/limine/limine-2.84.2-r1.ebuild index 57e872124..e79fcdca3 100644 --- a/sys-boot/limine/limine-2.84.2.ebuild +++ b/sys-boot/limine/limine-2.84.2-r1.ebuild @@ -4,7 +4,7 @@ EAPI=8 WANT_LIBTOOL=none -inherit autotools +inherit autotools toolchain-funcs DESCRIPTION="Limine is a modern, advanced x86/x86_64 BIOS/UEFI multiprotocol bootloader." HOMEPAGE="https://limine-bootloader.org/" @@ -22,10 +22,20 @@ BDEPEND=" eltorito-efi? ( sys-fs/mtools ) " +PATCHES=( + "${FILESDIR}/${PN}-2.84.2-r1-limine-install-respect-ldflags.patch" +) + src_configure() { local myconf=( "$(use_enable eltorito-efi)" ) - TOOLCHAIN="${CHOST}" econf "${myconf[@]}" + LIMINE_LD="$(tc-getLD)" \ + LIMINE_AR="$(tc-getAR)" \ + LIMINE_AS="$(tc-getAS)" \ + LIMINE_OBJCOPY="$(tc-getOBJCOPY)" \ + LIMINE_OBJDUMP="$(tc-getOBJDUMP)" \ + LIMINE_READELF="$(tc-getREADELF)" \ + econf "${myconf[@]}" } |