sys-boot/syslinux: tweak binutils patch to support <2.39

This makes the upgrade path a bit easier and the option just suppresses
a warning, not an error.

Bug: https://bugs.gentoo.org/913129
Closes: https://bugs.gentoo.org/915663
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James 2023-10-18 11:12:08 +01:00
parent 83de7565f4
commit e0f0e1c28a
No known key found for this signature in database
GPG Key ID: 738409F520DF9190

View File

@ -6,7 +6,7 @@ https://bugs.gentoo.org/913129
-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
+LDFLAGS += -nostdlib --warn-common --no-undefined --fatal-warnings -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)))
@ -14,7 +14,7 @@ https://bugs.gentoo.org/913129
endif
-LDFLAGS += -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
+LDFLAGS += -shared --no-warn-rwx-segments -z notext -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
+LDFLAGS += -shared -z notext -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
LOADLIBES += -lefi -lgnuefi
LOADLIBES += $(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
@ -25,7 +25,7 @@ https://bugs.gentoo.org/913129
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)
+LDFLAGS = -m elf_$(ARCH) -shared -z notext --hash-style=gnu -T $(COM32LD)
LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc)
LNXCFLAGS = -I$(com32)/libutil/include $(GCCWARN) -O -g \
@ -36,7 +36,7 @@ https://bugs.gentoo.org/913129
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
+ -L$(LIBDIR) -z notext --hash-style=gnu -m elf_$(ARCH) $(CRT0) -E
SFLAGS = $(GCCOPT) $(GCCWARN) $(ARCHOPT) \
-fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
@ -47,7 +47,7 @@ https://bugs.gentoo.org/913129
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
+LDFLAGS = -m elf_$(ARCH) -shared -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
@ -58,7 +58,7 @@ https://bugs.gentoo.org/913129
$(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
+LDFLAGS = -m elf_$(ARCH) -z notext --hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld
.SUFFIXES: .c .o .a .so .lo .i .S .s .ls .ss .lss
@ -68,7 +68,7 @@ https://bugs.gentoo.org/913129
%.elf: %.o $(LIBDEP) $(LDSCRIPT) $(AUXLIBS)
$(LD) $(LDFLAGS) -pie -Bsymbolic \
-T $(LDSCRIPT) \
+ --no-warn-rwx-segments -z notext \
+ -z notext \
--unresolved-symbols=report-all \
-E --hash-style=gnu -M -o $@ $< \
--start-group $(LIBS) $(subst $(*F).elf,lib$(*F).a,$@) --end-group \