[cfe-dev] Workaround for bug 16070 ?

Tim Northover t.p.northover at gmail.com
Thu Jun 27 12:33:17 PDT 2013


Hi Steve,

> Given that it appears that a change in clang causes hitting the assertion in
> binutils (what should the actual behavior be?), can we get a workaround in
> clang for it?

I think it's unlikely anyone will approve a change in Clang
specifically to avoid a binutils bug on that scale, so there'll
probably be no workaround in that sense. If someone (hint hint!)
submits a patch to improve clang that happens to sidestep this
binutils issue as a side effect, everything's fine.

I can't reproduce it with my (admittedly possibly dodgy) gnueabihf
toolchain either, but from reading the description I think a case
could be made for making "arm-linux-gnueabihf" default to a different
CPU than "arm-linux-gnueabi"; one that *does* support hardware float,
for example.

We'd probably want to consider what an arm-linux-gnueabihf-gcc
defaults to in making that change. But I'd almost be tempted to make
the change even if GCC didn't. Having arm-linux-gnueabihf default to a
non-HF CPU is insane.

If you're interested, I *think* the place to start looking is Clang's
lib/Driver/Tools.cpp. Specifically the getARMTargetCPU function.

Cheers.

Tim.



More information about the cfe-dev mailing list