On 5/26/2012 6:53 PM, Stuart Henderson wrote:
BTW it would be nice if somebody could add to ONLY_FOR_ARCHS
and try this on some of the various mips arch. Don't forget to
log the build. (It's in the tree now).
LLVM-3.1 builds successfully on loongson (it has for a while now,
actually, since at least a few versions ago I've been doing it). But
clang fails to compile even a simple Hello World.
clang --version does report correctly, for what that's worth.
Here's the runup of clang trying to compile Hello World. I'm in the
process of trying a few patches, so I'll post a coredump tomorrow after
I recompile a vanilla llvm-3.1
Terminal output (which was 'clang -v hw.c'):
clang version 3.1 (branches/release_31)
Target: mips64el-unknown-openbsd5.1
Thread model: posix
"/usr/local/bin/clang-3.1" -cc1 -triple mips64el-unknown-openbsd5.1 -S
-disable-free -disable-llvm-verifier -main-file-name hw.c
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
-target-cpu mips64 -target-abi n64 -mfloat-abi hard
-momit-leaf-frame-pointer -v -resource-dir
/usr/local/bin/../lib/clang/3.1 -fmodule-cache-path
/var/tmp/clang-module-cache -fno-dwarf-directory-asm -ferror-limit 19
-fmessage-length 0 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc
-fobjc-runtime-has-weak -fdiagnostics-show-option -o /tmp/hw-sPizWW.s -x
c hw.c
clang -cc1 version 3.1 based upon LLVM 3.1svn default target
mips64el-unknown-openbsd5.1
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/local/bin/../lib/clang/3.1/include
/usr/include
End of search list.
Stack dump:
0. Program arguments: /usr/local/bin/clang-3.1 -cc1 -triple
mips64el-unknown-openbsd5.1 -S -disable-free -disable-llvm-verifier
-main-file-name hw.c -mrelocation-model static -mdisable-fp-elim
-mconstructor-aliases -target-cpu mips64 -target-abi n64 -mfloat-abi
hard -momit-leaf-frame-pointer -v -resource-dir
/usr/local/bin/../lib/clang/3.1 -fmodule-cache-path
/var/tmp/clang-module-cache -fno-dwarf-directory-asm -ferror-limit 19
-fmessage-length 0 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc
-fobjc-runtime-has-weak -fdiagnostics-show-option -o /tmp/hw-sPizWW.s -x
c hw.c
1. /usr/include/sys/endian.h:162:1: current parser token '__uint64_t'
clang-3: error: unable to execute command: Bus error (core dumped)
clang-3: error: clang frontend command failed due to signal (use -v to
see invocation)
clang-3: note: diagnostic msg: Please submit a bug report to and
include command line arguments and all diagnostic information.
clang-3: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang-3: note: diagnostic msg: /tmp/hw-pquwK2.i
clang-3: note: diagnostic msg: /tmp/hw-pquwK2.sh
/tmp/hw-pquwK2.i and /tmp/hw-pquwK2.sh are available here:
http://devio.us/~bcallah/hw-pquwK2.i
http://devio.us/~bcallah/hw-pquwK2.sh
Thanks.
~Brian