diff options
Diffstat (limited to 'meta/recipes-devtools/syslinux')
4 files changed, 125 insertions, 6 deletions
diff --git a/meta/recipes-devtools/syslinux/syslinux/0010-gcc46-compatibility.patch b/meta/recipes-devtools/syslinux/syslinux/0010-gcc46-compatibility.patch new file mode 100644 index 0000000000..6279258c2e --- /dev/null +++ b/meta/recipes-devtools/syslinux/syslinux/0010-gcc46-compatibility.patch @@ -0,0 +1,37 @@ +don't break with old compilers and -DGNU_EFI_USE_MS_ABI +It's entirely legitimate to request GNU_EFI_USE_MS_ABI even if the current +compiler doesn't support it, and gnu-efi should transparently fall back to +using legacy techniques to set the calling convention. We don't get type +checking, but at least it will still compile. + +Adapted from gnu-efi + +Author: Steve Langasek <steve.langasek@ubuntu.com> +Upstream-Status: Pending + +Index: syslinux-6.03/efi64/include/efi/x86_64/efibind.h +=================================================================== +--- syslinux-6.03.orig/efi64/include/efi/x86_64/efibind.h ++++ syslinux-6.03/efi64/include/efi/x86_64/efibind.h +@@ -25,8 +25,6 @@ Revision History + #if defined(GNU_EFI_USE_MS_ABI) + #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) + #define HAVE_USE_MS_ABI 1 +- #else +- #error Compiler is too old for GNU_EFI_USE_MS_ABI + #endif + #endif + +Index: syslinux-6.03/gnu-efi/gnu-efi-3.0/inc/x86_64/efibind.h +=================================================================== +--- syslinux-6.03.orig/gnu-efi/gnu-efi-3.0/inc/x86_64/efibind.h ++++ syslinux-6.03/gnu-efi/gnu-efi-3.0/inc/x86_64/efibind.h +@@ -25,8 +25,6 @@ Revision History + #if defined(GNU_EFI_USE_MS_ABI) + #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) + #define HAVE_USE_MS_ABI 1 +- #else +- #error Compiler is too old for GNU_EFI_USE_MS_ABI + #endif + #endif + diff --git a/meta/recipes-devtools/syslinux/syslinux/0011-mk-MMD-does-not-take-any-arguments.patch b/meta/recipes-devtools/syslinux/syslinux/0011-mk-MMD-does-not-take-any-arguments.patch new file mode 100644 index 0000000000..443c1ccc58 --- /dev/null +++ b/meta/recipes-devtools/syslinux/syslinux/0011-mk-MMD-does-not-take-any-arguments.patch @@ -0,0 +1,33 @@ +From 0f3d83c25491951f1fa84c7957358ef3d1bcd8a9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 9 Sep 2015 17:39:22 +0000 +Subject: [PATCH] mk: -MMD does not take any arguments + +Specify -Wp for each option, clang seems to not accept +-Wp,-x,y,-a,b + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + mk/syslinux.mk | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: syslinux-6.03/mk/syslinux.mk +=================================================================== +--- syslinux-6.03.orig/mk/syslinux.mk ++++ syslinux-6.03/mk/syslinux.mk +@@ -82,11 +82,11 @@ ARCH ?= $(strip $(SUBARCH)) + GCCWARN = -W -Wall -Wstrict-prototypes $(DEBUGOPT) + + # Common stanza to make gcc generate .*.d dependency files +-MAKEDEPS = -Wp,-MT,$@,-MD,$(dir $@).$(notdir $@).d ++MAKEDEPS = -MT $@ -MD + + # Dependencies that exclude system headers; use whenever we use + # header files from the platform. +-UMAKEDEPS = -Wp,-MT,$@,-MMD,$(dir $@).$(notdir $@).d ++UMAKEDEPS = -MT $@ -MMD + + # Items that are only appropriate during development; this file is + # removed when tarballs are generated. diff --git a/meta/recipes-devtools/syslinux/syslinux/syslinux-6.03-sysmacros.patch b/meta/recipes-devtools/syslinux/syslinux/syslinux-6.03-sysmacros.patch new file mode 100644 index 0000000000..3ce46da103 --- /dev/null +++ b/meta/recipes-devtools/syslinux/syslinux/syslinux-6.03-sysmacros.patch @@ -0,0 +1,45 @@ +https://bugs.gentoo.org/579928 + +From d84db34dbe39d55b4d7e868764c056689aa0793b Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Tue, 19 Apr 2016 01:56:41 -0400 +Subject: [PATCH] extlinux: pull in sys/sysmacros.h for major/minor/makedev + +These functions are defined in sys/sysmacros.h, so add the include to +main.c. This is already handled correctly in mountinfo.c. Otherwise +we get build failures like: + +main.o: In function 'find_device_sysfs': +extlinux/main.c:1131: undefined reference to 'minor' + +Upstream-Status: Pending +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +Signed-off-by: Mike Frysinger <vapier@gentoo.org> + +The first part wasn't enough in OE build, I had to add the same for syslinuxext.c. +--- + extlinux/main.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/extlinux/main.c b/extlinux/main.c +index a7ebd49..ebff7ea 100644 +--- a/extlinux/main.c ++++ b/extlinux/main.c +@@ -38,6 +38,7 @@ + #include <sysexits.h> + #include <sys/ioctl.h> + #include <sys/stat.h> ++#include <sys/sysmacros.h> + #include <sys/types.h> + #include <sys/mount.h> + #include <sys/vfs.h> +--- a/libinstaller/syslinuxext.c 2017-02-22 20:17:05.336869181 +0100 ++++ b/libinstaller/syslinuxext.c 2017-02-22 20:16:47.500868751 +0100 +@@ -2,6 +2,7 @@ + + #include <sys/stat.h> + #include <sys/types.h> ++#include <sys/sysmacros.h> + #include <getopt.h> + #include <ext2fs/ext2fs.h> + diff --git a/meta/recipes-devtools/syslinux/syslinux_6.03.bb b/meta/recipes-devtools/syslinux/syslinux_6.03.bb index 33dd776f1b..69bce1f8d7 100644 --- a/meta/recipes-devtools/syslinux/syslinux_6.03.bb +++ b/meta/recipes-devtools/syslinux/syslinux_6.03.bb @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ # ldlinux.* stuff for now, so skip mtools-native DEPENDS = "nasm-native util-linux e2fsprogs" -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/6.xx/syslinux-${PV}.tar.xz \ +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/syslinux-${PV}.tar.xz \ file://syslinux-fix-parallel-building-issue.patch \ file://syslinux-libupload-depend-lib.patch \ file://syslinux-remove-clean-script.patch \ @@ -21,6 +21,9 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/6.xx/syslinux-${PV}.tar file://0007-linux-syslinux-implement-ext_construct_sectmap_fs.patch \ file://0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch \ file://0009-linux-syslinux-implement-install_bootblock.patch \ + file://0010-gcc46-compatibility.patch \ + file://0011-mk-MMD-does-not-take-any-arguments.patch \ + file://syslinux-6.03-sysmacros.patch \ " SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13" @@ -35,8 +38,6 @@ EXTRA_OEMAKE = " \ BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \ DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \ " -# syslinux uses $LD for linking, strip `-Wl,' so it can work -export LDFLAGS = "`echo $LDFLAGS | sed 's/-Wl,//g'`" do_configure() { # drop win32 targets or build fails @@ -57,23 +58,26 @@ do_compile() { # Rebuild only the installer; keep precompiled bootloaders # as per author's request (doc/distrib.txt) - oe_runmake CC="${CC} ${CFLAGS}" LDFLAGS="${LDFLAGS}" firmware="bios" installer + oe_runmake CC="${CC} ${CFLAGS}" LD="${LD}" LDFLAGS="${LDFLAGS}" firmware="bios" installer } do_install() { - oe_runmake CC="${CC} ${CFLAGS}" install INSTALLROOT="${D}" firmware="bios" + oe_runmake CC="${CC} ${CFLAGS}" LD="${LD}" install INSTALLROOT="${D}" firmware="bios" install -d ${D}${datadir}/syslinux/ install -m 644 ${S}/bios/core/ldlinux.sys ${D}${datadir}/syslinux/ install -m 644 ${S}/bios/core/ldlinux.bss ${D}${datadir}/syslinux/ + install -m 755 ${S}/bios/linux/syslinux-nomtools ${D}${bindir}/ } -PACKAGES += "${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc" +PACKAGES += "${PN}-nomtools ${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc" RDEPENDS_${PN} += "mtools" +RDEPENDS_${PN}-nomtools += "libext2fs" RDEPENDS_${PN}-misc += "perl" FILES_${PN} = "${bindir}/syslinux" +FILES_${PN}-nomtools = "${bindir}/syslinux-nomtools" FILES_${PN}-extlinux = "${sbindir}/extlinux" FILES_${PN}-mbr = "${datadir}/${BPN}/mbr.bin" FILES_${PN}-chain = "${datadir}/${BPN}/chain.c32" |
