From patchwork Mon Aug 15 17:17:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 5876 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4M61Fb6TvFz3wfX for ; Mon, 15 Aug 2022 17:18:11 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4M61FS4zgmz5YL; Mon, 15 Aug 2022 17:18:04 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4M61FS23lbz2ySx; Mon, 15 Aug 2022 17:18:04 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4M61FQ3mygz2xR4 for ; Mon, 15 Aug 2022 17:18:02 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4M61FP0wv8z5Xd; Mon, 15 Aug 2022 17:18:01 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1660583881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k5ByXCWPP+Op6chXn/ZAQ57/1kbYrwg4syyv8R3VrUA=; b=jlMoF2HnvvayoSPkE6z3yCdstPKYF8T+0ODF4xzV3k5Zd+4vfSl+ycaUv3hZgN0ChmvrYC MyswwsQuOej8hrAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1660583881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k5ByXCWPP+Op6chXn/ZAQ57/1kbYrwg4syyv8R3VrUA=; b=I4LGyuZN5Br3ZfktBt3xwX/liFD+fIcQTwx1cUb2rIPND9ahyeLnkRSLCn9Jwu91vc0/vt aZxO1waw1c75YUYbnXqzzRoUlqpdJjN4ZFkqWR2T+zsUU/oxcYd/J24Np/jmHSu82oFC0z gpsGfDkJJt4yTuSlD9psOTnaXkiqbBr4Zi7zQ+kecvNJ6AZAdjbhY+JN7TuxY2eBL4Fz/L HPa4ESAo2LDCLat1E/Ayt0+dsHte7XNbVnwxaY4VsH3v8o2IbjpX3huw5V/v1vIvggzP6M O+NHvaM1j4cixPe6fmRBvD4HjiHxrhrrzU+4BeTMtITVkZTC5osXnJw6i//8kw== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 13/15] syslinux: Fix build against glibc 2.36 Date: Mon, 15 Aug 2022 17:17:51 +0000 Message-Id: <20220815171753.1858688-13-michael.tremer@ipfire.org> In-Reply-To: <20220815171753.1858688-1-michael.tremer@ipfire.org> References: <20220815171753.1858688-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- lfs/syslinux | 1 + ...binstaller-Fix-build-with-glibc-2.36.patch | 56 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 src/patches/syslinux-6.04-libinstaller-Fix-build-with-glibc-2.36.patch diff --git a/lfs/syslinux b/lfs/syslinux index d90032cd9..150e4071e 100644 --- a/lfs/syslinux +++ b/lfs/syslinux @@ -79,6 +79,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/syslinux-6.03-sysmacros.patch cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/syslinux-6.04_replace-builtin-strlen-that-appears-to-get-optimized.patch cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/syslinux-6.04_pre1-fcommon.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/syslinux-6.04-libinstaller-Fix-build-with-glibc-2.36.patch # Build cd $(DIR_APP) && make bios $(MAKETUNING) diff --git a/src/patches/syslinux-6.04-libinstaller-Fix-build-with-glibc-2.36.patch b/src/patches/syslinux-6.04-libinstaller-Fix-build-with-glibc-2.36.patch new file mode 100644 index 000000000..b16eec007 --- /dev/null +++ b/src/patches/syslinux-6.04-libinstaller-Fix-build-with-glibc-2.36.patch @@ -0,0 +1,56 @@ +From 0c4f97b2dd22365d32b865dd002282e454a7edf0 Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Sat, 6 Aug 2022 11:53:55 +0000 +Subject: [PATCH] libinstaller: Fix build with glibc-2.36 + +* add only necessary definitions from linux/fs.h, because including whole + causes conflicts with sys/mount.h: + http://errors.yoctoproject.org/Errors/Details/664535/ + +In file included from TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/recipe-sysroot/usr/include/linux/fs.h:19, + from TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/syslinux-6.04-pre2/linux/../libinstaller/linuxioctl.h:19, + from TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/syslinux-6.04-pre2/linux/../libinstaller/syslxcom.c:34: +TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/recipe-sysroot/usr/include/linux/mount.h:95:6: error: redeclaration of 'enum fsconfig_command' + 95 | enum fsconfig_command { + | ^~~~~~~~~~~~~~~~ +In file included from TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/syslinux-6.04-pre2/linux/../libinstaller/syslxcom.c:31: +TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/recipe-sysroot/usr/include/sys/mount.h:189:6: note: originally defined here + 189 | enum fsconfig_command + | ^~~~~~~~~~~~~~~~ +TOPDIR/tmp-glibc/work/core2-64-oe-linux/syslinux/6.04-pre2-r1/recipe-sysroot/usr/include/linux/mount.h:96:9: error: redeclaration of enumerator 'FSCONFIG_SET_FLAG' + 96 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */ + | ^~~~~~~~~~~~~~~~~ +... + +Upstream-Status: Pending +Signed-off-by: Martin Jansa +--- + libinstaller/linuxioctl.h | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/libinstaller/linuxioctl.h b/libinstaller/linuxioctl.h +index e2731c7..f4a6703 100644 +--- a/libinstaller/linuxioctl.h ++++ b/libinstaller/linuxioctl.h +@@ -16,7 +16,20 @@ + #include /* Floppy geometry */ + #include /* Hard disk geometry */ + +-#include /* FIGETBSZ, FIBMAP, FS_IOC_* */ ++// #include /* FIGETBSZ, FIBMAP, FS_IOC_* */ ++// linux/fs.h unfortunately causes conflict with sys/mount.h since glibc-2.36 ++// https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E ++// add the necessary definitions ++ ++#define FS_IOC_GETFLAGS _IOR('f', 1, long) ++#define FS_IOC_SETFLAGS _IOW('f', 2, long) ++#define FIBMAP _IO(0x00,1) /* bmap access */ ++#define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ ++#define FS_IMMUTABLE_FL 0x00000010 /* Immutable file */ ++#define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */ ++ ++// for musl we also need limits.h for PATH_MAX ++#include + + #undef SECTOR_SIZE /* Defined in msdos_fs.h for no good reason */ + #undef SECTOR_BITS