commit:     aee46be394f9a60ea69527fe1dd3c609602cf3ce
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue May 31 01:41:33 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue May 31 01:42:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aee46be3

sys-boot/syslinux: remove duplicate patches

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 ...he-.note.gnu.property-section-for-the-mbr.patch |  47 ----
 ...inker-to-put-all-sections-into-a-single-P.patch | 311 ---------------------
 .../0003-GCC-10-compatibility-patch.patch          |  99 -------
 ...4-Inherit-toolchain-vars-from-environment.patch |  72 -----
 sys-boot/syslinux/syslinux-6.04_pre3.ebuild        |   3 +-
 5 files changed, 2 insertions(+), 530 deletions(-)

diff --git 
a/sys-boot/syslinux/files/6.04_pre3/0001-Strip-the-.note.gnu.property-section-for-the-mbr.patch
 
b/sys-boot/syslinux/files/6.04_pre3/0001-Strip-the-.note.gnu.property-section-for-the-mbr.patch
deleted file mode 100644
index 5d823436bec8..000000000000
--- 
a/sys-boot/syslinux/files/6.04_pre3/0001-Strip-the-.note.gnu.property-section-for-the-mbr.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 60fef313164d1048cf11423656732953776e5e2f Mon Sep 17 00:00:00 2001
-From: Lukas Schwaighofer <lu...@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_pre3/0002-Force-the-linker-to-put-all-sections-into-a-single-P.patch
 
b/sys-boot/syslinux/files/6.04_pre3/0002-Force-the-linker-to-put-all-sections-into-a-single-P.patch
deleted file mode 100644
index 33b6a36c63ea..000000000000
--- 
a/sys-boot/syslinux/files/6.04_pre3/0002-Force-the-linker-to-put-all-sections-into-a-single-P.patch
+++ /dev/null
@@ -1,311 +0,0 @@
-From 0c646f067a6b766a5ce0434e5e4e7b839b511331 Mon Sep 17 00:00:00 2001
-From: Lukas Schwaighofer <lu...@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_pre3/0003-GCC-10-compatibility-patch.patch 
b/sys-boot/syslinux/files/6.04_pre3/0003-GCC-10-compatibility-patch.patch
deleted file mode 100644
index 6d60eab14bbb..000000000000
--- a/sys-boot/syslinux/files/6.04_pre3/0003-GCC-10-compatibility-patch.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From b92e6e8f624c96acf2ce80192a893ee25de527a1 Mon Sep 17 00:00:00 2001
-From: Lukas Schwaighofer <lu...@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_pre3/0004-Inherit-toolchain-vars-from-environment.patch
 
b/sys-boot/syslinux/files/6.04_pre3/0004-Inherit-toolchain-vars-from-environment.patch
deleted file mode 100644
index 40784f9b2698..000000000000
--- 
a/sys-boot/syslinux/files/6.04_pre3/0004-Inherit-toolchain-vars-from-environment.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 46d58e2b03e15a863aed8661b9ee922da4930a3e Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <flop...@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/syslinux-6.04_pre3.ebuild 
b/sys-boot/syslinux/syslinux-6.04_pre3.ebuild
index bf2d6923e02e..f97f594ef776 100644
--- a/sys-boot/syslinux/syslinux-6.04_pre3.ebuild
+++ b/sys-boot/syslinux/syslinux-6.04_pre3.ebuild
@@ -45,7 +45,8 @@ QA_FLAGS_IGNORED=".*"
 
 src_prepare() {
        local PATCHES=(
-               "${FILESDIR}/${PV}"
+               "${FILESDIR}/6.04_pre1"
+               "${FILESDIR}/6.04_pre3"
        )
        default
 }

Reply via email to