From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/syslinux/, sys-boot/syslinux/files/
Date: Mon, 28 Aug 2023 19:10:10 +0000 (UTC) [thread overview]
Message-ID: <1693249791.aad4c7d1977e6bf97a8d17c445ff6a7a4f9e806c.sam@gentoo> (raw)
commit: aad4c7d1977e6bf97a8d17c445ff6a7a4f9e806c
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 28 18:18:47 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 28 19:09:51 2023 +0000
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 <sam <AT> 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 000000000000..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
--- a/sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild
+++ b/sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild
@@ -49,6 +49,7 @@ src_prepare() {
local PATCHES=(
"${FILESDIR}/6.04_pre1"
"${FILESDIR}/6.04_pre3"
+ "${FILESDIR}/syslinux-6.04-binutils-2.41.patch"
)
default
}
next reply other threads:[~2023-08-28 19:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 19:10 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-12-25 23:54 [gentoo-commits] repo/gentoo:master commit in: sys-boot/syslinux/, sys-boot/syslinux/files/ Mike Gilbert
2020-04-06 22:49 Sergei Trofimovich
2019-11-07 7:19 Michał Górny
2019-06-04 5:27 Andreas K. Hüttel
2016-04-19 6:03 Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1693249791.aad4c7d1977e6bf97a8d17c445ff6a7a4f9e806c.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox