[gentoo-commits] repo/gentoo:master commit in: sys-boot/syslinux/, sys-boot/syslinux/files/

2023-08-28 Thread Sam James
commit: aad4c7d1977e6bf97a8d17c445ff6a7a4f9e806c
Author: Sam James  gentoo  org>
AuthorDate: Mon Aug 28 18:18:47 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Aug 28 19:09:51 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aad4c7d1

sys-boot/syslinux: fix build w/ binutils-2.41[hardened]

Closes: https://bugs.gentoo.org/913129
Signed-off-by: Sam James  gentoo.org>

 .../files/syslinux-6.04-binutils-2.41.patch| 74 ++
 sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild |  1 +
 sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild |  1 +
 3 files changed, 76 insertions(+)

diff --git a/sys-boot/syslinux/files/syslinux-6.04-binutils-2.41.patch 
b/sys-boot/syslinux/files/syslinux-6.04-binutils-2.41.patch
new file mode 100644
index ..530959fc478b
--- /dev/null
+++ b/sys-boot/syslinux/files/syslinux-6.04-binutils-2.41.patch
@@ -0,0 +1,74 @@
+https://bugs.gentoo.org/913129
+--- a/gnu-efi/gnu-efi-3.0/Make.defaults
 b/gnu-efi/gnu-efi-3.0/Make.defaults
+@@ -114,4 +114,4 @@ CFLAGS  += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar 
-fno-strict-aliasing \
+-fno-merge-constants -ffreestanding -fno-stack-protector   \
+-fno-stack-check
+ ASFLAGS += $(ARCH3264)
+-LDFLAGS   += -nostdlib --warn-common --no-undefined --fatal-warnings
++LDFLAGS   += -nostdlib --warn-common --no-undefined --fatal-warnings 
--no-warn-rwx-segments -z notext
+--- a/gnu-efi/gnu-efi-3.0/apps/Makefile
 b/gnu-efi/gnu-efi-3.0/apps/Makefile
+@@ -52,7 +52,7 @@ ifneq (,$(findstring FreeBSD,$(OS)))
+ LDSCRIPT  = $(TOPDIR)/gnuefi/elf_$(ARCH)_fbsd_efi.lds
+ endif
+ 
+-LDFLAGS   += -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
++LDFLAGS   += -shared --no-warn-rwx-segments -z notext -Bsymbolic 
-L../lib -L../gnuefi $(CRTOBJS)
+ 
+ LOADLIBES += -lefi -lgnuefi
+ LOADLIBES += $(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
+--- a/mk/com32.mk
 b/mk/com32.mk
+@@ -80,7 +80,7 @@ SFLAGS = $(GCCOPT) $(GCCWARN) \
+-I$(topdir)/core/include
+ 
+ COM32LD  = $(com32)/lib/$(ARCH)/elf.ld
+-LDFLAGS= -m elf_$(ARCH) -shared --hash-style=gnu -T $(COM32LD)
++LDFLAGS= -m elf_$(ARCH) -shared --no-warn-rwx-segments -z notext 
--hash-style=gnu -T $(COM32LD)
+ LIBGCC:= $(shell $(CC) $(GCCOPT) --print-libgcc)
+ 
+ LNXCFLAGS  = -I$(com32)/libutil/include $(GCCWARN) -O -g \
+--- a/mk/efi.mk
 b/mk/efi.mk
+@@ -38,7 +38,7 @@ CRT0 := $(LIBDIR)/crt0-efi-$(EFI_SUBARCH).o
+ LDSCRIPT := $(LIBDIR)/elf_$(EFI_SUBARCH)_efi.lds
+ 
+ LDFLAGS = -T $(SRC)/$(ARCH)/syslinux.ld -Bsymbolic -pie -nostdlib 
-znocombreloc \
+-  -L$(LIBDIR) --hash-style=gnu -m elf_$(ARCH) $(CRT0) -E
++  -L$(LIBDIR) --no-warn-rwx-segments -z notext --hash-style=gnu 
-m elf_$(ARCH) $(CRT0) -E
+ 
+ SFLAGS = $(GCCOPT) $(GCCWARN) $(ARCHOPT) \
+-fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
+--- a/mk/elf.mk
 b/mk/elf.mk
+@@ -68,7 +68,7 @@ GCCOPT += -mregparm=3 -DREGPARM=3
+ endif
+ 
+ SFLAGS = $(GCCOPT) -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ 
+-LDFLAGS= -m elf_$(ARCH) -shared --hash-style=gnu -T 
$(com32)/lib/$(ARCH)/elf.ld --as-needed
++LDFLAGS= -m elf_$(ARCH) -shared --no-warn-rwx-segments -z notext 
--hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld --as-needed
+ LIBGCC:= $(shell $(CC) $(GCCOPT) --print-libgcc)
+ 
+ LNXCFLAGS  = -I$(com32)/libutil/include -W -Wall -O -g -D_GNU_SOURCE
+--- a/mk/lib.mk
 b/mk/lib.mk
+@@ -205,7 +205,7 @@ CORELIBOBJS = \
+   $(LIBENTRY_OBJS) \
+   $(LIBMODULE_OBJS)
+ 
+-LDFLAGS   = -m elf_$(ARCH) --hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld
++LDFLAGS   = -m elf_$(ARCH) --no-warn-rwx-segments -z notext 
--hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld
+ 
+ .SUFFIXES: .c .o .a .so .lo .i .S .s .ls .ss .lss
+ 
+--- a/core/Makefile
 b/core/Makefile
+@@ -158,6 +158,7 @@ NASM_ELF = elf
+ %.elf: %.o $(LIBDEP) $(LDSCRIPT) $(AUXLIBS)
+   $(LD) $(LDFLAGS) -pie -Bsymbolic \
+   -T $(LDSCRIPT) \
++  --no-warn-rwx-segments -z notext \
+   --unresolved-symbols=report-all \
+   -E --hash-style=gnu -M -o $@ $< \
+   --start-group $(LIBS) $(subst $(*F).elf,lib$(*F).a,$@) 
--end-group \

diff --git a/sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild 
b/sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild
index 6b5cb5abcf12..7ba486a0a92a 100644
--- a/sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild
+++ b/sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild
@@ -46,6 +46,7 @@ src_prepare() {
local PATCHES=(
"${FILESDIR}/syslinux-6.03-sysmacros.patch"
"${FILESDIR}/${PV}"
+   "${FILESDIR}/syslinux-6.04-binutils-2.41.patch"
)
default
 }

diff --git a/sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild 
b/sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild
index b483d5b273d2..0320264c2fdd 100644
--- 

[gentoo-commits] repo/gentoo:master commit in: sys-boot/syslinux/, sys-boot/syslinux/files/

2022-12-25 Thread Mike Gilbert
commit: 5e8762eca910a406ad3421943960142093181578
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sun Dec 25 23:51:38 2022 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sun Dec 25 23:53:53 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e8762ec

sys-boot/syslinux: drop 6.04_pre1-r4

Signed-off-by: Mike Gilbert  gentoo.org>

 .../files/syslinux-6.04_pre1-fcommon.patch |  54 
 .../syslinux-6.04_pre1-singleloadsegment.patch | 304 -
 sys-boot/syslinux/syslinux-6.04_pre1-r4.ebuild | 123 -
 3 files changed, 481 deletions(-)

diff --git a/sys-boot/syslinux/files/syslinux-6.04_pre1-fcommon.patch 
b/sys-boot/syslinux/files/syslinux-6.04_pre1-fcommon.patch
deleted file mode 100644
index 7d061db26563..
--- a/sys-boot/syslinux/files/syslinux-6.04_pre1-fcommon.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-https://bugs.gentoo.org/705730
-
-gcc-10 enabled f-no-common by default. Broke syslinux linking.
 a/mk/com32.mk
-+++ b/mk/com32.mk
-@@ -47,6 +47,7 @@ GCCOPT += $(call 
gcc_ok,-falign-functions=0,-malign-functions=0)
- GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
- GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
- GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
-+GCCOPT += $(call gcc_ok,-fcommon)
- 
- ifeq ($(FWCLASS),EFI)
- GCCOPT += -mno-red-zone
 a/mk/elf.mk
-+++ b/mk/elf.mk
-@@ -42,6 +42,7 @@ GCCOPT += $(call 
gcc_ok,-falign-functions=0,-malign-functions=0)
- GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
- GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
- GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
-+GCCOPT += $(call gcc_ok,-fcommon)
- 
- com32 = $(topdir)/com32
- core = $(topdir)/core
 a/mk/embedded.mk
-+++ b/mk/embedded.mk
-@@ -51,6 +51,7 @@ GCCOPT+= $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
- GCCOPT+= $(call gcc_ok,-falign-labels=0,-malign-labels=0)
- GCCOPT+= $(call gcc_ok,-falign-loops=0,-malign-loops=0)
- GCCOPT+= $(call gcc_ok,-fvisibility=hidden)
-+GCCOPT+= $(call gcc_ok,-fcommon)
- 
- LIBGCC:= $(shell $(CC) $(GCCOPT) --print-libgcc)
- 
 a/mk/lib.mk
-+++ b/mk/lib.mk
-@@ -28,6 +28,7 @@ GCCOPT += $(call 
gcc_ok,-falign-functions=0,-malign-functions=0)
- GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
- GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
- GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
-+GCCOPT += $(call gcc_ok,-fcommon)
- 
- INCLUDE   = -I$(SRC)
- STRIP = strip --strip-all -R .comment -R .note
 a/mk/efi.mk
-+++ b/mk/efi.mk
-@@ -7,7 +7,7 @@ core = $(topdir)/core
- # Set up architecture specifics; for cross compilation, set ARCH as apt
- # gnuefi sets up architecture specifics in ia32 or x86_64 sub directories
- # set up the LIBDIR and EFIINC for building for the appropriate architecture
--GCCOPT := $(call gcc_ok,-fno-stack-protector,)
-+GCCOPT := $(call gcc_ok,-fno-stack-protector,) $(call gcc_ok,-fcommon)
- EFIINC = $(objdir)/include/efi
- LIBDIR  = $(objdir)/lib
- 

diff --git a/sys-boot/syslinux/files/syslinux-6.04_pre1-singleloadsegment.patch 
b/sys-boot/syslinux/files/syslinux-6.04_pre1-singleloadsegment.patch
deleted file mode 100644
index db9b7d0a137b..
--- a/sys-boot/syslinux/files/syslinux-6.04_pre1-singleloadsegment.patch
+++ /dev/null
@@ -1,304 +0,0 @@
-Author: Lukas Schwaighofer 
-Description: 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 bab3fc7..5b4589d 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
- 
-   . = 

[gentoo-commits] repo/gentoo:master commit in: sys-boot/syslinux/, sys-boot/syslinux/files/6.04_pre3/

2022-05-30 Thread Mike Gilbert
commit: aee46be394f9a60ea69527fe1dd3c609602cf3ce
Author: Mike Gilbert  gentoo  org>
AuthorDate: Tue May 31 01:41:33 2022 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Tue May 31 01:42:09 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aee46be3

sys-boot/syslinux: remove duplicate patches

Signed-off-by: Mike Gilbert  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..
--- 
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 
-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..
--- 
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 
-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 = 

[gentoo-commits] repo/gentoo:master commit in: sys-boot/syslinux/, sys-boot/syslinux/files/6.04_pre1/

2022-05-30 Thread Mike Gilbert
commit: 700a3d7c40c57f7ec7c207a907baced1aebddbf8
Author: Mike Gilbert  gentoo  org>
AuthorDate: Tue May 31 01:37:35 2022 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Tue May 31 01:42:08 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=700a3d7c

sys-boot/syslinux: backport ebuild changes to 6.04-pre1

Signed-off-by: Mike Gilbert  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_pre1-r3.ebuild |  87 ++
 5 files changed, 616 insertions(+)

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 ..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 
+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 ..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 
+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 = .;
+

[gentoo-commits] repo/gentoo:master commit in: sys-boot/syslinux/, sys-boot/syslinux/files/

2020-04-06 Thread Sergei Trofimovich
commit: 8284530f4bd86a38b9867f847bd844f5d8d08e87
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Mon Apr  6 22:46:03 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Mon Apr  6 22:49:52 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8284530f

sys-boot/syslinux: tweak for gcc-10, bug #705730

Closes: https://bugs.gentoo.org/705730
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich  gentoo.org>

 .../files/syslinux-6.04_pre1-fcommon.patch |  54 +++
 sys-boot/syslinux/syslinux-6.04_pre1-r1.ebuild | 107 +
 2 files changed, 161 insertions(+)

diff --git a/sys-boot/syslinux/files/syslinux-6.04_pre1-fcommon.patch 
b/sys-boot/syslinux/files/syslinux-6.04_pre1-fcommon.patch
new file mode 100644
index 000..7d061db2656
--- /dev/null
+++ b/sys-boot/syslinux/files/syslinux-6.04_pre1-fcommon.patch
@@ -0,0 +1,54 @@
+https://bugs.gentoo.org/705730
+
+gcc-10 enabled f-no-common by default. Broke syslinux linking.
+--- a/mk/com32.mk
 b/mk/com32.mk
+@@ -47,6 +47,7 @@ GCCOPT += $(call 
gcc_ok,-falign-functions=0,-malign-functions=0)
+ GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
+ GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
+ GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
++GCCOPT += $(call gcc_ok,-fcommon)
+ 
+ ifeq ($(FWCLASS),EFI)
+ GCCOPT += -mno-red-zone
+--- a/mk/elf.mk
 b/mk/elf.mk
+@@ -42,6 +42,7 @@ GCCOPT += $(call 
gcc_ok,-falign-functions=0,-malign-functions=0)
+ GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
+ GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
+ GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
++GCCOPT += $(call gcc_ok,-fcommon)
+ 
+ com32 = $(topdir)/com32
+ core = $(topdir)/core
+--- a/mk/embedded.mk
 b/mk/embedded.mk
+@@ -51,6 +51,7 @@ GCCOPT+= $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
+ GCCOPT+= $(call gcc_ok,-falign-labels=0,-malign-labels=0)
+ GCCOPT+= $(call gcc_ok,-falign-loops=0,-malign-loops=0)
+ GCCOPT+= $(call gcc_ok,-fvisibility=hidden)
++GCCOPT+= $(call gcc_ok,-fcommon)
+ 
+ LIBGCC:= $(shell $(CC) $(GCCOPT) --print-libgcc)
+ 
+--- a/mk/lib.mk
 b/mk/lib.mk
+@@ -28,6 +28,7 @@ GCCOPT += $(call 
gcc_ok,-falign-functions=0,-malign-functions=0)
+ GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
+ GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
+ GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
++GCCOPT += $(call gcc_ok,-fcommon)
+ 
+ INCLUDE   = -I$(SRC)
+ STRIP = strip --strip-all -R .comment -R .note
+--- a/mk/efi.mk
 b/mk/efi.mk
+@@ -7,7 +7,7 @@ core = $(topdir)/core
+ # Set up architecture specifics; for cross compilation, set ARCH as apt
+ # gnuefi sets up architecture specifics in ia32 or x86_64 sub directories
+ # set up the LIBDIR and EFIINC for building for the appropriate architecture
+-GCCOPT := $(call gcc_ok,-fno-stack-protector,)
++GCCOPT := $(call gcc_ok,-fno-stack-protector,) $(call gcc_ok,-fcommon)
+ EFIINC = $(objdir)/include/efi
+ LIBDIR  = $(objdir)/lib
+ 

diff --git a/sys-boot/syslinux/syslinux-6.04_pre1-r1.ebuild 
b/sys-boot/syslinux/syslinux-6.04_pre1-r1.ebuild
new file mode 100644
index 000..194db71f6e5
--- /dev/null
+++ b/sys-boot/syslinux/syslinux-6.04_pre1-r1.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="SYSLINUX, PXELINUX, ISOLINUX, EXTLINUX and MEMDISK bootloaders"
+HOMEPAGE="https://www.syslinux.org/;
+# Final releases in 6.xx/$PV.tar.* (literal "xx")
+# Testing releases in Testing/$PV/$PV.tar.*
+SRC_URI_DIR=${PV:0:1}.xx
+SRC_URI_TESTING=Testing/${PV:0:4}
+[[ ${PV/_alpha} != $PV ]] && SRC_URI_DIR=$SRC_URI_TESTING
+[[ ${PV/_beta} != $PV ]] && SRC_URI_DIR=$SRC_URI_TESTING
+[[ ${PV/_pre} != $PV ]] && SRC_URI_DIR=$SRC_URI_TESTING
+[[ ${PV/_rc} != $PV ]] && SRC_URI_DIR=$SRC_URI_TESTING
+SRC_URI="https://www.kernel.org/pub/linux/utils/boot/syslinux/${SRC_URI_DIR}/${P/_/-}.tar.xz;
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="custom-cflags"
+
+RDEPEND="sys-fs/mtools
+   dev-perl/Crypt-PasswdMD5
+   dev-perl/Digest-SHA1"
+DEPEND="${RDEPEND}
+   dev-lang/nasm
+   >=sys-boot/gnu-efi-3.0u
+   virtual/os-headers"
+
+S=${WORKDIR}/${P/_/-}
+
+# This ebuild is a departure from the old way of rebuilding everything in 
syslinux
+# This departure is necessary since hpa doesn't support the rebuilding of 
anything other
+# than the installers.
+
+# These are executables which come precompiled and are run by the boot loader
+QA_PREBUILT="usr/share/${PN}/*.c32"
+
+# removed all the unpack/patching stuff since we aren't rebuilding the core 
stuff anymore
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-6.03-sysmacros.patch #579928
+   "${FILESDIR}"/${P}-singleloadsegment.patch #662678
+   

[gentoo-commits] repo/gentoo:master commit in: sys-boot/syslinux/, sys-boot/syslinux/files/

2019-11-06 Thread Michał Górny
commit: a1392fec2498c7ac20c7af05ce143f6a767ef6f0
Author: Michał Górny  gentoo  org>
AuthorDate: Thu Nov  7 07:18:11 2019 +
Commit: Michał Górny  gentoo  org>
CommitDate: Thu Nov  7 07:18:11 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1392fec

sys-boot/syslinux: Revert "Drop old (EAPI 0)"

Removed one version too many.

Reverts: c2bee80a1c812e65f094acd3861c6a00b279f56d
Signed-off-by: Michał Górny  gentoo.org>

 sys-boot/syslinux/Manifest|  2 +
 sys-boot/syslinux/files/syslinux-4.05-nopie.patch | 12 
 sys-boot/syslinux/syslinux-4.07.ebuild| 70 +++
 sys-boot/syslinux/syslinux-5.10.ebuild| 82 +++
 4 files changed, 166 insertions(+)

diff --git a/sys-boot/syslinux/Manifest b/sys-boot/syslinux/Manifest
index d67d42371b9..f247daa7748 100644
--- a/sys-boot/syslinux/Manifest
+++ b/sys-boot/syslinux/Manifest
@@ -1,2 +1,4 @@
+DIST syslinux-4.07.tar.bz2 5761877 BLAKE2B 
2fe28f268f896601a045564b1e3dde618d57ebf4098d007f7e45119ad019fa88221658608f88e55d4d09cd297140427cdeaf03a40a2341d732064a0630fe92b5
 SHA512 
8efbd14803ec74c5ee699a754b4727e4b975c08afd4dbb39f4b7ccdb90743e4459cd4609c6f1065c7b7efaa26c9d465806254891795d363758f35a2fe5704ae5
+DIST syslinux-5.10.tar.xz 5315660 BLAKE2B 
19d6861bb6220fe57e12d8d6118d37b197c3c771e4d2e7a51ce7db39219e3c837e6d1543d7a3927820f3a34da34ce849f9badbaf9cd83cb5ee24fd5ed7b705f2
 SHA512 
56422e14b4aa53ca1a5811da0582dbbb349aa52b9e78868bbedc24c67ef2420c4d0ac63fd68c7f0adc2c22606196276265d503b5b6f9d3d796d9ce42845bbdb5
 DIST syslinux-6.03.tar.xz 6855224 BLAKE2B 
9caccf8bed4e3c3e87393c9dc8f3b3d267c14469bbf8135a648ea41d8a43a4aedbf2b007c6b9a6853de8866152f5bc33e5ea85fca1db86c5f2fac88d97189b0f
 SHA512 
dd2b2916962b9e93bc1e714182e3ca2a727a229b8afabe913050bcfdd43ee2af51ee3acf79121d8c20caf434583efaa7f3196871e0e07c04d82191323a50fe31
 DIST syslinux-6.04-pre1.tar.xz 5283272 BLAKE2B 
800e5977ed13b26a1756c33d8625e850631b642e26a86e3328196ddd998596693c3a26db0ada4c0ba78a4ba692a1cc01886b6eb693d877ddafcfb325ecdeb639
 SHA512 
7927dd39be8e2dcf4138a6fea33def67d19d938379d694f15b48fdd2f5924c028b7a9e7bd71d0c7c6630c203e9e2a54296628e530632ad5e6f55b1ebefe8fc98

diff --git a/sys-boot/syslinux/files/syslinux-4.05-nopie.patch 
b/sys-boot/syslinux/files/syslinux-4.05-nopie.patch
new file mode 100644
index 000..b50b6b47689
--- /dev/null
+++ b/sys-boot/syslinux/files/syslinux-4.05-nopie.patch
@@ -0,0 +1,12 @@
+diff -ur a/mk/com32.mk b/mk/com32.mk
+--- a/mk/com32.mk  2011-12-09 19:28:17.0 +0100
 b/mk/com32.mk  2011-12-18 18:22:11.032342645 +0100
+@@ -24,6 +24,8 @@
+ GCCOPT += $(call gcc_ok,-freg-struct-return,)
+ GCCOPT += -mregparm=3 -DREGPARM=3 -march=i386 -Os
+ GCCOPT += $(call gcc_ok,-fPIE,-fPIC)
++GCCOPT += $(call gcc_ok,-nopie,)
++GCCOPT += $(call gcc_ok,-fno-pie,)
+ GCCOPT += $(call gcc_ok,-fno-exceptions,)
+ GCCOPT += $(call gcc_ok,-fno-asynchronous-unwind-tables,)
+ GCCOPT += $(call gcc_ok,-fno-strict-aliasing,)

diff --git a/sys-boot/syslinux/syslinux-4.07.ebuild 
b/sys-boot/syslinux/syslinux-4.07.ebuild
new file mode 100644
index 000..021f559c7eb
--- /dev/null
+++ b/sys-boot/syslinux/syslinux-4.07.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=0
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="SYSLINUX, PXELINUX, ISOLINUX, EXTLINUX and MEMDISK bootloaders"
+HOMEPAGE="https://syslinux.zytor.com/;
+SRC_URI="https://www.kernel.org/pub/linux/utils/boot/syslinux/${PV:0:1}.xx/${P/_/-}.tar.bz2;
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="custom-cflags"
+
+RDEPEND="sys-fs/mtools
+   dev-perl/Crypt-PasswdMD5
+   dev-perl/Digest-SHA1"
+DEPEND="${RDEPEND}
+   dev-lang/nasm
+   virtual/os-headers"
+
+S=${WORKDIR}/${P/_/-}
+
+# This ebuild is a departure from the old way of rebuilding everything in 
syslinux
+# This departure is necessary since hpa doesn't support the rebuilding of 
anything other
+# than the installers.
+
+# removed all the unpack/patching stuff since we aren't rebuilding the core 
stuff anymore
+
+src_unpack() {
+   unpack ${A}
+   cd "${S}"
+   # Fix building on hardened
+   epatch "${FILESDIR}"/${PN}-4.05-nopie.patch
+
+   rm -f gethostip #bug 137081
+
+   # Don't prestrip or override user LDFLAGS, bug #305783
+   local SYSLINUX_MAKEFILES="extlinux/Makefile linux/Makefile 
mtools/Makefile \
+   sample/Makefile utils/Makefile"
+   sed -i ${SYSLINUX_MAKEFILES} -e '/^LDFLAGS/d' || die "sed failed"
+
+   if use custom-cflags; then
+   sed -i ${SYSLINUX_MAKEFILES} \
+   -e 's|-g -Os||g' \
+   -e 's|-Os||g' \
+   -e 's|CFLAGS[[:space:]]\+=|CFLAGS +=|g' \
+   || die "sed custom-cflags failed"
+   else
+   QA_FLAGS_IGNORED="
+   

[gentoo-commits] repo/gentoo:master commit in: sys-boot/syslinux/, sys-boot/syslinux/files/

2019-06-03 Thread Andreas K. Hüttel
commit: b25008c3b1291af6a15317313ba0184c75536685
Author: Andreas K. Hüttel  gentoo  org>
AuthorDate: Tue Jun  4 05:22:21 2019 +
Commit: Andreas K. Hüttel  gentoo  org>
CommitDate: Tue Jun  4 05:22:21 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b25008c3

sys-boot/syslinux: remove old

Package-Manager: Portage-2.3.67, Repoman-2.3.13
Signed-off-by: Andreas K. Hüttel  gentoo.org>

 sys-boot/syslinux/Manifest|  2 -
 sys-boot/syslinux/files/syslinux-3.86-nopie.patch | 12 
 sys-boot/syslinux/syslinux-3.86.ebuild| 57 --
 sys-boot/syslinux/syslinux-4.07.ebuild| 70 ---
 4 files changed, 141 deletions(-)

diff --git a/sys-boot/syslinux/Manifest b/sys-boot/syslinux/Manifest
index 075dffab8f0..b9ab5dc8f24 100644
--- a/sys-boot/syslinux/Manifest
+++ b/sys-boot/syslinux/Manifest
@@ -1,5 +1,3 @@
-DIST syslinux-3.86.tar.bz2 3735823 BLAKE2B 
b5c03462183bc1be37d82c4995da2911e5c70d08eefb9f01c731e1d77e2df9c1ac29fcea6f58a94bc67094af8e415993783929979209a74826e773e9c35ba803
 SHA512 
6231f233e5f5ac26aa7e4bfd2704e2a4081350a3f3f21b5ec88a13cf992528c2796dbdfdf6cc2cc7a9543828650ae46de3685e5e55fac3a6ad520430220d1073
-DIST syslinux-4.07.tar.bz2 5761877 BLAKE2B 
2fe28f268f896601a045564b1e3dde618d57ebf4098d007f7e45119ad019fa88221658608f88e55d4d09cd297140427cdeaf03a40a2341d732064a0630fe92b5
 SHA512 
8efbd14803ec74c5ee699a754b4727e4b975c08afd4dbb39f4b7ccdb90743e4459cd4609c6f1065c7b7efaa26c9d465806254891795d363758f35a2fe5704ae5
 DIST syslinux-5.10.tar.xz 5315660 BLAKE2B 
19d6861bb6220fe57e12d8d6118d37b197c3c771e4d2e7a51ce7db39219e3c837e6d1543d7a3927820f3a34da34ce849f9badbaf9cd83cb5ee24fd5ed7b705f2
 SHA512 
56422e14b4aa53ca1a5811da0582dbbb349aa52b9e78868bbedc24c67ef2420c4d0ac63fd68c7f0adc2c22606196276265d503b5b6f9d3d796d9ce42845bbdb5
 DIST syslinux-6.03.tar.xz 6855224 BLAKE2B 
9caccf8bed4e3c3e87393c9dc8f3b3d267c14469bbf8135a648ea41d8a43a4aedbf2b007c6b9a6853de8866152f5bc33e5ea85fca1db86c5f2fac88d97189b0f
 SHA512 
dd2b2916962b9e93bc1e714182e3ca2a727a229b8afabe913050bcfdd43ee2af51ee3acf79121d8c20caf434583efaa7f3196871e0e07c04d82191323a50fe31
 DIST syslinux-6.04-pre1.tar.xz 5283272 BLAKE2B 
800e5977ed13b26a1756c33d8625e850631b642e26a86e3328196ddd998596693c3a26db0ada4c0ba78a4ba692a1cc01886b6eb693d877ddafcfb325ecdeb639
 SHA512 
7927dd39be8e2dcf4138a6fea33def67d19d938379d694f15b48fdd2f5924c028b7a9e7bd71d0c7c6630c203e9e2a54296628e530632ad5e6f55b1ebefe8fc98

diff --git a/sys-boot/syslinux/files/syslinux-3.86-nopie.patch 
b/sys-boot/syslinux/files/syslinux-3.86-nopie.patch
deleted file mode 100644
index efe939e43d3..000
--- a/sys-boot/syslinux/files/syslinux-3.86-nopie.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur a/com32/MCONFIG b/com32/MCONFIG
 a/com32/MCONFIG2010-03-31 18:24:25.0 +0200
-+++ b/com32/MCONFIG2010-04-05 00:03:55.612973516 +0200
-@@ -20,6 +20,8 @@
- GCCOPT  := $(call gcc_ok,-std=gnu99,) 
\
-$(call gcc_ok,-m32,)   \
-$(call gcc_ok,-fno-stack-protector,)   \
-+   $(call gcc_ok,-nopie,) \
-+   $(call gcc_ok,-fno-pie,)   \
-$(call gcc_ok,-falign-functions=0,-malign-functions=0) \
-$(call gcc_ok,-falign-jumps=0,-malign-jumps=0) \
-$(call gcc_ok,-falign-loops=0,-malign-loops=0) \

diff --git a/sys-boot/syslinux/syslinux-3.86.ebuild 
b/sys-boot/syslinux/syslinux-3.86.ebuild
deleted file mode 100644
index a6f387689ac..000
--- a/sys-boot/syslinux/syslinux-3.86.ebuild
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=0
-
-inherit eutils toolchain-funcs
-
-DESCRIPTION="SysLinux, IsoLinux and PXELinux bootloader"
-HOMEPAGE="https://syslinux.zytor.com/;
-SRC_URI="mirror://kernel/linux/utils/boot/syslinux/${PV:0:1}.xx/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="-* amd64 x86"
-IUSE="custom-cflags"
-
-RDEPEND="sys-fs/mtools
-   dev-perl/Crypt-PasswdMD5
-   dev-perl/Digest-SHA1"
-DEPEND="${RDEPEND}
-   dev-lang/nasm"
-
-# This ebuild is a departure from the old way of rebuilding everything in 
syslinux
-# This departure is necessary since hpa doesn't support the rebuilding of 
anything other
-# than the installers.
-
-# removed all the unpack/patching stuff since we aren't rebuilding the core 
stuff anymore
-
-src_unpack() {
-   unpack ${A}
-   cd "${S}"
-   epatch "${FILESDIR}"/${PN}-3.86-nopie.patch
-
-   rm -f gethostip #bug 137081
-
-   local SYSLINUX_MAKEFILES="extlinux/Makefile linux/Makefile 
mtools/Makefile \
-   sample/Makefile utils/Makefile"
-   sed -i ${SYSLINUX_MAKEFILES} -e '/^LDFLAGS/d' || die "sed failed"
-
-   if use custom-cflags; 

[gentoo-commits] repo/gentoo:master commit in: sys-boot/syslinux/, sys-boot/syslinux/files/

2016-04-19 Thread Mike Frysinger
commit: 19ae69e682d94b2317057e4751e4b78555868362
Author: Mike Frysinger  gentoo  org>
AuthorDate: Tue Apr 19 06:03:08 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Tue Apr 19 06:03:15 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19ae69e6

sys-boot/syslinux: fix building w/newer glibc #579928

 .../syslinux/files/syslinux-6.03-sysmacros.patch   | 34 ++
 sys-boot/syslinux/syslinux-6.03.ebuild |  2 ++
 2 files changed, 36 insertions(+)

diff --git a/sys-boot/syslinux/files/syslinux-6.03-sysmacros.patch 
b/sys-boot/syslinux/files/syslinux-6.03-sysmacros.patch
new file mode 100644
index 000..af464fe
--- /dev/null
+++ b/sys-boot/syslinux/files/syslinux-6.03-sysmacros.patch
@@ -0,0 +1,34 @@
+https://bugs.gentoo.org/579928
+
+From d84db34dbe39d55b4d7e868764c056689aa0793b Mon Sep 17 00:00:00 2001
+From: Mike Frysinger 
+Date: Tue, 19 Apr 2016 01:56:41 -0400
+Subject: [PATCH] extlinux: pull in sys/sysmacros.h for major/minor/makedev
+
+These functions are defined in sys/sysmacros.h, so add the include to
+main.c.  This is already handled correctly in mountinfo.c.  Otherwise
+we get build failures like:
+
+main.o: In function 'find_device_sysfs':
+extlinux/main.c:1131: undefined reference to 'minor'
+
+Signed-off-by: Mike Frysinger 
+---
+ extlinux/main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/extlinux/main.c b/extlinux/main.c
+index a7ebd49..ebff7ea 100644
+--- a/extlinux/main.c
 b/extlinux/main.c
+@@ -38,6 +38,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
+-- 
+2.7.4
+

diff --git a/sys-boot/syslinux/syslinux-6.03.ebuild 
b/sys-boot/syslinux/syslinux-6.03.ebuild
index 503baae..25ec57b 100644
--- a/sys-boot/syslinux/syslinux-6.03.ebuild
+++ b/sys-boot/syslinux/syslinux-6.03.ebuild
@@ -45,6 +45,8 @@ QA_PREBUILT="usr/share/${PN}/*.c32"
 src_prepare() {
rm -f gethostip #bug 137081
 
+   epatch "${FILESDIR}"/${PN}-6.03-sysmacros.patch #579928
+
# Don't prestrip or override user LDFLAGS, bug #305783
local SYSLINUX_MAKEFILES="extlinux/Makefile linux/Makefile 
mtools/Makefile \
sample/Makefile utils/Makefile"