Sorry to bump this again, but I think it deserves to make the release
since the bug is important and the fix is easy (a similar one is already
used to avoid using SSE2)...

> I think this deserves a bump...
>
>> Hi,
>>
>> It seems clang is almost unusuable on old macppc boxes such as my G3
>> B&W, which doesn't have Altivec support.
>>
>> This compiles OK:
>>   int main() { return 0; }
>>
>> but this crashes:
>>   /* Same thing, but with a comment. */
>>   int main() { return 0; }
>>
>> with the following error:
>>   Stack dump:
>>   0.      Program arguments:
>>   /usr/local/bin/clang -cc1 -triple powerpc-unknown-openbsd4.9 -S
>>   -disable-free -disable-llvm-verifier -main-file-name test2.c
>>   -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
>>   -target-linker-version 2.15 -momit-leaf-frame-pointer -resource-dir
>>   /usr/local/bin/../lib/clang/2.9 -ferror-limit 19 -fmessage-length 0
>>   -fno-signed-char -fgnu-runtime -fdiagnostics-show-option -o
>>   /tmp/cc-hLpenZ.s -x c test2.c
>>   1.      <unknown> parser at unknown
>>   location clang: error: unable to execute command: Illegal instruction
>>   (core dumped) clang: error: clang frontend command failed due to
>>   signal 1 (use -v to see invocation)
>>
>> I see there this a patch in the port [1] which undef's __SSE2__ so I
>> guess the same thing should be done for __ALTIVEC__. Unfortunately,
>> it wasn't possible for me to test the patch, since it would take forever
>> to compile on such an old box. But I guess the issue is here.
>>
>> I'd gladly test any new package built with this patch on my G3, if it
>> helps.
>>
>> Tsomi.
>>
>> [1] patch-tools_clang_lib_Lex_Lexer_cpp
>>
>> Index: devel/llvm/patches/patch-tools_clang_lib_Lex_Lexer_cpp
>> ===================================================================
>> RCS file:
>> /cvs/ports/devel/llvm/patches/patch-tools_clang_lib_Lex_Lexer_cpp,v
>> retrieving revision 1.6
>> diff -u -p -r1.6 patch-tools_clang_lib_Lex_Lexer_cpp
>> --- devel/llvm/patches/patch-tools_clang_lib_Lex_Lexer_cpp   13 Jan 2011
>> 00:15:50 -0000       1.6
>> +++ devel/llvm/patches/patch-tools_clang_lib_Lex_Lexer_cpp   26 Jun 2011
>> 12:41:36 -0000
>> @@ -1,10 +1,11 @@
>>  $OpenBSD: patch-tools_clang_lib_Lex_Lexer_cpp,v 1.6 2011/01/13 00:15:50
>> jeremy Exp $
>> ---- tools/clang/lib/Lex/Lexer.cpp.orig      Tue Aug 31 09:42:00 2010
>> -+++ tools/clang/lib/Lex/Lexer.cpp   Thu Jan  6 11:26:07 2011
>> -@@ -1334,6 +1334,7 @@ static bool
>> isEndOfBlockCommentWithEscapedNewLine(cons
>> +--- tools/clang/lib/Lex/Lexer.cpp.orig      Mon Feb 28 03:37:51 2011
>> ++++ tools/clang/lib/Lex/Lexer.cpp   Sun Jun 26 14:39:38 2011
>> +@@ -1516,6 +1516,8 @@ static bool
>> isEndOfBlockCommentWithEscapedNewLine(cons
>>     return true;
>>   }
>>
>> ++#undef __ALTIVEC__
>>  +#undef __SSE2__
>>   #ifdef __SSE2__
>>   #include <emmintrin.h>
>>
>

Reply via email to