[cfe-dev] GCC 5.1.0 producing invalid Clang binaries?

Hans Wennborg via cfe-dev cfe-dev at lists.llvm.org
Fri Jan 10 06:43:02 PST 2020


We had problems with GCC 5.1.0 when building Clang for Chromium
(crbug.com/994556 and crbug.com/998569). Actually your problem sounds
maybe related to the second of those. We've since switched to GCC
5.3.0 which someone said is supposed to be better, and I don't recall
any problems with that yet.

On Fri, Jan 10, 2020 at 3:00 PM Alexander Potapenko via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
>
> Hi,
>
> Trying to build a (somewhat) fresh Clang to run on a rather old
> machine, I've attempted to use GCC 5.1.0 compiled according to the
> instructions at
> https://llvm.org/docs/GettingStarted.html#getting-a-modern-host-c-toolchain=
> .
> It turned out that the resulting Clang binaries crash on a trivial
> assembly file (reduced from the Linux kernel source):
>
> $ cat trampoline_64.s
> .code32
> $ clang -m16   -c -o trampoline_64.o trampoline_64.s -w
> clang-10: /home/glider/llvm-project/llvm/lib/Target/X86/AsmParser/X86AsmPar=
> ser.cpp:985:
> void {anonymous}::X86AsmParser::SwitchMode(unsigned int): Assertion
> `FeatureBitset({mode}) =3D=3D (STI.getFeatureBits() & AllModes)' failed.
> ...
>
> The same Clang version (c2443155a0fb245c8f17f2c1c72b6ea391e86e81)
> works perfectly fine when compiled with a newer GCC 8.3.0.
> Could it be so that GCC 5.1.0 miscompiles Clang and thus shouldn't be
> used as the minimum build requirement?
>
>
>
> --
> Alexander Potapenko
> Software Engineer
>
> Google Germany GmbH
> Erika-Mann-Straße, 33
> 80636 München
>
> Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
> Registergericht und -nummer: Hamburg, HRB 86891
> Sitz der Gesellschaft: Hamburg
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


More information about the cfe-dev mailing list