[cfe-dev] Clang problems with Solaris and SPARC

Witold Sowa witold.sowa at gmail.com
Wed May 25 08:28:59 PDT 2011


Hi James,

Your fix is working for me. Thanks a lot. The new issue is that now clang
displays following message:
$ ./clang++ ~/q.cpp -o ~/q
clang-2: warning: unknown platform, assuming -mfloat-abi=soft
'+soft-float' is not a recognized feature for this target (ignoring feature)

I would assume that if soft-float is not recognized for this target (ie.
sparc) a hardware floating point operations should be used in first place
and we shouldn't even try to use soft-float. Do you know what is the status
of sparc target support? Does it support floating point operations or not?

Cheers!
Witek


2011/5/25 James Molloy <james at jamesmolloy.co.uk>

> Hi Witold,
>
> This appears to be a bug in Clang. The offending code is in
> lib/Driver/Tools.cpp:
>
>   if (FloatABI == "soft") {
>     // Floating point operations and argument passing are soft.
>     //
>     // FIXME: This changes CPP defines, we need -target-soft-float.
>     CmdArgs.push_back("-msoft-float");
>     CmdArgs.push_back("soft");
>     CmdArgs.push_back("-target-feature");
>     CmdArgs.push_back("+soft-float");
>   } else {
>
>
> but –msoft-float is defined in CC1Options.td  as:
>
> def msoft_float : Flag<"-msoft-float">,
>   HelpText<"Use software floating point">;
>
>
> i.e. it doesn’t take an argument. So Clang (as cc1) is interpreting the
> extra ‘soft’ argument as an input file.
>
> Fix is to remove the line “CmdArgs.push_back("soft");” as far as I can
> tell?
>
> Cheers,
>
> James
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110525/30382255/attachment.html>


More information about the cfe-dev mailing list