[llvm-commits] llvm on ppc/linux

Dale Johannesen dalej at apple.com
Mon Nov 12 15:17:14 PST 2007


On Nov 12, 2007, at 2:56 PM, Eric Christopher wrote:

>
> On Nov 10, 2007, at 7:48 PM, Nick Lewycky wrote:
>
>> This patch to llvm-gcc 4.0 allows it to compile on PPC/Linux. This
>> is a combination of patchs from myself, Dale Johannesen, and the
>> fact that a GTY can't be declared in an #ifdef from Andrew Pinski.
>>
>> I'd appreciate some testing. More importantly to make sure that this
>> doesn't break Darwin on PPC, but also anyone else who's interested
>> in running LLVM on their PPC Linux boxes.
>>
>> The second attachment is the result of a nightly test on PPC/Linux,
>> after applying this patch.
>
> Index: gcc/config/rs6000/linux.h
>
> I don't think this part can possibly be correct, there's no mac68k
> alignment for ppc linux. The proper version of ADJUST_FIELD_ALIGN is
> in 4.2 and is:
>
> /* An expression for the alignment of a structure field FIELD if the
>     alignment computed in the usual way is COMPUTED.  */
> #define ADJUST_FIELD_ALIGN(FIELD,   
> COMPUTED)                                   \
>          ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) ==   
> VECTOR_TYPE)     \
>           ? 128 : COMPUTED)
>
> (note that there's a different one for ppc64-linux)

However proper that may be, it will not work.  llvm-gcc-4.0 is based on
Apple's 4.0, and ADJUST_FIELD_ALIGN has 3 arguments.

I am testing Nick's patch on ppc32 Darwin and plan to check in if it  
looks like that was not broken.





More information about the llvm-commits mailing list