From 7593aea519dee34cb25715296c1b03f471123ee2 Mon Sep 17 00:00:00 2001 From: James Knight Date: Thu, 8 Feb 2024 11:55:30 -0500 Subject: [PATCH] package/elfutils: drop lfs tweak When the elfutils package was first introduced, it filtered out LFS-related compiler flags due to issues with the package's implementation. This package has since evolved over the years to support LFS (e.g. using `AC_SYS_LARGEFILE` [1]). Filtering out `-D_FILE_OFFSET_BITS=64` can lead to a configuration error when `BR2_TIME_BITS_64` is enabled: checking whether gcc supports -Wl,-z,relro... yes checking for __thread support... no configure: error: __thread support required ... With the configuration log providing the specific reason: configure:7175: .../output-1/host/bin/m68k-buildroot-linux-gnu-gcc -o conftest -fPIC -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_TIME_BITS=64 -Ofast -g0 -D_FORTIFY_SOURCE=2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_TIME_BITS=64 -shared -Wl,-z,defs -Wl,-z,relro -latomic -Wl,--build-id conftest.c >&5 In file included from .../output-1/host/m68k-buildroot-linux-gnu/sysroot/usr/include/features.h:394, from .../output-1/host/m68k-buildroot-linux-gnu/sysroot/usr/include/bits/libc-header-start.h:33, from .../output-1/host/m68k-buildroot-linux-gnu/sysroot/usr/include/stdlib.h:26, from conftest.c:13: .../output-1/host/m68k-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" | ^~~~~ configure:7175: $? = 1 ... Fixes: - http://autobuild.buildroot.org/results/fbfe131673ed78999a07dbc879436e0ef6a8a1c0 [1]: https://sourceware.org/git/?p=elfutils.git;a=commit;h=3425454a10d307fae891fb667cf7969e945cde79 Signed-off-by: James Knight Signed-off-by: Thomas Petazzoni --- package/elfutils/elfutils.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/package/elfutils/elfutils.mk b/package/elfutils/elfutils.mk index 521c37a776..cb4293b0c3 100644 --- a/package/elfutils/elfutils.mk +++ b/package/elfutils/elfutils.mk @@ -29,10 +29,6 @@ HOST_ELFUTILS_CONF_OPTS = \ --without-zstd \ --disable-progs -# elfutils gets confused when lfs mode is forced, so don't -ELFUTILS_CFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS)) -ELFUTILS_CPPFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS)) - ELFUTILS_CONF_ENV += \ CFLAGS="$(ELFUTILS_CFLAGS)" \ CPPFLAGS="$(ELFUTILS_CPPFLAGS)"