[LLVMdev] Compiling llvm and Clang in solaris 10

Jorge Rodrigues skeept at gmail.com
Mon Jun 24 15:17:41 PDT 2013


Norm,

thanks for the help. Applying the fix solves the issue I mentioned but now
I have more issues.

 I can install clang, but when running I cannot compile and link files.
If I compile with -c flag it works but compiling the following x.c file
gives an error:

x.c:
int main(void)
{
  return 0;
}

> ./clang x.c
/project/helder/scratch/packages2/bin/ld: unrecognized option '-C'
/project/helder/scratch/packages2/bin/ld: use the --help option for usage
information
clang: error: linker command failed with exit code 1 (use -v to see
invocation)


> ./clang -v x.c
clang version 3.3 (tags/RELEASE_33/final)
Target: i386-pc-solaris2.10
Thread model: posix
 "/project/helder/scratch/packages2/clang/bin/clang" -cc1 -triple
i386-pc-solaris2.10 -emit-obj -mrelax-all -disable-free -main-file-name x.c
-mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.23 -v
-resource-dir /project/helder/scratch/packages2/clang/bin/../lib/clang/3.3
-fdebug-compilation-dir /project/helder/scratch/packages2/clang/bin
-ferror-limit 19 -fmessage-length 145 -mstackrealign -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fdiagnostics-show-option
-fcolor-diagnostics -backend-option -vectorize-loops -o /tmp/x-Owaa.H.o -x
c x.c
clang -cc1 version 3.3 based upon LLVM 3.3 default target
i386-pc-solaris2.10
ignoring nonexistent directory "/usr/local/include"
#include "..." search starts here:
#include <...> search starts here:
 /project/helder/scratch/packages2/clang/bin/../lib/clang/3.3/include
 /usr/include
End of search list.
 "/project/helder/scratch/packages2/bin/ld" -C -e _start -Bdynamic
--dynamic-linker /usr/lib/ld.so.1 -o a.out /usr/lib/crt1.o /usr/lib/crti.o
/usr/lib/values-Xa.o
/usr/gcc/4.5/lib/gcc/i386-pc-solaris2.10/4.5.2/crtbegin.o
-L/usr/gcc/4.5/lib/gcc/i386-pc-solaris2.10/4.5.2/ /tmp/x-Owaa.H.o -lgcc_s
-lgcc -lc -lm /usr/gcc/4.5/lib/gcc/i386-pc-solaris2.10/4.5.2/crtend.o
/usr/lib/crtn.o
/project/helder/scratch/packages2/bin/ld: unrecognized option '-C'
/project/helder/scratch/packages2/bin/ld: use the --help option for usage
information
clang: error: linker command failed with exit code 1 (use -v to see
invocation)

Any idea on how to solve this?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130624/d7432fcf/attachment.html>


More information about the llvm-dev mailing list