]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
gcc: Undef _TIME_BITS in sanitizer_procmaps_solaris.cpp
authorJiaying Song <jiaying.song.cn@windriver.com>
Wed, 9 Apr 2025 02:51:10 +0000 (10:51 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 10 Apr 2025 09:40:39 +0000 (10:40 +0100)
commit902085def653ca5194b28a4065043c73e54c9204
tree6cab060079263e2d5d6ab41b8dca9bb04a91f938
parentc83927d94bc0afe2205324a976e9495d6df00caf
gcc: Undef _TIME_BITS in sanitizer_procmaps_solaris.cpp

gcc-sanitizers fail to build when both -D_TIME_BITS=64 and
-D_FILE_OFFSET_BITS=64  are defined. This is because
sanitizer_procmaps_solaris.cpp explicitly undefines  _FILE_OFFSET_BITS
before including any headers, which causes _TIME_BITS=64 to  violate the
requirement in glibc:

/usr/include/features-time64.h:26:5: error:  "_TIME_BITS=64 is allowed
only with _FILE_OFFSET_BITS=64"

Fixes a build failure on 32-bit Linux platforms when using both
-D_TIME_BITS=64 and -D_FILE_OFFSET_BITS=64.

Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-14.2.inc
meta/recipes-devtools/gcc/gcc/0028-libsanitizer-undef-_TIME_BITS-in-solaris-procmaps.patch [new file with mode: 0644]