> On Fri, Jun 01, 2012 at 12:54:57PM -0600, ryan baird wrote:<br>> ><br>
> > I trid to run clang with the following arguments, which I was previously<br>
> > using on a machine that already had the llvm environment:<br>
> >  clang -v<br>
> > -I/home/ryan/llvm/src/R31/final/projects/compiler-rt/SDKs/linux/usr/include<br>
> > -mfloat-abi=hard -ccc-host-triple mipsel-unknown-linux -ccc-clang-archs<br>
> > mipsel -S -emit-llvm $1 -o "$NAME.ll"<br>
> <br>
> Try using --sysroot /home/ryan/llvm/src/R31/final/projects/compiler-rt/SDKs/linux<br>
> <br>
> Joerg<br><br>I tried adding the configuration options you suggested, and it gave me this output: <br><br><br>clang version 3.1 (tags/RELEASE_31/final 157818)<br>Target: mipsel-unknown-linux<br>Thread model: posix<br>
 "/home/ryan/llvm/build/R31/Debug+Asserts/bin/clang" -cc1 -triple mipsel-unknown-linux -emit-llvm -disable-free -main-file-name hello.c -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases -target-cpu mips32 -target-abi o32 -mfloat-abi hard -target-linker-version 2.20.51.0.2 -momit-leaf-frame-pointer -v -coverage-file hello.ll -resource-dir /home/ryan/llvm/build/R31/Debug+Asserts/bin/../lib/clang/3.1 -I /home/ryan/llvm/src/R31/final/projects/compiler-rt/SDKs/linux/usr/include -isysroot /home/ryan/llvm/src/R31/final/projects/compiler-rt/SDKs/linux -fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem /home/ryan/llvm/src/R31/final/projects/compiler-rt/SDKs/linux/usr/local/include -internal-isystem /home/ryan/llvm/build/R31/Debug+Asserts/bin/../lib/clang/3.1/include -internal-externc-isystem /home/ryan/llvm/src/R31/final/projects/compiler-rt/SDKs/linux/include -internal-externc-isystem /home/ryan/llvm/src/R31/final/projects/compiler-rt/SDKs/linux/usr/include -fno-dwarf-directory-asm -fdebug-compilation-dir /home/ryan -ferror-limit 19 -fmessage-length 80 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -o hello.ll -x c hello.c<br>
clang -cc1 version 3.1 based upon LLVM 3.1 default target x86_64-unknown-linux-gnu<br>ignoring nonexistent directory "/home/ryan/llvm/src/R31/final/projects/compiler-rt/SDKs/linux/usr/local/include"<br>ignoring nonexistent directory "/home/ryan/llvm/src/R31/final/projects/compiler-rt/SDKs/linux/include"<br>
ignoring duplicate directory "/home/ryan/llvm/src/R31/final/projects/compiler-rt/SDKs/linux/usr/include"<br>  as it is a non-system directory that duplicates a system directory<br>#include "..." search starts here:<br>
#include <...> search starts here:<br> /home/ryan/llvm/build/R31/Debug+Asserts/bin/../lib/clang/3.1/include<br> /home/ryan/llvm/src/R31/final/projects/compiler-rt/SDKs/linux/usr/include<br>End of search list.<br>hello.c:4:3: warning: implicitly declaring library function 'printf' with type<br>
      'int (const char *, ...)'<br>  printf("Test\n");<br>  ^<br>hello.c:4:3: note: please include the header <stdio.h> or explicitly provide a<br>      declaration for 'printf'<br>1 warning generated.<br>
<br><br>This successfully generates the code, but it indicates that it did not correctly include <stdio.h> when compiling; even though the first line of my file is #include <stdio.h>, it tells me to include the header <stdio.h>.  This is a sign that something is still not working.  Any ideas?<br>