[cfe-dev] GCC 5.1.0 producing invalid Clang binaries?
Alexander Potapenko via cfe-dev
cfe-dev at lists.llvm.org
Fri Jan 10 06:00:29 PST 2020
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
More information about the cfe-dev
mailing list