[LLVMdev] Patch: Compiling LLVM in Sparc

Daniel Dunbar daniel at zuster.org
Tue Aug 25 00:32:37 PDT 2009


Hi,

I think I should rename the constants to be a little less likely to
collide. I think just upcasing them might be good enough?

 - Daniel

On Tue, Aug 25, 2009 at 12:20 AM, Duncan Sands<baldrick at free.fr> wrote:
> Hi Venkatraman,
>
>>  The current version in SVN fails to compile in sparc machines since
>> gcc defines "sparc" as a macro in sparc machines that expands to 1
>> (see below) but Triple.h defines "sparc" as a enum constant.
>>
>>  $ cpp -dM /dev/null | grep sparc
>>  #define sparc 1
>>  #define __sparc__ 1
>>  #define __sparc 1
>>
>>  The attached patch fixes this problem by renaming sparc to sparc_.
>
> the same thing happens with mips: "mips" is defined to be a numerical
> value on mips machines, and this breaks Triple.h.
>
> Ciao,
>
> Duncan.
>




More information about the llvm-dev mailing list