summaryrefslogtreecommitdiff
path: root/libre/syslinux
diff options
context:
space:
mode:
Diffstat (limited to 'libre/syslinux')
-rw-r--r--libre/syslinux/0002-gfxboot-menu-label.patch53
-rw-r--r--libre/syslinux/0004-gnu-efi-from-arch.patch36
-rw-r--r--libre/syslinux/0005-gnu-efi-version-compatibility.patch25
-rw-r--r--libre/syslinux/0016-strip-gnu-property.patch43
-rw-r--r--libre/syslinux/0017-single-load-segment.patch (renamed from libre/syslinux/single-load-segment.patch)18
-rw-r--r--libre/syslinux/0018-prevent-pow-optimization.patch36
-rw-r--r--libre/syslinux/PKGBUILD46
-rw-r--r--libre/syslinux/strip_note_section.patch29
8 files changed, 230 insertions, 56 deletions
diff --git a/libre/syslinux/0002-gfxboot-menu-label.patch b/libre/syslinux/0002-gfxboot-menu-label.patch
new file mode 100644
index 000000000..0666a8832
--- /dev/null
+++ b/libre/syslinux/0002-gfxboot-menu-label.patch
@@ -0,0 +1,53 @@
+From: Colin Watson <cjwatson@ubuntu.com>
+Date: Wed, 2 Nov 2011 07:57:23 +0100
+Subject: Allow boot entry to start with label instead of menu_label.
+
+menu_ptr->menu_label is human-readable (perhaps even translatable!) text if
+the MENU LABEL command is used, which isn't very convenient at the start of
+a boot entry. Allow the entry to start with menu_ptr->label (an
+identifier) as an alternative.
+---
+ com32/gfxboot/gfxboot.c | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/com32/gfxboot/gfxboot.c b/com32/gfxboot/gfxboot.c
+index f67132c..4c76a35 100644
+--- a/com32/gfxboot/gfxboot.c
++++ b/com32/gfxboot/gfxboot.c
+@@ -818,7 +818,7 @@ void boot(int index)
+ {
+ char *arg, *alt_kernel;
+ menu_t *menu_ptr;
+- int i, label_len;
++ int i, label_len, menu_label_len;
+ unsigned ipapp;
+ const struct syslinux_ipappend_strings *ipappend;
+ char *gfxboot_cwd = (char *) gfx_config.gfxboot_cwd;
+@@ -836,18 +836,22 @@ void boot(int index)
+ if(!menu_ptr || !menu_ptr->menu_label) return;
+
+ arg = skipspace(cmdline);
+- label_len = strlen(menu_ptr->menu_label);
++ label_len = strlen(menu_ptr->label);
++ menu_label_len = strlen(menu_ptr->menu_label);
+
+ // if it does not start with label string, assume first word is kernel name
+- if(strncmp(arg, menu_ptr->menu_label, label_len)) {
++ if(!strncmp(arg, menu_ptr->label, label_len)) {
++ arg += label_len;
++ }
++ else if(!strncmp(arg, menu_ptr->menu_label, menu_label_len)) {
++ arg += menu_label_len;
++ }
++ else {
+ alt_kernel = arg;
+ arg = skip_nonspaces(arg);
+ if(*arg) *arg++ = 0;
+ if(*alt_kernel) menu_ptr->alt_kernel = alt_kernel;
+ }
+- else {
+- arg += label_len;
+- }
+
+ arg = skipspace(arg);
+
diff --git a/libre/syslinux/0004-gnu-efi-from-arch.patch b/libre/syslinux/0004-gnu-efi-from-arch.patch
new file mode 100644
index 000000000..597e48489
--- /dev/null
+++ b/libre/syslinux/0004-gnu-efi-from-arch.patch
@@ -0,0 +1,36 @@
+From: Lukas Schwaighofer <lukas@schwaighofer.name>
+Date: Tue, 3 Oct 2017 18:29:13 +0200
+Subject: Link against gnu-efi from Debian
+
+Adjust EFIINC, LIBDIR and LIBEFI variables in mk/efi.mk to point to the
+files installed by Arch's gnu-efi package.
+
+Forwarded: not-needed
+---
+ mk/efi.mk | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/mk/efi.mk b/mk/efi.mk
+index f097ad2..dc2b708 100644
+--- a/mk/efi.mk
++++ b/mk/efi.mk
+@@ -8,8 +8,8 @@ core = $(topdir)/core
+ # 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,)
+-EFIINC = $(objdir)/include/efi
+-LIBDIR = $(objdir)/lib
++EFIINC = /usr/include/efi
++LIBDIR = /usr/lib
+
+ ifeq ($(ARCH),i386)
+ ARCHOPT = -m32 -march=i386
+@@ -44,7 +51,7 @@ SFLAGS = $(GCCOPT) $(GCCWARN) $(ARCHOPT) \
+ -nostdinc -iwithprefix include \
+ -I$(com32)/libutil/include -I$(com32)/include -I$(com32)/include/sys $(GPLINCLUDE)
+
+-LIBEFI = $(objdir)/lib/libefi.a
++LIBEFI = $(LIBDIR)/libefi.a
+
+ $(LIBEFI):
+ @echo Building gnu-efi for $(EFI_SUBARCH)
diff --git a/libre/syslinux/0005-gnu-efi-version-compatibility.patch b/libre/syslinux/0005-gnu-efi-version-compatibility.patch
new file mode 100644
index 000000000..f50ad006d
--- /dev/null
+++ b/libre/syslinux/0005-gnu-efi-version-compatibility.patch
@@ -0,0 +1,25 @@
+From: Lukas Schwaighofer <lukas@schwaighofer.name>
+Date: Mon, 3 Dec 2018 22:45:44 +0100
+Subject: Fix compatibility with new gnu-efi version
+
+Allow multiple definitions when linking the syslinux binary so the
+memset and memcpy symbols which are included by gnu-efi since 3.0.8 are
+ignored (we still use the definitions from syslinux) but linking
+succeeds.
+---
+ efi/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/efi/Makefile b/efi/Makefile
+index f4501e7..0d1a673 100644
+--- a/efi/Makefile
++++ b/efi/Makefile
+@@ -71,7 +71,7 @@ $(OBJS): | $(OBJ)/$(ARCH)
+ BTARGET = syslinux.efi
+
+ syslinux.so: $(OBJS) $(CORE_OBJS) $(LIB_OBJS)
+- $(LD) $(LDFLAGS) --strip-debug -o $@ $^ -lgnuefi -lefi
++ $(LD) $(LDFLAGS) -zmuldefs --strip-debug -o $@ $^ -lgnuefi -lefi
+
+ # We need to rename the .hash section because the EFI firmware
+ # linker really doesn't like it.
diff --git a/libre/syslinux/0016-strip-gnu-property.patch b/libre/syslinux/0016-strip-gnu-property.patch
new file mode 100644
index 000000000..69656f92a
--- /dev/null
+++ b/libre/syslinux/0016-strip-gnu-property.patch
@@ -0,0 +1,43 @@
+From: Lukas Schwaighofer <lukas@schwaighofer.name>
+Date: Sat, 18 Aug 2018 12:48:21 +0200
+Subject: 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 d14ba80..6d48990 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 ae27d49..5b46db6 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)
++ }
+ }
diff --git a/libre/syslinux/single-load-segment.patch b/libre/syslinux/0017-single-load-segment.patch
index db9b7d0a1..7fd53b160 100644
--- a/libre/syslinux/single-load-segment.patch
+++ b/libre/syslinux/0017-single-load-segment.patch
@@ -1,17 +1,19 @@
-Author: Lukas Schwaighofer <lukas@schwaighofer.name>
-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
+From: Lukas Schwaighofer <lukas@schwaighofer.name>
+Date: Sat, 18 Aug 2018 16:56:35 +0200
+Subject: 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
+index bab3fc7..19c1647 100644
--- a/efi/i386/syslinux.ld
+++ b/efi/i386/syslinux.ld
@@ -19,6 +19,11 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
@@ -157,7 +159,7 @@ index bab3fc7..5b4589d 100644
_end = .;
diff --git a/efi/x86_64/syslinux.ld b/efi/x86_64/syslinux.ld
-index 450641c..cad28a8 100644
+index 450641c..a2c124f 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")
diff --git a/libre/syslinux/0018-prevent-pow-optimization.patch b/libre/syslinux/0018-prevent-pow-optimization.patch
new file mode 100644
index 000000000..0c42c7bbb
--- /dev/null
+++ b/libre/syslinux/0018-prevent-pow-optimization.patch
@@ -0,0 +1,36 @@
+From: Lukas Schwaighofer <lukas@schwaighofer.name>
+Date: Tue, 26 Feb 2019 23:13:58 +0100
+Subject: Prevent optimizing the pow() function
+
+With the current GCC 8.2.0 from Debian, a section of code calling pow() in
+zzjson_parse.c is turned into a sequence calling exp(). Since no exp()
+implementation is available in syslinux those optimizations need to be
+disabled.
+---
+ com32/gpllib/zzjson/zzjson_parse.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/com32/gpllib/zzjson/zzjson_parse.c b/com32/gpllib/zzjson/zzjson_parse.c
+index ecb6f61..e66a9d8 100644
+--- a/com32/gpllib/zzjson/zzjson_parse.c
++++ b/com32/gpllib/zzjson/zzjson_parse.c
+@@ -138,6 +138,10 @@ static ZZJSON *parse_string2(ZZJSON_CONFIG *config) {
+ return zzjson;
+ }
+
++static double __attribute__((optimize("O0"))) pow_noopt(double x, double y) {
++ return pow(x, y);
++}
++
+ static ZZJSON *parse_number(ZZJSON_CONFIG *config) {
+ ZZJSON *zzjson;
+ unsigned long long ival = 0, expo = 0;
+@@ -213,7 +217,7 @@ skipexpo:
+ if (dbl) {
+ dval = sign * (long long) ival;
+ dval += sign * frac;
+- dval *= pow(10.0, (double) signexpo * expo);
++ dval *= pow_noopt(10.0, (double) signexpo * expo);
+ }
+
+ zzjson = config->calloc(1, sizeof(ZZJSON));
diff --git a/libre/syslinux/PKGBUILD b/libre/syslinux/PKGBUILD
index 1549ffb22..6377d9864 100644
--- a/libre/syslinux/PKGBUILD
+++ b/libre/syslinux/PKGBUILD
@@ -6,9 +6,9 @@
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
pkgname=syslinux
-pkgver=6.04.pre1.r41.g5e426532
+pkgver=6.04.pre2.r11.gbf6db5b4
#_tag=syslinux-$pkgver
-_commit=5e426532210bb830d2d7426eb8d8c154d9dfcba6
+_commit=bf6db5b4
pkgrel=1
pkgrel+=.par1
pkgdesc='Collection of boot loaders that boot from FAT, ext2/3/4 and btrfs filesystems, from CDs and via PXE (Parabola rebranded)'
@@ -39,23 +39,35 @@ source=(git+https://repo.or.cz/syslinux.git#commit=$_commit
gnu-efi::git://git.code.sf.net/p/gnu-efi/code
syslinux.cfg
syslinux-install_update
- strip_note_section.patch
- single-load-segment.patch
+ 0002-gfxboot-menu-label.patch
+ 0005-gnu-efi-version-compatibility.patch
+ 0017-single-load-segment.patch
+ 0004-gnu-efi-from-arch.patch
+ 0016-strip-gnu-property.patch
+ 0018-prevent-pow-optimization.patch
splash.png)
sha1sums=('SKIP'
'SKIP'
'e40acf4cf9d05ec000c59284f959d1540b35a3be'
'df5160a138ca8c6502d67fe1a64fec78b50e82c2'
- '11d928087764ca286af0327d40230f219348568c'
- '830c88005fb6c9e759f67b91ab33a10b002385de'
+ '69239fda4a3d5a247f0e48c5c683e0124c7d9201'
+ '1e0cd52252622f206d22e84f2a4d358508c902f4'
+ '81d05572b15dc5c55b63489fecdc79a6a332959c'
+ '4c3706e7a5620e450a6abb9238c08d7b39bb6945'
+ 'f4a6768c7e5b8d02428ae550e37a7ca445ad1bb8'
+ 'c94622eaa14ad9512e4f43b13302ba35d1787cbc'
'aab1c7789e0d7290fe87538abad181abac069d40')
sha256sums=('SKIP'
'SKIP'
'67fe3050e60a0d1572293ff095dac2e6cab9da6d0f98fb1fc555850ec046d6ea'
'5f86b5813465c48ba7bd178389aacb5149ff0b5f2467ab1772a4f862c5b15d41'
- '80d783fad7f96077a17634a6b17d8b7750a443221584aa802c096434bdaed603'
- '0ba5667654ecd5b94c1941c7dce7ce945059b1fa70467f6f5a8770a959fcf82b'
+ 'd1fe9084ce2526619f94b8a07b89fb0194e874beef9f202f8b974879d77f2e1a'
+ '8610959df6c01568ff478ca1eb4aac301f3ba1f5bd4739daaec072865e8be2d7'
+ '5b017ba5eae77caa09fa5af6ecfa0df1e7e22776b2b13c8744c6cb7ecd7ad0e9'
+ 'cf3c3da9300d6ea70eab5b8dca724ce03a3651bd63fb0168594dcfeb35eec11c'
+ '7facb5c2abc71c9bfe01bf4db388306ed7b7abf6654009af336262839527f962'
+ '755cd7062fe8495f6f62053ce664451c12ae65dba9fb5c75062a495fbe040fb1'
'a839e3e1242c5279f95f5f913af47be73cf16339c7aa55af378a428c904f1595')
_targets='bios efi32'
@@ -71,11 +83,14 @@ pkgver() {
prepare() {
cd syslinux
- # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906414
- patch -p1 < ../strip_note_section.patch
+ patch -p1 < ../0002-gfxboot-menu-label.patch
+ patch -p1 < ../0017-single-load-segment.patch
+ patch -p1 < ../0016-strip-gnu-property.patch
+ patch -p1 < ../0018-prevent-pow-optimization.patch
- # https://bugs.archlinux.org/task/61059
- patch -p1 < ../single-load-segment.patch
+ # TODO: use 'gnu-efi-libs' package instead of embedded sources
+ # patch -p1 < ../0004-gnu-efi-from-arch.patch
+ # patch -p1 < ../0005-gnu-efi-version-compatibility.patch
# do not swallow efi compilation output to make debugging easier
sed 's|> /dev/null 2>&1||' -i efi/check-gnu-efi.sh
@@ -95,13 +110,6 @@ build() {
make PYTHON=python2 $_targets
}
-check() {
- cd syslinux
- # tests fail to compile
- # make unittest
- true
-}
-
package() {
cd syslinux
make $_targets install INSTALLROOT="$pkgdir" SBINDIR=/usr/bin MANDIR=/usr/share/man AUXDIR=/usr/lib/syslinux
diff --git a/libre/syslinux/strip_note_section.patch b/libre/syslinux/strip_note_section.patch
deleted file mode 100644
index b71b69d07..000000000
--- a/libre/syslinux/strip_note_section.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Author: Lukas Schwaighofer <lukas@schwaighofer.name>
-Description: 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.
----
- mbr/i386/mbr.ld | 1 +
- mbr/x86_64/mbr.ld | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/mbr/i386/mbr.ld b/mbr/i386/mbr.ld
-index d14ba80..5368346 100644
---- a/mbr/i386/mbr.ld
-+++ b/mbr/i386/mbr.ld
-@@ -70,4 +70,5 @@ SECTIONS
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- /DISCARD/ : { *(.note.GNU-stack) }
-+ /DISCARD/ : { *(.note.gnu.property) }
- }
-diff --git a/mbr/x86_64/mbr.ld b/mbr/x86_64/mbr.ld
-index ae27d49..b8c0d89 100644
---- a/mbr/x86_64/mbr.ld
-+++ b/mbr/x86_64/mbr.ld
-@@ -69,4 +69,5 @@ SECTIONS
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- /DISCARD/ : { *(.note.GNU-stack) }
-+ /DISCARD/ : { *(.note.gnu.property) }
- }