[LLVMdev] Is the option --enable-shared discontinued in 2.7?

Yuri yuri at tsoft.com
Fri May 7 16:29:40 PDT 2010


Jeffrey Yasskin wrote:
> That's odd. On Linux, g++ adds -lc to the end of the link line itself.
> It must be adding -lstdc++ for you too, or you'd have more missing
> symbols. If you run that command with "-v", it'll show you the actual
> link line, but given your errors it does seem like -lc is missing. I
> don't think it'll hurt anyone else to add that, so I'll try it.
>
> I assume builds without --enable-shared do work for you? If so, I
> wonder why g++ would omit -lc for shared links but not executable
> links?
>   

Jeffrey,

There is one more thing:
there is no complete debug info in libLLVM-2.7.so when built with flags: 
--enable-assertions --enable-shared --enable-libffi 
--enable-debug-runtime --enable-debug-symbols --disable-optimized, at 
least not on FreeBSD.

I use, as we discussed before, two attached patches to make shared lib 
build on FreeBSD.

Resulting library has the size ~22MB. Same size as the Release one.
Debugger refuses to enter functions: no debug info.

libLLVM-2.7.so with the full debug info is ~158MB.

I don't know why this command would loose debug info.

Yuri


--- command that makefile runs to build debug libLLVM-2.7.so ---

/usr/local/gcc/4.5.0/bin/g++ -I/tmp/llvm-build/2.7/llvm-objects/include 
-I/tmp/llvm-build/2.7/llvm-objects/tools/llvm-shlib 
-I/tmp/llvm-build/2.7/llvm/include 
-I/tmp/llvm-build/2.7/llvm/tools/llvm-shlib  -D_DEBUG -D_GNU_SOURCE 
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -g -fno-exceptions 
-fno-rtti -fPIC -Woverloaded-virtual  -L/usr/local/lib   -pedantic 
-Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings  -g -Wl,-R 
-Wl,/tmp/llvm-build/2.7/llvm-objects/Debug/lib 
-L/tmp/llvm-build/2.7/llvm-objects/Debug/lib 
-L/tmp/llvm-build/2.7/llvm-objects/Debug/lib  -shared -lc -o 
/tmp/llvm-build/2.7/llvm-objects/Debug/lib/libLLVM-2.7.so  \
           -Wl,--whole-archive -lLLVMARMAsmParser -lLLVMARMAsmPrinter 
-lLLVMARMCodeGen -lLLVMARMInfo -lLLVMAlphaAsmPrinter -lLLVMAlphaCodeGen 
-lLLVMAlphaInfo -lLLVMAnalysis -lLLVMArchive -lLLVMAsmParser 
-lLLVMAsmPrinter -lLLVMBitReader -lLLVMBitWriter 
-lLLVMBlackfinAsmPrinter -lLLVMBlackfinCodeGen -lLLVMBlackfinInfo 
-lLLVMCBackend -lLLVMCBackendInfo -lLLVMCellSPUAsmPrinter 
-lLLVMCellSPUCodeGen -lLLVMCellSPUInfo -lLLVMCodeGen -lLLVMCore 
-lLLVMCppBackend -lLLVMCppBackendInfo -lLLVMExecutionEngine 
-lLLVMInstCombine -lLLVMInstrumentation -lLLVMInterpreter -lLLVMJIT 
-lLLVMLinker -lLLVMMBlazeAsmPrinter -lLLVMMBlazeCodeGen -lLLVMMBlazeInfo 
-lLLVMMC -lLLVMMCParser -lLLVMMSIL -lLLVMMSILInfo -lLLVMMSP430AsmPrinter 
-lLLVMMSP430CodeGen -lLLVMMSP430Info -lLLVMMipsAsmPrinter 
-lLLVMMipsCodeGen -lLLVMMipsInfo -lLLVMPIC16AsmPrinter 
-lLLVMPIC16CodeGen -lLLVMPIC16Info -lLLVMPowerPCAsmPrinter 
-lLLVMPowerPCCodeGen -lLLVMPowerPCInfo -lLLVMScalarOpts 
-lLLVMSelectionDAG -lLLVMSparcAsmPrinter -lLLVMSparcCodeGen 
-lLLVMSparcInfo -lLLVMSupport -lLLVMSystem -lLLVMSystemZAsmPrinter 
-lLLVMSystemZCodeGen -lLLVMSystemZInfo -lLLVMTarget -lLLVMTransformUtils 
-lLLVMX86AsmParser -lLLVMX86AsmPrinter -lLLVMX86CodeGen 
-lLLVMX86Disassembler -lLLVMX86Info -lLLVMXCoreAsmPrinter 
-lLLVMXCoreCodeGen -lLLVMXCoreInfo -lLLVMipa -lLLVMipo -lLLVMpic16passes 
-Wl,--no-whole-archive -Wl,--no-undefined -lpthread -lffi -lm
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: llvm-patch-so.diff
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100507/0d650843/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: issue968046_1.diff
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100507/0d650843/attachment-0001.ksh>


More information about the llvm-dev mailing list