gcc12: disable libsanitizer for mips64

Without the change build on mips64-unknown-linux-gnu fails as:

        $ nix-build -A buildPackages.gcc12 --argstr crossSystem mips64-linux

        In file included from ...-glibc-mips64-unknown-linux-gnu-2.37-8-dev/include/bits/stat.h:25,
                         from ...-glibc-mips64-unknown-linux-gnu-2.37-8-dev/include/fcntl.h:78,
                         from ../../../../gcc-12.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cpp:55:
        ...-glibc-mips64-unknown-linux-gnu-2.37-8-dev/include/bits/struct_stat.h:190:8: error: redefinition of 'struct stat64'
          190 | struct stat64
              |        ^~~~~~
This commit is contained in:
Sergei Trofimovich 2023-06-14 19:40:25 +01:00 committed by Adam Joseph
parent ac7ed741a5
commit a62c92ab9b

View file

@ -244,6 +244,11 @@ let
++ lib.optionals (langD) [
"--with-target-system-zlib=yes"
]
# On mips64-unknown-linux-gnu libsanitizer defines collide with
# glibc's definitions and fail the build. It was fixed in gcc-13+.
++ lib.optionals (targetPlatform.isMips && lib.versions.major version == "12") [
"--disable-libsanitizer"
]
;
in configureFlags