buildroot/package/libselinux
Thomas Petazzoni 6a612fc8c6 package/libselinux: fix build on old glibc with <fts.h> incompatible with LFS
glibc versions prior to 2.23 have a <fts.h> implementation that is not
compatible with large file support, causing build failures such as:

In file included from selinux_restorecon.c:17:0:
/home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/fts.h:41:3: error: #error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
 # error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"

Prior to commit 3fce6f1c15
("package/libselinux: fix the build with Python 3.8"), we were not
passing PKG_PYTHON_DISTUTILS_ENV in the environment. But with
3fce6f1c15, we are now passing the
PKG_PYTHON_DISTUTILS_ENV variable, provided by pkg-python.mk, into the
build environment. While this is part of fixing the build of
libselinux with Python 3.8, it breaks the build because we are no
longer filtering out the -D_FILE_OFFSET_BITS=64 option from
CFLAGS. Indeed, while we do so at the beginning of libselinux.mk, it
gets overridden later by the addition of $(PKG_PYTHON_DISTUTILS_ENV).

To avoid this, we pass CFLAGS/LDFLAGS *after*
$(PKG_PYTHON_DISTUTILS_ENV) has been added. In practice, the
CFLAGS/LDFLAGS passed by $(PKG_PYTHON_DISTUTILS_ENV) are just
$(TARGET_CFLAGS) and $(TARGET_LDFLAGS), so we are not missing anything
specific.

Fixes:

  http://autobuild.buildroot.net/results/ef6ff91086a094eb25b145d66d072c6d2fc60154/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-11-29 09:39:47 +01:00
..
0001-fix-musl-build.patch
0002-revert-ln-relative.patch
0003-libselinux-Use-Python-distutils-to-install-SELinux-p.patch package/libselinux: fix the build with Python 3.8 2019-10-26 12:36:54 +02:00
0004-src-Makefile-don-t-pass-bogus-I-and-L-to-python-setu.patch package/libselinux: fix the build with Python 3.8 2019-10-26 12:36:54 +02:00
0005-Remove-ln-relative-usage-in-install-pywrap.patch package/libselinux: fix the build with Python 3.8 2019-10-26 12:36:54 +02:00
0006-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch package/libselinux: fix the build with Python 3.8 2019-10-26 12:36:54 +02:00
Config.in
libselinux.hash
libselinux.mk package/libselinux: fix build on old glibc with <fts.h> incompatible with LFS 2019-11-29 09:39:47 +01:00