From c1fa9bc2f7a4e5481edf4fce5c03dd45862fe72c Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 30 Nov 2023 20:13:05 +0100 Subject: [PATCH] package/libselinux: fix build with BR2_TIME_BITS_64 Do not remove _FILE_OFFSET_BITS=64 from CFLAGS and CPPFLAGS to avoid the following build failure with BR2_TIME_BITS_64 raised since commit 3c427c64726560ea1743282a3fdb78f5b28692eb: In file included from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/features.h:394, from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/bits/libc-header-start.h:33, from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/stdint.h:26, from /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/lib/gcc/mipsel-buildroot-linux-gnu/12.3.0/include/stdint.h:9, from ../include/selinux/avc.h:9, from avc.c:10: /home/autobuild/autobuild/instance-9/output-1/per-package/libselinux/host/mipsel-buildroot-linux-gnu/sysroot/usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" 26 | # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" | ^~~~~ This LFS workaround for glibc < 2.23 was added in 2016 by commit ebcca24c953d8df4b16bc52c5ba31feae4ed8ad0 and is probably not needed anymore as glibc 2.23 was released in February 2016: https://sourceware.org/glibc/wiki/Release/2.23 Fixes: - http://autobuild.buildroot.org/results/d85c81f87adf3a5945fa369bcec233e6def2ed12 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle --- package/libselinux/libselinux.mk | 8 -------- 1 file changed, 8 deletions(-) diff --git a/package/libselinux/libselinux.mk b/package/libselinux/libselinux.mk index 601038e46f..734084ba50 100644 --- a/package/libselinux/libselinux.mk +++ b/package/libselinux/libselinux.mk @@ -52,14 +52,6 @@ define LIBSELINUX_BUILD_PYTHON_BINDINGS endef endif # python3 -# Filter out D_FILE_OFFSET_BITS=64. This fixes errors caused by glibc 2.22. We -# set CFLAGS, CPPFLAGS and LDFLAGS here because we want to win over the -# CFLAGS/CPPFLAGS/LDFLAGS definitions passed by $(PKG_PYTHON_SETUPTOOLS_ENV) -# when the python binding is enabled. -LIBSELINUX_MAKE_OPTS += \ - CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))" \ - CPPFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))" - define LIBSELINUX_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ $(LIBSELINUX_MAKE_OPTS) all