]> git.armaanb.net Git - asd-repo.git/commitdiff
syslinux: new package at 6.04
authorArmaan Bhojwani <me@armaanb.net>
Mon, 28 Jun 2021 22:59:12 +0000 (18:59 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Tue, 29 Jun 2021 03:04:12 +0000 (23:04 -0400)
syslinux/build [new file with mode: 0755]
syslinux/checksums [new file with mode: 0644]
syslinux/depends [new file with mode: 0644]
syslinux/patches/0018-prevent-pow-optimization.patch [new file with mode: 0644]
syslinux/patches/fcommon.patch [new file with mode: 0644]
syslinux/sources [new file with mode: 0644]
syslinux/version [new file with mode: 0644]

diff --git a/syslinux/build b/syslinux/build
new file mode 100755 (executable)
index 0000000..1b3e497
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+
+for file in *.patch; do
+    patch -p1 < "$file"
+done
+
+# Fix missing <sys/sysmacros.h> include.
+sed -i 's@vfs.h>@vfs.h>\n#include <sys/sysmacros.h>@' extlinux/main.c
+
+# Disable debugging and development "stuff".
+: > mk/devel.mk
+
+make -j1 \
+    PYTHON=python \
+    bios efi64 installer
+
+make -j1 \
+    INSTALLROOT="$1" \
+    MANDIR=/usr/share/man \
+    SBINDIR=/usr/bin \
+    AUXDIR=/usr/lib/syslinux \
+    bios efi64 install
diff --git a/syslinux/checksums b/syslinux/checksums
new file mode 100644 (file)
index 0000000..861b89a
--- /dev/null
@@ -0,0 +1,3 @@
+3f6d50a57f3ed47d8234fd0ab4492634eb7c9aaf7dd902f33d3ac33564fd631d
+a4d9e4847a84c663a5c3425ceb1dcddf2328a8e763be21d43ed5cd72760a8aef
+755cd7062fe8495f6f62053ce664451c12ae65dba9fb5c75062a495fbe040fb1
diff --git a/syslinux/depends b/syslinux/depends
new file mode 100644 (file)
index 0000000..1d83681
--- /dev/null
@@ -0,0 +1,4 @@
+libuuid
+nasm     make
+perl     make
+python   make
diff --git a/syslinux/patches/0018-prevent-pow-optimization.patch b/syslinux/patches/0018-prevent-pow-optimization.patch
new file mode 100644 (file)
index 0000000..0c42c7b
--- /dev/null
@@ -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/syslinux/patches/fcommon.patch b/syslinux/patches/fcommon.patch
new file mode 100644 (file)
index 0000000..0df3dc0
--- /dev/null
@@ -0,0 +1,50 @@
+--- 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/syslinux/sources b/syslinux/sources
new file mode 100644 (file)
index 0000000..8988a99
--- /dev/null
@@ -0,0 +1,3 @@
+https://mirrors.edge.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.04/syslinux-6.04-pre1.tar.xz
+patches/fcommon.patch
+patches/0018-prevent-pow-optimization.patch
diff --git a/syslinux/version b/syslinux/version
new file mode 100644 (file)
index 0000000..15f18f1
--- /dev/null
@@ -0,0 +1 @@
+6.04 1