From patchwork Tue Mar 24 14:23:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1260711 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48mtmF4gfDz9sWG for ; Wed, 25 Mar 2020 01:24:13 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E249E20449; Tue, 24 Mar 2020 14:24:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oKWUHI1zI8QG; Tue, 24 Mar 2020 14:24:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 30A8E203CE; Tue, 24 Mar 2020 14:24:07 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 8A85A1BF865 for ; Tue, 24 Mar 2020 14:24:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 85120851C2 for ; Tue, 24 Mar 2020 14:24:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ImZw7ruYSxMF for ; Tue, 24 Mar 2020 14:24:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by fraxinus.osuosl.org (Postfix) with ESMTPS id A81478513B for ; Tue, 24 Mar 2020 14:24:03 +0000 (UTC) X-Originating-IP: 86.210.146.109 Received: from localhost (lfbn-tou-1-915-109.w86-210.abo.wanadoo.fr [86.210.146.109]) (Authenticated sender: thomas.petazzoni@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 0295F20017; Tue, 24 Mar 2020 14:23:59 +0000 (UTC) From: Thomas Petazzoni To: buildroot@buildroot.org Date: Tue, 24 Mar 2020 15:23:55 +0100 Message-Id: <20200324142356.1487610-1-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/2] boot/syslinux: fix build of efi part with gnu-efi 3.0.10 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The following defconfig: BR2_x86_i686=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs/x86-i686--glibc--bleeding-edge-2018.11-1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_8=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y BR2_TOOLCHAIN_EXTERNAL_CXX=y BR2_INIT_NONE=y BR2_TARGET_SYSLINUX=y BR2_TARGET_SYSLINUX_EFI=y fails to build due to missing setjmp/longjmp definitions, which is a consequence of a change introduced between gnu-efi 3.0.9 and 3.0.10. This build failure is fixed by adding another syslinux paytch, which has been submitted upstream. Signed-off-by: Thomas Petazzoni --- .../0015-efi-main.c-include-efisetjmp.h.patch | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 boot/syslinux/0015-efi-main.c-include-efisetjmp.h.patch diff --git a/boot/syslinux/0015-efi-main.c-include-efisetjmp.h.patch b/boot/syslinux/0015-efi-main.c-include-efisetjmp.h.patch new file mode 100644 index 0000000000..2fd61ecbc8 --- /dev/null +++ b/boot/syslinux/0015-efi-main.c-include-efisetjmp.h.patch @@ -0,0 +1,60 @@ +From 7d68fa68cd9f2987bd85339f3391913a8b0e58c7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Tue, 24 Mar 2020 10:21:27 +0100 +Subject: [PATCH] efi/main.c: include +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Building syslinux against gnu-efi 3.0.10 currently fails with: + +syslinux/efi/main.c:33:8: error: unknown type name ‘jmp_buf’ + 33 | static jmp_buf load_error_buf; + | ^~~~~~~ +syslinux/efi/main.c: In function ‘local_boot’: +syslinux/efi/main.c:189:5: warning: implicit declaration of function ‘longjmp’ [-Wimplicit-function-declaration] + 189 | longjmp(&load_error_buf, 1); + | ^~~~~~~ +syslinux/efi/main.c: In function ‘build_gdt’: +syslinux/efi/main.c:907:75: warning: taking address of packed member of ‘struct dt_desc’ may result in an unaligned pointer value [-Waddress-of-packed-member] + 907 | status = emalloc(gdt.limit, __SIZEOF_POINTER__ , (EFI_PHYSICAL_ADDRESS *)&gdt.base); + | ^~~~~~~~~ +syslinux/efi/main.c: In function ‘efi_main’: +syslinux/efi/main.c:1390:7: warning: implicit declaration of function ‘setjmp’ [-Wimplicit-function-declaration] + 1390 | if (!setjmp(&load_error_buf)) + | ^~~~~~ +make[3]: *** [syslinux/mk/efi.mk:63: main.o] Error 1 + +This is due to gnu-efi commit 486ba3c3bdd147b7d98159b9e650be60bce0f027 +("Do not include efisetjmp.h on efi.h"), in which they state: + + Do not include efisetjmp.h on efi.h + + People than really want to use efisetjmp implementation can include + the header on their own. + + Signed-off-by: leo + +So we act as specified, and include from efi/main.c. + +Signed-off-by: Thomas Petazzoni +Upstream: https://www.syslinux.org/archives/2020-March/026621.html +--- + efi/main.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/efi/main.c b/efi/main.c +index 6a748412..e924cfb1 100644 +--- a/efi/main.c ++++ b/efi/main.c +@@ -12,6 +12,7 @@ + #include + + #include "efi.h" ++#include + #include "fio.h" + #include "version.h" + #include "efi_pxe.h" +-- +2.25.1 +