diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
commit | 0f558761aa2dee1017b4751e4017205e015a9560 (patch) | |
tree | 037df795519468a25d9362b4e95cdaeb84eb1cf9 /sys-boot/syslinux | |
parent | 752d6256e5204b958b0ef7905675a940b5e9172f (diff) |
gentoo resync : 29.12.2022
Diffstat (limited to 'sys-boot/syslinux')
9 files changed, 767 insertions, 11 deletions
diff --git a/sys-boot/syslinux/Manifest b/sys-boot/syslinux/Manifest index 2d385d8319e0..799f0015dbb7 100644 --- a/sys-boot/syslinux/Manifest +++ b/sys-boot/syslinux/Manifest @@ -1,6 +1,14 @@ +AUX 6.04_pre1/0001-Strip-the-.note.gnu.property-section-for-the-mbr.patch 1406 BLAKE2B 6fac1d0e6c13aa9a9cbf782472c0b581c2837989185c2e8766d6699602203d94241b3593d673ecd0d5b2238421d7aea670272117fd1a744d8939e3ff07c5a83a SHA512 7ffbe3d9fb8a426d8aaed603c9907d0fee561f0a6983c099ae3e2aff64c5028814f7776d38336c40f68125ad2e492e459057787cda13ab11c5748adc06697113 +AUX 6.04_pre1/0002-Force-the-linker-to-put-all-sections-into-a-single-P.patch 4873 BLAKE2B 851fb44f562d48cc30881d444c424ae6265d884e1ab63bcc41bc55e2fa687c47a208fe4431b57c4042fe8b56f5feb97b7e89d93b1138cf7ad66fb535df7e2115 SHA512 569ee1ccd0639bc79920f38a7d0865a62eee1e55511ec8a1a8e4e5d224de01ce422915cab75134ce836b6880722f9c152ed91ad9fab803a278e7449d5c6c907b +AUX 6.04_pre1/0003-GCC-10-compatibility-patch.patch 3356 BLAKE2B 1ceb5ce12ae9e1ffd81c6c493f3bf3b357622f91b1080b6cfa2fda9ae5f12e46af242a53cbabc14cee2a5d53ee862ab587fd674fb4342bfdd4e6b3035dc536cd SHA512 4cf21b40dcdfc2f3abba5885fd47ca41def10feedee525a805da2a4a84015ef1f72005b1c75baec4cdae3871519c30d2ed6c215f23c8ddef0a3bf04d0f704ce5 +AUX 6.04_pre1/0004-Inherit-toolchain-vars-from-environment.patch 1446 BLAKE2B fbc9c08173f82a6d07cbe11673a61f97efc5e0a284ce029f1092776fd79dcbf0023f8157d94313fef81703350498cb85e2a97da4338be3b7ddaf33fe6a20fc4f SHA512 0e2d9a7ade52135c4d53c18aa2b674314784cb6ea74e3a55013686b8c4b70304f2400a1f9b8f6c7ddc17556a0982ace67e4e6f4f0cc76c97fe09e0f19e9a3c0b +AUX 6.04_pre3/0005-Include-efisetjmp.h-from-efi.h.patch 500 BLAKE2B ed3e0a623c18ecc6880d074397fd6509223e8da1954d09b12f1a6642ca096bcc8a4b9688fbcf239d024a5fe6228aca23dc2069124f3b47c629f67ae8f23e720f SHA512 6dde7d306684174dc68bf952c50f2991d0cbcef545fbc91e220bec620a3e4e2895ac64412b777538d302e2215f1f11e45b29d87918025e98c7e14cf13205eed4 AUX syslinux-6.03-sysmacros.patch 950 BLAKE2B 60fb26a4bb462409074802b8cf01afe29e8a7f98cb6907f4f2c0902f4cc7342b6053368ddf17331eac888714e795299c155a4078668a3ed0e35d435a8cb241d3 SHA512 8659e82e5a5402633c807c8a8f99b25fd6e3066fd0838a7e984452e2ebeccc0331481c93101f00a698e573cadcd98966ea216e4f2d9873e6893af817998e2549 AUX syslinux-6.04_pre1-fcommon.patch 2111 BLAKE2B 6b0d047cc729e7e9c9658ccd6ecd1166eb1ff2be569132f94b0d2bdc71eb9412a05bf23aa287626949a6ea376b2a8d02877d72182d4ea50d54e445df9c38ac81 SHA512 50c58bc44c77a5a68910cd40370f4259afd1392fe8e1b5c6ac25f7e610d994ebc8d17434eb8d3f832a14f098e16b5b597c723f98ce8c12a89118f5b8d2c65529 AUX syslinux-6.04_pre1-singleloadsegment.patch 4744 BLAKE2B a28ff29b9a4bdd2cb65a6700c96ff99ba1a045a401d50587efe59d703f12aca3e47a14a8e7a569c50f11d367545990d09c35f90362efe49d0c9d489802885879 SHA512 9585edfc8ab0e22d4d7757ccdc435c198c5457466fb4fdefc1829cbbe8951f3406b7b51eea56044cc297d29e45772e2154e5746e6d9b92310f17c880c950ff8a DIST syslinux-6.04-pre1.tar.xz 5283272 BLAKE2B 800e5977ed13b26a1756c33d8625e850631b642e26a86e3328196ddd998596693c3a26db0ada4c0ba78a4ba692a1cc01886b6eb693d877ddafcfb325ecdeb639 SHA512 7927dd39be8e2dcf4138a6fea33def67d19d938379d694f15b48fdd2f5924c028b7a9e7bd71d0c7c6630c203e9e2a54296628e530632ad5e6f55b1ebefe8fc98 +DIST syslinux-6.04-pre3.tar.gz 10760898 BLAKE2B 708bb7f3ecbe1888471f3be0102270c056bf8c5be22013f36b56c90f13f5358ce1853722b14b962d8156cd1f045b9687166b98a1d7ad2853acbe6303fa40fae9 SHA512 0619a25347f3964e0c7c6ff629b2f59f01bd9e0afd822f46b67f26b8c84cbc55534cf7b22ff1bf83eec4986fd2d8f1646a3d750190a7c6c50251affc0b62594d EBUILD syslinux-6.04_pre1-r2.ebuild 3251 BLAKE2B 6a9d50d935e133a6937b55c05b5f06f53c01ea20427583b4cdf5d7d1976778d653fe77d083ac3df86d9c38ff10e01db9f735e878ebf26f99937174fe29b30b77 SHA512 621bafdbdca728e8c7abf3331e13eba7a0d672215adf7fab51225394c9ee4e433323751911a58984785a9a58d01dc393752632f3d3d28c46699201d364db20d2 -MISC metadata.xml 412 BLAKE2B 39ab77b79183df91d2bf410ef52f577fc39cc1f21e2f4a843bb8eec34629f3bb87770f8bd0c9461b7065560f2cb1acda57057063c1ab842980d581c52fa89ffd SHA512 55342602eddeca12ee6549fb7d753c19e005034f56f3dee93f09b4f74f3d6e7a99e01e3c56ae0e4d579872fad76e4b64a6b9d99ca064e53614e8491e1d318c64 +EBUILD syslinux-6.04_pre1-r3.ebuild 1746 BLAKE2B 4d38a809948cab9409fb967dd7bf1a9dfc90c0c79949f302c1a7a3647438524b8655a9ed734e9c012880c85302cd43d4e240d48bf5fbfcf35cb0e6cd2564480a SHA512 66903bac7048317a4545bed655e3de728665f6ddba37a3816274ba7d141f3871e78c953b9284146ce8befd01ba55b450934f06edb3825e2043106c739431a6ad +EBUILD syslinux-6.04_pre3.ebuild 2046 BLAKE2B ad2c55bac63b277be423c498c26b797ad3d3600b08e5226fd4d03796e90e421dde7048bc37c1e695998cd456f6bf514b60634ab3d157949d958362d309d527bd SHA512 3063a203d92afbcdf412e8456c2417650a3beb0f3ed0d0d30b0f135fb0fdd91647c7c4af78cec18a9e7159b0086e0b6f4b5eead9541180cdbc4d10fb6b45ea13 +MISC metadata.xml 529 BLAKE2B 8d1614f7254b20836e2bc0f650ae2e3795fd665119bc2d1427e236a417c5c82699929c0291f4b12c04ba2ac387f9d6650682d0d95802fdf333b1267367b4e75c SHA512 e80e9ba96972111b3c5cdea98fb032c50bb7f94a445785ed54d236933768ae2734d248c71ecf54f36d6b3641a7e15abdb4ef4c0b968d59d20ee9259019d32e38 diff --git a/sys-boot/syslinux/files/6.04_pre1/0001-Strip-the-.note.gnu.property-section-for-the-mbr.patch b/sys-boot/syslinux/files/6.04_pre1/0001-Strip-the-.note.gnu.property-section-for-the-mbr.patch new file mode 100644 index 000000000000..5d823436bec8 --- /dev/null +++ b/sys-boot/syslinux/files/6.04_pre1/0001-Strip-the-.note.gnu.property-section-for-the-mbr.patch @@ -0,0 +1,47 @@ +From 60fef313164d1048cf11423656732953776e5e2f Mon Sep 17 00:00:00 2001 +From: Lukas Schwaighofer <lukas@schwaighofer.name> +Date: Sat, 18 Aug 2018 12:48:21 +0200 +Subject: [PATCH 1/5] Strip the .note.gnu.property section for the mbr + +This section is added since binutils Debian version 2.31.1-2 and causes mbr.bin +to grow in size beyond what can fit into the master boot record. + +Forwarded: https://www.syslinux.org/archives/2018-August/026168.html +--- + mbr/i386/mbr.ld | 6 +++++- + mbr/x86_64/mbr.ld | 6 +++++- + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/mbr/i386/mbr.ld b/mbr/i386/mbr.ld +index d14ba802..6d489904 100644 +--- a/mbr/i386/mbr.ld ++++ b/mbr/i386/mbr.ld +@@ -69,5 +69,9 @@ SECTIONS + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } +- /DISCARD/ : { *(.note.GNU-stack) } ++ /DISCARD/ : ++ { ++ *(.note.GNU-stack) ++ *(.note.gnu.property) ++ } + } +diff --git a/mbr/x86_64/mbr.ld b/mbr/x86_64/mbr.ld +index ae27d49a..5b46db66 100644 +--- a/mbr/x86_64/mbr.ld ++++ b/mbr/x86_64/mbr.ld +@@ -68,5 +68,9 @@ SECTIONS + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } +- /DISCARD/ : { *(.note.GNU-stack) } ++ /DISCARD/ : ++ { ++ *(.note.GNU-stack) ++ *(.note.gnu.property) ++ } + } +-- +2.35.1 + diff --git a/sys-boot/syslinux/files/6.04_pre1/0002-Force-the-linker-to-put-all-sections-into-a-single-P.patch b/sys-boot/syslinux/files/6.04_pre1/0002-Force-the-linker-to-put-all-sections-into-a-single-P.patch new file mode 100644 index 000000000000..33b6a36c63ea --- /dev/null +++ b/sys-boot/syslinux/files/6.04_pre1/0002-Force-the-linker-to-put-all-sections-into-a-single-P.patch @@ -0,0 +1,311 @@ +From 0c646f067a6b766a5ce0434e5e4e7b839b511331 Mon Sep 17 00:00:00 2001 +From: Lukas Schwaighofer <lukas@schwaighofer.name> +Date: Sat, 18 Aug 2018 16:56:35 +0200 +Subject: [PATCH 2/5] Force the linker to put all sections into a single + PT_LOAD segment + +This is required when using binutils >= 2.31 which writes two PT_LOAD segments +by default. This is not supported by the wrapper.c script used to convert the +shared object into an elf binary. + +Forwarded: https://www.syslinux.org/archives/2018-August/026167.html +--- + efi/i386/syslinux.ld | 37 +++++++++++++++++++++---------------- + efi/x86_64/syslinux.ld | 37 +++++++++++++++++++++---------------- + 2 files changed, 42 insertions(+), 32 deletions(-) + +diff --git a/efi/i386/syslinux.ld b/efi/i386/syslinux.ld +index bab3fc74..19c16479 100644 +--- a/efi/i386/syslinux.ld ++++ b/efi/i386/syslinux.ld +@@ -19,6 +19,11 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") + OUTPUT_ARCH(i386) + ENTRY(_start) + ++PHDRS ++{ ++ all PT_LOAD ; ++} ++ + SECTIONS + { + . = 0; +@@ -31,7 +36,7 @@ SECTIONS + *(.text) + *(.text.*) + __text_end = .; +- } ++ } :all + + . = ALIGN(16); + +@@ -40,7 +45,7 @@ SECTIONS + *(.rodata) + *(.rodata.*) + __rodata_end = .; +- } ++ } :all + + . = ALIGN(4); + +@@ -49,14 +54,14 @@ SECTIONS + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + __ctors_end = .; +- } ++ } :all + + .dtors : { + __dtors_start = .; + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + __dtors_end = .; +- } ++ } :all + + . = ALIGN(4096); + .rel : { +@@ -64,7 +69,7 @@ SECTIONS + *(.rel.data) + *(.rel.data.*) + *(.rel.ctors) +- } ++ } :all + + . = ALIGN(4); + +@@ -72,14 +77,14 @@ SECTIONS + __gnu_hash_start = .; + *(.gnu.hash) + __gnu_hash_end = .; +- } ++ } :all + + + .dynsym : { + __dynsym_start = .; + *(.dynsym) + __dynsym_end = .; +- } ++ } :all + + . = ALIGN(4); + +@@ -87,7 +92,7 @@ SECTIONS + __dynstr_start = .; + *(.dynstr) + __dynstr_end = .; +- } ++ } :all + + . = ALIGN(4); + +@@ -104,7 +109,7 @@ SECTIONS + KEEP (*(.got.plt)) + KEEP (*(.got)) + __got_end = .; +- } ++ } :all + + . = ALIGN(4); + +@@ -112,7 +117,7 @@ SECTIONS + __dynamic_start = .; + *(.dynamic) + __dynamic_end = .; +- } ++ } :all + + . = ALIGN(16); + +@@ -122,19 +127,19 @@ SECTIONS + *(.data.*) + *(.lowmem) + __data_end = .; +- } ++ } :all + + .reloc : { + *(.reloc) +- } ++ } :all + + .symtab : { + *(.symtab) +- } ++ } :all + + .strtab : { + *(.strtab) +- } ++ } :all + + .bss (NOLOAD) : { + /* the EFI loader doesn't seem to like a .bss section, +@@ -148,7 +153,7 @@ SECTIONS + __bss_end = .; + *(.sbss) + *(.scommon) +- } ++ } :all + __bss_len = ABSOLUTE(__bss_end) - ABSOLUTE(__bss_start); + __bss_dwords = (__bss_len + 3) >> 2; + +@@ -161,7 +166,7 @@ SECTIONS + *(.hugebss) + *(.hugebss.*) + __hugebss_end = .; +- } ++ } :all + + _end = .; + +diff --git a/efi/x86_64/syslinux.ld b/efi/x86_64/syslinux.ld +index 450641c6..a2c124fd 100644 +--- a/efi/x86_64/syslinux.ld ++++ b/efi/x86_64/syslinux.ld +@@ -19,6 +19,11 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") + OUTPUT_ARCH(i386:x86-64) + ENTRY(_start) + ++PHDRS ++{ ++ all PT_LOAD ; ++} ++ + SECTIONS + { + . = 0; +@@ -31,7 +36,7 @@ SECTIONS + *(.text) + *(.text.*) + __text_end = .; +- } ++ } :all + + . = ALIGN(16); + +@@ -40,7 +45,7 @@ SECTIONS + *(.rodata) + *(.rodata.*) + __rodata_end = .; +- } ++ } :all + + . = ALIGN(4); + +@@ -49,14 +54,14 @@ SECTIONS + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + __ctors_end = .; +- } ++ } :all + + .dtors : { + __dtors_start = .; + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + __dtors_end = .; +- } ++ } :all + + . = ALIGN(4096); + .rel : { +@@ -64,7 +69,7 @@ SECTIONS + *(.rel.data) + *(.rel.data.*) + *(.rel.ctors) +- } ++ } :all + + . = ALIGN(4); + +@@ -72,14 +77,14 @@ SECTIONS + __gnu_hash_start = .; + *(.gnu.hash) + __gnu_hash_end = .; +- } ++ } :all + + + .dynsym : { + __dynsym_start = .; + *(.dynsym) + __dynsym_end = .; +- } ++ } :all + + . = ALIGN(4); + +@@ -87,7 +92,7 @@ SECTIONS + __dynstr_start = .; + *(.dynstr) + __dynstr_end = .; +- } ++ } :all + + . = ALIGN(4); + +@@ -104,7 +109,7 @@ SECTIONS + KEEP (*(.got.plt)) + KEEP (*(.got)) + __got_end = .; +- } ++ } :all + + . = ALIGN(4); + +@@ -112,7 +117,7 @@ SECTIONS + __dynamic_start = .; + *(.dynamic) + __dynamic_end = .; +- } ++ } :all + + . = ALIGN(16); + +@@ -122,19 +127,19 @@ SECTIONS + *(.data.*) + *(.lowmem) + __data_end = .; +- } ++ } :all + + .reloc : { + *(.reloc) +- } ++ } :all + + .symtab : { + *(.symtab) +- } ++ } :all + + .strtab : { + *(.strtab) +- } ++ } :all + + .bss (NOLOAD) : { + /* the EFI loader doesn't seem to like a .bss section, +@@ -148,7 +153,7 @@ SECTIONS + __bss_end = .; + *(.sbss) + *(.scommon) +- } ++ } :all + __bss_len = ABSOLUTE(__bss_end) - ABSOLUTE(__bss_start); + __bss_dwords = (__bss_len + 3) >> 2; + +@@ -161,7 +166,7 @@ SECTIONS + *(.hugebss) + *(.hugebss.*) + __hugebss_end = .; +- } ++ } :all + + _end = .; + +-- +2.35.1 + diff --git a/sys-boot/syslinux/files/6.04_pre1/0003-GCC-10-compatibility-patch.patch b/sys-boot/syslinux/files/6.04_pre1/0003-GCC-10-compatibility-patch.patch new file mode 100644 index 000000000000..6d60eab14bbb --- /dev/null +++ b/sys-boot/syslinux/files/6.04_pre1/0003-GCC-10-compatibility-patch.patch @@ -0,0 +1,99 @@ +From b92e6e8f624c96acf2ce80192a893ee25de527a1 Mon Sep 17 00:00:00 2001 +From: Lukas Schwaighofer <lukas@schwaighofer.name> +Date: Sun, 16 Aug 2020 15:23:21 +0200 +Subject: [PATCH 3/5] GCC-10 compatibility patch + +* Add `-fcommon` to most gcc invocations to allow duplicate definitions +* __builtin_strlen is not really a "builtin" an implementation still + needs to be provided (source: + https://bugzilla.suse.com/show_bug.cgi?id=1166605#c5). Work around the + issue by supplying an inline function. The strlen function added to + dos/string.h was copied from com32/lib/strlen.c. +--- + dos/string.h | 11 ++++++++++- + mk/efi.mk | 1 + + mk/elf.mk | 1 + + mk/embedded.mk | 2 +- + mk/lib.mk | 2 +- + 5 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/dos/string.h b/dos/string.h +index f648de2d..c4649f5f 100644 +--- a/dos/string.h ++++ b/dos/string.h +@@ -5,12 +5,21 @@ + #ifndef _STRING_H + #define _STRING_H + ++#include <stddef.h> ++ + /* Standard routines */ + #define memcpy(a,b,c) __builtin_memcpy(a,b,c) + #define memmove(a,b,c) __builtin_memmove(a,b,c) + #define memset(a,b,c) __builtin_memset(a,b,c) + #define strcpy(a,b) __builtin_strcpy(a,b) +-#define strlen(a) __builtin_strlen(a) ++ ++static inline size_t strlen(const char *s) ++{ ++ const char *ss = s; ++ while (*ss) ++ ss++; ++ return ss - s; ++} + + /* This only returns true or false */ + static inline int memcmp(const void *__m1, const void *__m2, unsigned int __n) +diff --git a/mk/efi.mk b/mk/efi.mk +index f097ad22..407bc077 100644 +--- a/mk/efi.mk ++++ b/mk/efi.mk +@@ -25,6 +25,7 @@ FORMAT=efi-app-$(EFI_SUBARCH) + + CFLAGS = -I$(EFIINC) -I$(EFIINC)/$(EFI_SUBARCH) \ + -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding \ ++ -fcommon \ + -Wall -I$(com32)/include -I$(com32)/include/sys \ + -I$(core)/include -I$(core)/ $(ARCHOPT) \ + -I$(com32)/lib/ -I$(com32)/libutil/include -std=gnu99 \ +diff --git a/mk/elf.mk b/mk/elf.mk +index b46dbd06..dc265ce9 100644 +--- a/mk/elf.mk ++++ b/mk/elf.mk +@@ -55,6 +55,7 @@ GPLINCLUDE = + endif + + CFLAGS = $(GCCOPT) $(GCCWARN) -W -Wall \ ++ -fcommon \ + -fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ -DDYNAMIC_MODULE \ + -nostdinc -iwithprefix include \ + -I$(com32)/libutil/include -I$(com32)/include \ +diff --git a/mk/embedded.mk b/mk/embedded.mk +index 488dc0fc..fae13e20 100644 +--- a/mk/embedded.mk ++++ b/mk/embedded.mk +@@ -57,7 +57,7 @@ LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc) + LD += -m elf_$(ARCH) + + # Note: use += for CFLAGS and SFLAGS in case something is set in MCONFIG.local +-CFLAGS += $(GCCOPT) -g $(GCCWARN) -Wno-sign-compare $(OPTFLAGS) $(INCLUDES) ++CFLAGS += $(GCCOPT) -g $(GCCWARN) -Wno-sign-compare -fcommon $(OPTFLAGS) $(INCLUDES) + SFLAGS += $(CFLAGS) -D__ASSEMBLY__ + + .SUFFIXES: .c .o .S .s .i .elf .com .bin .asm .lst .c32 .lss +diff --git a/mk/lib.mk b/mk/lib.mk +index f8591e56..6dd54295 100644 +--- a/mk/lib.mk ++++ b/mk/lib.mk +@@ -49,7 +49,7 @@ OPTFLAGS = -Os -march=$(MARCH) -falign-functions=0 -falign-jumps=0 \ + -falign-labels=0 -ffast-math -fomit-frame-pointer + WARNFLAGS = $(GCCWARN) -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline + +-CFLAGS = $(OPTFLAGS) $(REQFLAGS) $(WARNFLAGS) $(LIBFLAGS) ++CFLAGS = $(OPTFLAGS) $(REQFLAGS) -fcommon $(WARNFLAGS) $(LIBFLAGS) + + ifeq ($(FWCLASS),EFI) + CFLAGS += -mno-red-zone +-- +2.35.1 + diff --git a/sys-boot/syslinux/files/6.04_pre1/0004-Inherit-toolchain-vars-from-environment.patch b/sys-boot/syslinux/files/6.04_pre1/0004-Inherit-toolchain-vars-from-environment.patch new file mode 100644 index 000000000000..40784f9b2698 --- /dev/null +++ b/sys-boot/syslinux/files/6.04_pre1/0004-Inherit-toolchain-vars-from-environment.patch @@ -0,0 +1,72 @@ +From 46d58e2b03e15a863aed8661b9ee922da4930a3e Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Mon, 30 May 2022 11:57:07 -0400 +Subject: [PATCH 4/5] Inherit toolchain vars from environment + +--- + mk/syslinux.mk | 36 ++++++++++++++++++------------------ + 1 file changed, 18 insertions(+), 18 deletions(-) + +diff --git a/mk/syslinux.mk b/mk/syslinux.mk +index 593ff75f..91d984e8 100644 +--- a/mk/syslinux.mk ++++ b/mk/syslinux.mk +@@ -37,7 +37,7 @@ ifdef DEBUG + DEBUGOPT = -DDEBUG=$(DEBUG) + endif + +-NASM = nasm ++NASM ?= nasm + NASMOPT = -Ox $(DEBUGOPT) + + PERL = perl +@@ -46,29 +46,29 @@ UPX = upx + + CHMOD = chmod + +-CC = gcc ++CC ?= gcc + gcc_ok = $(shell tmpf=gcc_ok.$$$$.tmp; \ + if $(CC) $(GCCOPT) $(1) -c $(topdir)/dummy.c \ + -o $$tmpf 2>/dev/null ; \ + then echo '$(1)'; else echo '$(2)'; fi; \ + rm -f $$tmpf) + +-LD = ld +-OBJDUMP = objdump +-OBJCOPY = objcopy +-STRIP = strip +-AR = ar +-NM = nm +-RANLIB = ranlib +-STRIP = strip +-GZIPPROG = gzip +-XZ = xz +-PNGTOPNM = pngtopnm +-MCOPY = mcopy +-MFORMAT = mformat +-MKISOFS = mkisofs +-SED = sed +-WGET = wget ++LD ?= ld ++OBJDUMP ?= objdump ++OBJCOPY ?= objcopy ++STRIP ?= strip ++AR ?= ar ++NM ?= nm ++RANLIB ?= ranlib ++STRIP ?= strip ++GZIPPROG ?= gzip ++XZ ?= xz ++PNGTOPNM ?= pngtopnm ++MCOPY ?= mcopy ++MFORMAT ?= mformat ++MKISOFS ?= mkisofs ++SED ?= sed ++WGET ?= wget + + com32 = $(topdir)/com32 + +-- +2.35.1 + diff --git a/sys-boot/syslinux/files/6.04_pre3/0005-Include-efisetjmp.h-from-efi.h.patch b/sys-boot/syslinux/files/6.04_pre3/0005-Include-efisetjmp.h-from-efi.h.patch new file mode 100644 index 000000000000..0d32d7167024 --- /dev/null +++ b/sys-boot/syslinux/files/6.04_pre3/0005-Include-efisetjmp.h-from-efi.h.patch @@ -0,0 +1,24 @@ +From 9889f441d006d11d0fb0b726b9f81396ce6fcfbd Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Mon, 30 May 2022 14:22:28 -0400 +Subject: [PATCH 5/5] Include efisetjmp.h from efi.h + +--- + efi/efi.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/efi/efi.h b/efi/efi.h +index c266532f..250c511e 100644 +--- a/efi/efi.h ++++ b/efi/efi.h +@@ -22,6 +22,7 @@ + + #include <efi.h> + #include <efilib.h> ++#include <efisetjmp.h> + #include <efistdarg.h> + + /* Delay for 100 ms */ +-- +2.35.1 + diff --git a/sys-boot/syslinux/metadata.xml b/sys-boot/syslinux/metadata.xml index 423c8b85ac5e..ca6327ed17a2 100644 --- a/sys-boot/syslinux/metadata.xml +++ b/sys-boot/syslinux/metadata.xml @@ -1,14 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<maintainer type="person"> - <email>chithanh@gentoo.org</email> -</maintainer> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> -<upstream> - <remote-id type="cpe">cpe:/a:gentoo:syslinux</remote-id> -</upstream> + <maintainer type="person"> + <email>chithanh@gentoo.org</email> + </maintainer> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <use> + <flag name="bios">Enable BIOS support</flag> + <flag name="efi">Enable EFI support</flag> + </use> + <upstream> + <remote-id type="cpe">cpe:/a:gentoo:syslinux</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-boot/syslinux/syslinux-6.04_pre1-r3.ebuild b/sys-boot/syslinux/syslinux-6.04_pre1-r3.ebuild new file mode 100644 index 000000000000..4fba6cac1462 --- /dev/null +++ b/sys-boot/syslinux/syslinux-6.04_pre1-r3.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="SYSLINUX, PXELINUX, ISOLINUX, EXTLINUX and MEMDISK bootloaders" +HOMEPAGE="https://www.syslinux.org/" +MY_P=${P/_/-} +SRC_URI="https://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.04/${MY_P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="abi_x86_32 abi_x86_64 +bios +efi" +REQUIRED_USE="|| ( bios efi ) + efi? ( || ( abi_x86_32 abi_x86_64 ) )" + +BDEPEND=" + dev-lang/perl + bios? ( + app-arch/upx + app-text/asciidoc + dev-lang/nasm + ) +" +RDEPEND=" + sys-apps/util-linux + sys-fs/mtools + dev-perl/Crypt-PasswdMD5 + dev-perl/Digest-SHA1 +" +DEPEND="${RDEPEND} + virtual/os-headers +" + +S=${WORKDIR}/${MY_P} + +QA_EXECSTACK="usr/share/syslinux/*" +QA_WX_LOAD="usr/share/syslinux/*" +QA_PRESTRIPPED="usr/share/syslinux/.*" +QA_FLAGS_IGNORED=".*" + +src_prepare() { + local PATCHES=( + "${FILESDIR}/syslinux-6.03-sysmacros.patch" + "${FILESDIR}/${PV}" + ) + default +} +src_compile() { + local DATE=$(date -u -r NEWS +%Y%m%d) + local HEXDATE=$(printf '0x%08x' "${DATE}") + + tc-export AR CC LD OBJCOPY RANLIB + unset LDFLAGS + + if use bios; then + emake bios DATE="${DATE}" HEXDATE="${HEXDATE}" + fi + if use efi; then + if use abi_x86_32; then + emake efi32 DATE="${DATE}" HEXDATE="${HEXDATE}" + fi + if use abi_x86_64; then + emake efi64 DATE="${DATE}" HEXDATE="${HEXDATE}" + fi + fi +} + +src_install() { + local firmware=( $(usev bios) ) + if use efi; then + use abi_x86_32 && firmware+=( efi32 ) + use abi_x86_64 && firmware+=( efi64 ) + fi + local args=( + INSTALLROOT="${ED}" + MANDIR='$(DATADIR)/man' + "${firmware[@]}" + install + ) + emake -j1 "${args[@]}" + einstalldocs + dostrip -x /usr/share/syslinux +} diff --git a/sys-boot/syslinux/syslinux-6.04_pre3.ebuild b/sys-boot/syslinux/syslinux-6.04_pre3.ebuild new file mode 100644 index 000000000000..9d2dcf602fe1 --- /dev/null +++ b/sys-boot/syslinux/syslinux-6.04_pre3.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="SYSLINUX, PXELINUX, ISOLINUX, EXTLINUX and MEMDISK bootloaders" +HOMEPAGE="https://www.syslinux.org/" +MY_P=${P/_/-} +SRC_URI="https://git.zytor.com/syslinux/syslinux.git/snapshot/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +#KEYWORDS="-* ~amd64 ~x86" +IUSE="abi_x86_32 abi_x86_64 +bios +efi" +REQUIRED_USE="|| ( bios efi ) + efi? ( || ( abi_x86_32 abi_x86_64 ) )" + +RESTRICT="test" + +BDEPEND=" + dev-lang/perl + bios? ( + app-arch/upx + app-text/asciidoc + dev-lang/nasm + ) +" +RDEPEND=" + sys-apps/util-linux + sys-fs/mtools + dev-perl/Crypt-PasswdMD5 + dev-perl/Digest-SHA1 +" +DEPEND="${RDEPEND} + efi? ( sys-boot/gnu-efi[abi_x86_32(-)?,abi_x86_64(-)?] ) + virtual/os-headers +" + +S=${WORKDIR}/${MY_P} + +QA_EXECSTACK="usr/share/syslinux/*" +QA_WX_LOAD="usr/share/syslinux/*" +QA_PRESTRIPPED="usr/share/syslinux/.*" +QA_FLAGS_IGNORED=".*" + +src_prepare() { + local PATCHES=( + "${FILESDIR}/6.04_pre1" + "${FILESDIR}/6.04_pre3" + ) + default +} + +efimake() { + local ABI="${1}" + local libdir="$(get_libdir)" + shift + local args=( + EFIINC="${ESYSROOT}/usr/include/efi" + LIBDIR="${ESYSROOT}/usr/${libdir}" + LIBEFI="${ESYSROOT}/usr/${libdir}/libefi.a" + "${@}" + ) + emake "${args[@]}" +} + +src_compile() { + local DATE=$(date -u -r NEWS +%Y%m%d) + local HEXDATE=$(printf '0x%08x' "${DATE}") + + tc-export AR CC LD OBJCOPY RANLIB + unset LDFLAGS + + if use bios; then + emake bios DATE="${DATE}" HEXDATE="${HEXDATE}" + fi + if use efi; then + if use abi_x86_32; then + efimake x86 efi32 DATE="${DATE}" HEXDATE="${HEXDATE}" + fi + if use abi_x86_64; then + efimake amd64 efi64 DATE="${DATE}" HEXDATE="${HEXDATE}" + fi + fi +} + +src_install() { + local firmware=( $(usev bios) ) + if use efi; then + use abi_x86_32 && firmware+=( efi32 ) + use abi_x86_64 && firmware+=( efi64 ) + fi + local args=( + INSTALLROOT="${ED}" + MANDIR='$(DATADIR)/man' + "${firmware[@]}" + install + ) + emake -j1 "${args[@]}" + einstalldocs + dostrip -x /usr/share/syslinux +} |