[PATCH] [CMake/PPC64]: Add -mminimal-toc to CFLAGS if compiler is gcc < 4.6 on powerpc64

Richard Sandiford rsandifo at linux.vnet.ibm.com
Thu Jun 6 01:19:04 PDT 2013


Hi Kai,

Kai Nacke <kai.nacke at redstar.de> writes:
> On 01.06.2013 21:17, Kai Nacke wrote:
>> Hi!
>>
>> To compile LLVM with gcc < 4.6 on a powerpc64 platform you have to add
>> -mminimal-toc to CFLAGS / CXXFLAGS. Otherwise you get strange linker
>> errors.

Just wondering, are you using Darwin?  In theory, this ought to have been
fixed for GNU/Linux in 4.2, but the fix was only ported to Darwin for 4.6.

Either way, I imagine most GNU/Linux users compiling 3.4 LLVM would be
using gcc >= 4.6 anyway, so the check looks reasonable to me.  I'm no
powerpc or cmake expert though, so that can't really count as a review...

Thanks,
Richard




More information about the llvm-commits mailing list