[cfe-dev] linking question
रजनीश
rdogra at earthlink.net
Sun Mar 29 20:06:33 PDT 2009
Sorry for what might be naive question.
So I have the following command:
/usr/bin/g++ -I. -I./include -I/usr/include/libxml2 -arch i386 -fno-
common -pipe -O3 -g -Wall -fexceptions -Wno-parentheses -Wno-
deprecated-declarations -Werror array.o bignum.o class.o compar.o
complex.o enum.o enumerator.o error.o eval.o file.o load.o proc.o gc.o
hash.o inits.o io.o math.o numeric.o object.o pack.o parse.o prec.o
dir.o process.o random.o range.o rational.o re.o regcomp.o regenc.o
regerror.o regexec.o regparse.o regsyntax.o ruby.o set.o signal.o
sprintf.o st.o string.o struct.o time.o transcode.o util.o variable.o
version.o thread.o id.o objc.o bs.o encoding.o main.o dln.o dmyext.o
enc/ascii.o vm_eval.o miniprelude.o gc-stub.o roxor.o -L/Volumes/Rafi/
llvm/Release/lib -lpthread -lm /Volumes/Rafi/llvm/Release/lib/
LLVMX86CodeGen.o -lLLVMSelectionDAG -lLLVMAsmPrinter /Volumes/Rafi/
llvm/Release/lib/LLVMExecutionEngine.o /Volumes/Rafi/llvm/Release/lib/
LLVMJIT.o -lLLVMCodeGen -lLLVMScalarOpts -lLLVMTransformUtils -
lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMCore -lLLVMSupport -
lLLVMSystem -lpthread -ldl -lxml2 -lobjc -lffi -lauto -framework
Foundation -o miniruby
And when I replace g++ with clang, I get a lot of unresolved symbols
pertaining to c++ objects in one .o file (rest of .o are created via
clang).
Is this reasonable or am I doing something wrong?
I did notice that -flto and -O4 is disabled in clang. Is this going
to be in for 1.0?
I want to try to see if it makes any difference on the above. Do I
need to update my system ld with what?
More information about the cfe-dev
mailing list