From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Romain Naour <romain.naour@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH for-next 03/11] package/gcc: disable libsanitizer for mips64{el} w/ n32 ABI
Date: Sat, 23 Jul 2022 14:41:29 +0200 [thread overview]
Message-ID: <20220723144129.7840044f@windsurf> (raw)
In-Reply-To: <20220529131811.481017-3-romain.naour@gmail.com>
On Sun, 29 May 2022 15:18:03 +0200
Romain Naour <romain.naour@gmail.com> wrote:
> libsanitizer has been enabled for mips64{el} in gcc 12 [1] but it
> fail to build when n32 ABI is used:
>
> In file included from output/mips64el-buildroot-linux-gnu/sysroot/usr/include/bits/stat.h:25,
> from output/mips64el-buildroot-linux-gnu/sysroot/usr/include/fcntl.h:78,
> from ../../../../libsanitizer/sanitizer_common/sanitizer_linux.cpp:55:
> output/mips64el-buildroot-linux-gnu/sysroot/usr/include/bits/struct_stat.h:190:8: error: redefinition of ‘struct stat64’
> 190 | struct stat64
> | ^~~~~~
>
> In file included from ../../../../libsanitizer/sanitizer_common/sanitizer_linux.cpp:49:
> output/mips64el-buildroot-linux-gnu/sysroot/usr/include/asm/stat.h:52:8: note: previous definition of ‘struct stat64’
> 52 | struct stat64 {
> | ^~~~~~
>
> Disable libsanitizer for mips64 with n32 ABI.
>
> Note: Only glibc toolchains are affected since libsanitizer is
> disabled for musl and uClibc-ng toolchains [2].
>
> Fixes:
> https://gitlab.com/kubu93/toolchains-builder/-/jobs/2510178651
>
> [1] https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=344e6f9f2abcff9b2bb4b26b693be4a599272f43
> [2] https://git.buildroot.net/buildroot/commit/?id=5f4d658d888b539de9a6247ae5b1a0999de5d4ec
Has this issue been reported to upstream gcc?
> package/gcc/gcc.mk | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
> index b940327c83..e1f3935e56 100644
> --- a/package/gcc/gcc.mk
> +++ b/package/gcc/gcc.mk
> @@ -138,6 +138,13 @@ ifeq ($(BR2_sparc)$(BR2_sparc64),y)
> HOST_GCC_COMMON_CONF_OPTS += --disable-libsanitizer
> endif
>
> +# libsanitizer is available for mips64{el} since gcc 12 but fail to build
> +# with n32 ABI due to struct stat64 definition clash due to mixing
> +# kernel and user headers.
> +ifeq ($(BR2_mips64)$(BR2_mips64el)$(BR2_MIPS_NABI32),yy)
Minor nit, perhaps:
ifeq ($(BR2_mips64)$(BR2_mips64el):$(BR2_MIPS_NABI32),y:y)
so it's absolutely clear how this works.
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-07-23 12:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-29 13:18 [Buildroot] [PATCH for-next 01/11] arch/Config.in.riscv: add Zicsr and Zifencei standalone extensions Romain Naour
2022-05-29 13:18 ` [Buildroot] [PATCH for-next 02/11] configs/qemu_riscv{32, 64}_virt: kernel bump version to 5.15.43 Romain Naour
2022-07-23 12:57 ` Thomas Petazzoni via buildroot
2022-05-29 13:18 ` [Buildroot] [PATCH for-next 03/11] package/gcc: disable libsanitizer for mips64{el} w/ n32 ABI Romain Naour
2022-07-23 12:41 ` Thomas Petazzoni via buildroot [this message]
2022-05-29 13:18 ` [Buildroot] [PATCH for-next 04/11] package/gcc: disable libsanitizer for mips{el} and gcc > 12 Romain Naour
2022-05-29 13:18 ` [Buildroot] [PATCH for-next 05/11] toolchain: enable libquadmath for PowerPC with VSX Romain Naour
2022-07-23 12:57 ` Thomas Petazzoni via buildroot
2022-05-29 13:18 ` [Buildroot] [PATCH for-next 06/11] package/gcc: add missing --enable-libquadmath-support option Romain Naour
2022-07-23 12:57 ` Thomas Petazzoni via buildroot
2022-05-29 13:18 ` [Buildroot] [PATCH for-next 07/11] package/gcc: switch to https urls for archives hashes Romain Naour
2022-07-23 12:57 ` Thomas Petazzoni via buildroot
2022-05-29 13:18 ` [Buildroot] [PATCH for-next 08/11] package/gcc: add support for gcc 12 Romain Naour
2022-06-25 6:45 ` James Hilliard
2022-07-16 11:31 ` Romain Naour
2022-05-29 13:18 ` [Buildroot] [PATCH for-next 09/11] arch: add BR2_ARCH_NEEDS_GCC_AT_LEAST_12 Romain Naour
2022-05-29 13:18 ` [Buildroot] [PATCH for-next 10/11] package/gcc: switch to gcc 11.x as the default Romain Naour
2022-05-29 13:18 ` [Buildroot] [PATCH for-next 11/11] package/gcc: remove gcc 9.x Romain Naour
2022-07-23 12:39 ` [Buildroot] [PATCH for-next 01/11] arch/Config.in.riscv: add Zicsr and Zifencei standalone extensions Thomas Petazzoni via buildroot
2022-07-23 13:00 ` Romain Naour
2022-07-23 13:25 ` Thomas Petazzoni via buildroot
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=20220723144129.7840044f@windsurf \
--to=buildroot@buildroot.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.