[LLVMdev] llvm-gcc build of inferno/plan 9 'mk' fails

James Northrup northrup.james at gmail.com
Fri Jul 31 00:08:04 PDT 2009

the number of working permutations of  [un]installing Xcode, iPhone  
API's, macports, and /usr/ocal/llvm[-gcc] builds seems always to  
dwindle, but does so without a clear point of consensus.

using native 'ld' has this effect:

#978$478 Fri 09073100:04:42 jim at bframe4:~/work/inferno
: CC=llvm-gcc-4.2  PATH=/usr/local/inferno/MacOSX/386/bin/:/opt/local/ 
bin:$PATH ./makemk.sh
ld -L/opt/local/lib -lpthread -lm /opt/local/lib/LLVMXCore.o /opt/ 
local/lib/LLVMSparcCodeGen.o /opt/local/lib/LLVMSparcAsmPrinter.o /opt/ 
local/lib/LLVMPowerPCAsmPrinter.o /opt/local/lib/LLVMPowerPCCodeGen.o / 
opt/local/lib/LLVMPIC16.o /opt/local/lib/LLVMMSIL.o /opt/local/lib/ 
LLVMMips.o -lLLVMLinker -lLLVMipo /opt/local/lib/LLVMInterpreter.o - 
lLLVMInstrumentation /opt/local/lib/LLVMIA64.o /opt/local/lib/ 
LLVMExecutionEngine.o /opt/local/lib/LLVMJIT.o -lLLVMDebugger /opt/ 
local/lib/LLVMCppBackend.o /opt/local/lib/LLVMCellSPUCodeGen.o /opt/ 
local/lib/LLVMCellSPUAsmPrinter.o /opt/local/lib/LLVMCBackend.o - 
lLLVMBitWriter /opt/local/lib/LLVMX86AsmPrinter.o /opt/local/lib/ 
LLVMX86CodeGen.o -lLLVMAsmParser /opt/local/lib/LLVMARMAsmPrinter.o / 
opt/local/lib/LLVMARMCodeGen.o -lLLVMArchive -lLLVMBitReader /opt/ 
local/lib/LLVMAlphaCodeGen.o -lLLVMSelectionDAG /opt/local/lib/ 
LLVMAlphaAsmPrinter.o -lLLVMAsmPrinter -lLLVMCodeGen -lLLVMScalarOpts - 
lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMCore - 
lLLVMSupport -lLLVMSystem -o mk Posix.o sh.o arc.o archive.o  
bufblock.o env.o file.o graph.o job.o lex.o main.o match.o mk.o  
parse.o recipe.o rule.o run.o shprint.o symtab.o var.o varsub.o  
word.o /usr/local/inferno/MacOSX/386/lib/libregexp.a /usr/local/ 
inferno/MacOSX/386/lib/libbio.a /usr/local/inferno/MacOSX/386/lib/lib9.a
ld: in Posix.o, could not parse object file Posix.o: Unknown  
instruction for inferred architecture i386
mk link failed

On Jul 30, 2009, at 11:26 PM, Eli Friedman wrote:

> On Thu, Jul 30, 2009 at 11:03 PM, james
> northrup<northrup.james at gmail.com> wrote:
>> CC="p llvm-gcc-4.2 `llvm-config --cflags` -march=i386  --emit-llvm - 
>> O0
>>  -c -I$PLAT/include -I$ROOT/include -I$ROOT/utils/    include"
>> LD="p llvm-ld `llvm-config --ldflags --libs all  `"
>> AR="p llvm-ar crvs"
> Using llvm-ar+llvm-ld is likely to give you bad results.  On Mac,
> AFAIK, the native ar and ld should do the right thing with bitcode
> files, assuming you have relatively recent versions; I don't know the
> details, though, since I don't have a Mac.
> -Eli
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

More information about the llvm-dev mailing list