buildroot/package/gcc/12.4.0
Thomas Petazzoni b60d6dafb7 package/gcc: fix build with BR2_TIME_BITS_64=y
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>
(cherry picked from commit 81a4b6e7b8)
[Peter: drop 14.1.0 patch]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-09-02 13:15:28 +02:00
..
0001-disable-split-stack-for-non-thread-builds.patch
0002-or1k-Only-define-TARGET_HAVE_TLS-when-HAVE_AS_TLS.patch
0003-xtensa-add-.note.GNU-stack-section-on-linux.patch
0005-Undef-_TIME_BITS-along-with-_FILE_OFFSET_BITS-on-Lin.patch
0006-libsanitizer-also-undef-_TIME_BITS-in-sanitizer_proc.patch