From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>,
Romain Naour <romain.naour@gmail.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [Buildroot] [PATCH] package/gcc: fix build with BR2_TIME_BITS_64=y
Date: Tue, 30 Jul 2024 09:35:44 +0200 [thread overview]
Message-ID: <20240730093544.001f5abf@windsurf> (raw)
In-Reply-To: <20240719210325.2096254-1-thomas.petazzoni@bootlin.com>
On Fri, 19 Jul 2024 23:03:24 +0200
Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:
> On the architectures that supports libsanitizer (part of gcc), the
> build is currently failing with BR2_TIME_BITS_64=y. This is because
> some code in libsanitizer unsets _FILE_OFFSET_BITS, but building code
> with _FILE_OFFSET_BITS unset, but _TIME_BITS set isn't legal.
>
> To fix this, this commit backports two changes:
>
> - One change to also unset _TIME_BITS in
> sanitizer_platform_limits_posix.cpp. This change is upstream in
> LLVM, and already part of GCC 14.x, so we only bringing it to GCC
> 12.x and GCC 13.x.
>
> - A second change doing the same modification, but in
> sanitizer_procmaps_solaris.cpp, which as crazy as it might sound,
> also gets compiled on Linux platforms (but to basically an empty
> file). This change has been submitted upstream to both LLVM and gcc.
>
> Notes:
>
> - the special PowerPC SPE version of GCC cannot be affected, as only
> uClibc-ng is used for this architecture, and uClibc-ng doesn't use
> _TIME_BITS=64 (but now default to 64-bit time_t on 32-bit
> architectures, like musl does).
>
> - the special ARC version doesn't need patching because libsanitizer
> doesn't support the ARC architecture, so it doesn't get built
>
> Fixes:
>
> http://autobuild.buildroot.net/results/ff2dbfdabf0bb6a0d82ea8a80122ab97fd75bd3f/
> https://gitlab.com/buildroot.org/buildroot/-/issues/16
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
> ...-along-with-_FILE_OFFSET_BITS-on-Lin.patch | 44 +++++++++++++++
> ...o-undef-_TIME_BITS-in-sanitizer_proc.patch | 53 +++++++++++++++++++
> ...-along-with-_FILE_OFFSET_BITS-on-Lin.patch | 44 +++++++++++++++
> ...o-undef-_TIME_BITS-in-sanitizer_proc.patch | 53 +++++++++++++++++++
> ...o-undef-_TIME_BITS-in-sanitizer_proc.patch | 53 +++++++++++++++++++
> 5 files changed, 247 insertions(+)
> create mode 100644 package/gcc/12.4.0/0005-Undef-_TIME_BITS-along-with-_FILE_OFFSET_BITS-on-Lin.patch
> create mode 100644 package/gcc/12.4.0/0006-libsanitizer-also-undef-_TIME_BITS-in-sanitizer_proc.patch
> create mode 100644 package/gcc/13.3.0/0004-Undef-_TIME_BITS-along-with-_FILE_OFFSET_BITS-on-Lin.patch
> create mode 100644 package/gcc/13.3.0/0005-libsanitizer-also-undef-_TIME_BITS-in-sanitizer_proc.patch
> create mode 100644 package/gcc/14.1.0/0002-libsanitizer-also-undef-_TIME_BITS-in-sanitizer_proc.patch
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
next prev parent reply other threads:[~2024-07-30 7:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-19 21:03 [Buildroot] [PATCH] package/gcc: fix build with BR2_TIME_BITS_64=y Thomas Petazzoni via buildroot
2024-07-30 7:35 ` Thomas Petazzoni via buildroot [this message]
2024-09-02 11:17 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240730093544.001f5abf@windsurf \
--to=buildroot@buildroot.org \
--cc=giulio.benetti@benettiengineering.com \
--cc=romain.naour@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox