* [Buildroot] [PATCH 1/1] elfutils: drop lfs tweak
@ 2024-02-08 16:55 James Knight
2024-02-11 22:08 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: James Knight @ 2024-02-08 16:55 UTC (permalink / raw)
To: buildroot; +Cc: James Knight
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 <james.d.knight@live.com>
---
package/elfutils/elfutils.mk | 4 ----
1 file changed, 4 deletions(-)
diff --git a/package/elfutils/elfutils.mk b/package/elfutils/elfutils.mk
index d43b545f2f81ec728573b5ac994e0b45a6813762..3531142fd2dafb01dedf583574ff3ad33524ba97 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)"
--
2.40.1.windows.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [Buildroot] [PATCH 1/1] elfutils: drop lfs tweak
2024-02-08 16:55 [Buildroot] [PATCH 1/1] elfutils: drop lfs tweak James Knight
@ 2024-02-11 22:08 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-02-11 22:08 UTC (permalink / raw)
To: James Knight; +Cc: buildroot
On Thu, 8 Feb 2024 11:55:30 -0500
James Knight <james.d.knight@live.com> wrote:
> 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 <james.d.knight@live.com>
> ---
> package/elfutils/elfutils.mk | 4 ----
> 1 file changed, 4 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-11 22:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-08 16:55 [Buildroot] [PATCH 1/1] elfutils: drop lfs tweak James Knight
2024-02-11 22:08 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox