[LLVMdev] What is the canonical way to build on Solaris 10?

Jiawei Ye leafy7382 at gmail.com
Sat Sep 25 20:28:57 PDT 2010


Hi,

I am trying to get r114797 to build on Solaris 10u6 (5.10
Generic_142901-03).

gcc 4.2 is installed and configured with:

-bash-3.00$ /opt/gcc4/bin/gcc -v
Using built-in specs.
Target: i386-pc-solaris2.10
Configured with: ./configure --prefix=/opt/gcc4 --with-gnu-as
--with-as=/usr/sfw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld
--enable-shared --enable-languages=c,c++
Thread model: posix
gcc version 4.2.2

llvm/clang is configured with:

CC=/opt/gcc4/bin/gcc CXX=/opt/gcc4/bin/g++ INSTALL=/usr/ucb/install
NM=/usr/sfw/bin/gnm ./configure --enable-targets=host

But it ran into the follow compilation error:

gmake -C lto all
gmake[2]: Entering directory `/app/user/work-area-leafy/llvm/tools/lto'
llvm[2]: Linking Release Shared Library libLTO.so
/opt/gcc4/bin/g++ -I/app/user/work-area-leafy/llvm/include
-I/app/user/work-area-leafy/llvm/tools/lto  -DNDEBUG -include
llvm/System/Solaris.h -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
-D__STDC_CONSTANT_MACROS -O3 -fomit-frame-pointer -fno-exceptions -fno-rtti
-fPIC -Woverloaded-virtual -Wcast-qual      -pedantic -Wno-long-long -Wall
-W -Wno-unused-parameter -Wwrite-strings  -O3 -Wl,-R -Wl,'$ORIGIN'
-L/app/user/work-area-leafy/llvm/Release/lib
-L/app/user/work-area-leafy/llvm/Release/lib  -shared -o
/app/user/work-area-leafy/llvm/Release/lib/libLTO.so
/app/user/work-area-leafy/llvm/tools/lto/Release/LTOCodeGenerator.o
/app/user/work-area-leafy/llvm/tools/lto/Release/LTOModule.o
/app/user/work-area-leafy/llvm/tools/lto/Release/lto.o \
   -lLLVMBitWriter -lLLVMLinker -lLLVMArchive -lLLVMBitReader -lLLVMipo
-lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG
-lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts
-lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget
-lLLVMCore -lLLVMX86AsmPrinter -lLLVMMC -lLLVMX86Info -lLLVMSupport
-lLLVMSystem -lpthread -lmalloc -lm
ld: fatal: relocation error: R_386_GOTOFF: file
/app/user/work-area-leafy/llvm/Release/lib/libLLVMX86CodeGen.a(X86AsmPrinter.o):
symbol
llvm::RegisterAsmPrinter<llvm::X86AsmPrinter>::Allocator(llvm::TargetMachine&,
llvm::MCStreamer&): relocation must bind locally
collect2: ld returned 1 exit status
gmake[2]: *** [/app/user/work-area-leafy/llvm/Release/lib/libLTO.so] Error 1
gmake[2]: Leaving directory `/app/user/work-area-leafy/llvm/tools/lto'
gmake[1]: *** [lto/.makeall] Error 2
gmake[1]: Leaving directory `/app/user/work-area-leafy/llvm/tools'
gmake: *** [all] Error 1

Am I missing something here?

-CW

-- 
"If it looks like a duck, walks like a duck, and quacks like a duck, then to
the end user it's a duck, and end users have made it pretty clear they want
a duck; whether the duck drinks hot chocolate or coffee is irrelevant."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100926/9e3892d0/attachment.html>


More information about the llvm-dev mailing list