commit af1b46dbe59c2fce6ecfde708ae94ee0780bb894 Author: Marcin Krol <h...@tld-linux.org> Date: Thu Apr 25 20:07:56 2024 +0200
- added gcc >= 10 fix from Debian 0005-gnu-efi-version-compatibility.patch | 13 ++--- 0019-gcc-10-compatibility.patch | 95 ++++++++++++++++++++++++++++++++ syslinux.spec | 4 +- 3 files changed, 104 insertions(+), 8 deletions(-) --- diff --git a/syslinux.spec b/syslinux.spec index 04b976f..0399b27 100644 --- a/syslinux.spec +++ b/syslinux.spec @@ -16,7 +16,7 @@ Summary(pt_BR.UTF-8): Carregador de boot simples Summary(zh_CN.UTF-8): Linux操作系统的启动管理器 Name: syslinux Version: 6.04 -Release: 2 +Release: 3 License: GPL v2+ Group: Applications/System # Source0: https://www.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{version}.tar.xz @@ -30,6 +30,7 @@ Patch10: 0005-gnu-efi-version-compatibility.patch Patch11: 0016-strip-gnu-property.patch Patch12: 0017-single-load-segment.patch Patch13: 0018-prevent-pow-optimization.patch +Patch14: 0019-gcc-10-compatibility.patch URL: http://syslinux.zytor.com/ BuildRequires: gnu-efi >= 3.0u BuildRequires: libuuid-devel @@ -107,6 +108,7 @@ jeśli chcemy tworzyć lub kompilować własnych klientów syslinuksa. %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 %{__sed} -i 's/-march=i386//' sample/Makefile diff --git a/0005-gnu-efi-version-compatibility.patch b/0005-gnu-efi-version-compatibility.patch index fda0937..aa4c319 100644 --- a/0005-gnu-efi-version-compatibility.patch +++ b/0005-gnu-efi-version-compatibility.patch @@ -9,11 +9,10 @@ present. efi/Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -diff --git a/efi/Makefile b/efi/Makefile -index f4501e7..adae73f 100644 ---- a/efi/Makefile -+++ b/efi/Makefile -@@ -43,8 +43,10 @@ CORE_OBJS += $(addprefix $(OBJ)/../core/, \ +diff -urNp -x '*.orig' syslinux-6.04-pre1.org/efi/Makefile syslinux-6.04-pre1/efi/Makefile +--- syslinux-6.04-pre1.org/efi/Makefile 2016-03-02 06:06:02.000000000 +0100 ++++ syslinux-6.04-pre1/efi/Makefile 2024-04-25 20:04:18.449147821 +0200 +@@ -41,8 +41,10 @@ CORE_OBJS += $(addprefix $(OBJ)/../core/ fs/pxe/pxe.o fs/pxe/tftp.o fs/pxe/urlparse.o fs/pxe/dhcp_option.o \ fs/pxe/ftp.o fs/pxe/ftp_readdir.o fs/pxe/http.o fs/pxe/http_readdir.o) @@ -23,9 +22,9 @@ index f4501e7..adae73f 100644 - $(LIBEFI) + $(LIBEFI_STRIPPED) - CSRC = $(sort $(wildcard $(SRC)/*.c)) + CSRC = $(wildcard $(SRC)/*.c) OBJS = $(subst $(SRC)/,,$(filter-out %wrapper.o, $(patsubst %.c,%.o,$(CSRC)))) -@@ -73,6 +75,13 @@ BTARGET = syslinux.efi +@@ -71,6 +73,13 @@ BTARGET = syslinux.efi syslinux.so: $(OBJS) $(CORE_OBJS) $(LIB_OBJS) $(LD) $(LDFLAGS) --strip-debug -o $@ $^ -lgnuefi -lefi diff --git a/0019-gcc-10-compatibility.patch b/0019-gcc-10-compatibility.patch new file mode 100644 index 0000000..105a88b --- /dev/null +++ b/0019-gcc-10-compatibility.patch @@ -0,0 +1,95 @@ +From: Lukas Schwaighofer <lu...@schwaighofer.name> +Date: Sun, 16 Aug 2020 15:23:21 +0200 +Subject: 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 f648de2..c4649f5 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 dc2b708..f1399e5 100644 +--- a/mk/efi.mk ++++ b/mk/efi.mk +@@ -32,6 +32,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 b46dbd0..dc265ce 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 488dc0f..fae13e2 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 f3fb07c..2ffea2d 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 ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/syslinux.git/commitdiff/af1b46dbe59c2fce6ecfde708ae94ee0780bb894 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit