[MacPorts] #39761: llvm-3.3 can't link on Leopard/PPC

MacPorts noreply at macports.org
Fri Jul 26 01:36:32 PDT 2013


#39761: llvm-3.3 can't link on Leopard/PPC
------------------------+-----------------------------
  Reporter:  khepler@…  |      Owner:  jeremyhu@…
      Type:  defect     |     Status:  reopened
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.1.3
Resolution:             |   Keywords:  leopard powerpc
      Port:  llvm-3.3   |
------------------------+-----------------------------

Comment (by braumann@…):

 Replying to [comment:10 jeremyhu@…]:
 >
 > Yes, add -mlongcall along with -Os (search for -Os in the Portfile).

 I have added this to the Portfile

 {{{
         configure.args-append --with-extra-options=-mlongcall
 }}}
 just next to the existing entry
 {{{
         # http://trac.macports.org/ticket/33987
         configure.args-append --with-optimize-option=-Os
 }}}
 However, it basically ends up in the same final error
 {{{
 ld: bl out of range (-16991880 max is +/-16M)
 }}}
 Without -mlongcall the overflow message twice was
 {{{
 ld: bl out of range (-16936552 max is +/-16M)
 }}}
 So, there was some effect, but seemingly too little. What is new is a
 series complaints which might indicate that the -mlongcall idea is not
 really appropriate:
 {{{
 PPC_RELOC_JBSR should not be using an external relocation
 }}}
 This is my full error output concerning the linking phase, if you want to
 see more details:
 {{{
 llvm[1]: Linking Release+Debug+Asserts Shared Library libLLVM-3.3.dylib
 /usr/bin/g++-4.2
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.3/llvm-3.3/work/llvm-3.3.src/include
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.3/llvm-3.3/work/llvm-3.3.src/tools
 /llvm-shlib  -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS
 -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Os  -g -fvisibility-inlines-
 hidden -fno-exceptions -fno-common -Woverloaded-virtual -Wcast-qual -O2
 -arch ppc -O2 -arch ppc -Os -g -Wl,-rpath -Wl, at executable_path/../lib
 -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.3/llvm-3.3/work/llvm-3.3.src/Release+Debug+Asserts/lib
 -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.3/llvm-3.3/work/llvm-3.3.src/Release+Debug+Asserts/lib
 -arch ppc -arch ppc -mmacosx-version-min=10.5  -pedantic -Wno-long-long
 -Wall -W -Wno-unused-parameter -Wwrite-strings -mlongcall    -Wno-missing-
 field-initializers  -dynamiclib -mmacosx-version-min=10.5 -o
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.3/llvm-3.3/work/llvm-3.3.src/Release+Debug+Asserts/lib/libLLVM-3.3.dylib
 \
            -lLLVMAArch64AsmParser -lLLVMAArch64AsmPrinter
 -lLLVMAArch64CodeGen -lLLVMAArch64Desc -lLLVMAArch64Disassembler
 -lLLVMAArch64Info -lLLVMAArch64Utils -lLLVMARMAsmParser
 -lLLVMARMAsmPrinter -lLLVMARMCodeGen -lLLVMARMDesc -lLLVMARMDisassembler
 -lLLVMARMInfo -lLLVMAnalysis -lLLVMArchive -lLLVMAsmParser
 -lLLVMAsmPrinter -lLLVMBitReader -lLLVMBitWriter -lLLVMCodeGen -lLLVMCore
 -lLLVMCppBackendCodeGen -lLLVMCppBackendInfo -lLLVMDebugInfo
 -lLLVMExecutionEngine -lLLVMHexagonAsmPrinter -lLLVMHexagonCodeGen
 -lLLVMHexagonDesc -lLLVMHexagonInfo -lLLVMIRReader -lLLVMInstCombine
 -lLLVMInstrumentation -lLLVMInterpreter -lLLVMJIT -lLLVMLinker
 -lLLVMMBlazeAsmParser -lLLVMMBlazeAsmPrinter -lLLVMMBlazeCodeGen
 -lLLVMMBlazeDesc -lLLVMMBlazeDisassembler -lLLVMMBlazeInfo -lLLVMMC
 -lLLVMMCDisassembler -lLLVMMCJIT -lLLVMMCParser -lLLVMMSP430AsmPrinter
 -lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMipsAsmParser
 -lLLVMMipsAsmPrinter -lLLVMMipsCodeGen -lLLVMMipsDesc
 -lLLVMMipsDisassembler -lLLVMMipsInfo -lLLVMNVPTXAsmPrinter
 -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc -lLLVMNVPTXInfo -lLLVMObjCARCOpts
 -lLLVMObject -lLLVMOption -lLLVMPowerPCAsmParser -lLLVMPowerPCAsmPrinter
 -lLLVMPowerPCCodeGen -lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMRuntimeDyld
 -lLLVMScalarOpts -lLLVMSelectionDAG -lLLVMSparcCodeGen -lLLVMSparcDesc
 -lLLVMSparcInfo -lLLVMSupport -lLLVMSystemZAsmParser
 -lLLVMSystemZAsmPrinter -lLLVMSystemZCodeGen -lLLVMSystemZDesc
 -lLLVMSystemZInfo -lLLVMTarget -lLLVMTransformUtils -lLLVMVectorize
 -lLLVMX86AsmParser -lLLVMX86AsmPrinter -lLLVMX86CodeGen -lLLVMX86Desc
 -lLLVMX86Disassembler -lLLVMX86Info -lLLVMX86Utils -lLLVMXCoreAsmPrinter
 -lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreDisassembler -lLLVMXCoreInfo
 -lLLVMipa -lLLVMipo -all_load -Wl,-dead_strip -Wl,-seg1addr -Wl,0xE0000000
 -Wl,-install_name -Wl,"@executable_path/../lib/libLLVM-3.3.dylib" -lz
 -lpthread -lffi -lm
 PPC_RELOC_JBSR should not be using an external relocationPPC_RELOC_JBSR
 should not be using an external relocationPPC_RELOC_JBSR should not be
 using an external relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external
 relocationPPC_RELOC_JBSR should not be using an external relocationld: bl
 out of range (-16991880 max is +/-16M) from llvm::EmitStrLen(llvm::Value*,
 llvm::IRBuilder<true, llvm::ConstantFolder,
 llvm::IRBuilderDefaultInserter<true> >&, llvm::DataLayout const*,
 llvm::TargetLibraryInfo const*)at 0xE1048A00 in __text of
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.3/llvm-3.3/work/llvm-3.3.src/Release+Debug+Asserts/lib/libLLVMTransformUtils.a(BuildLibCalls.o)
 to llvm::Twine::Twine(char const*)at 0xE0014700 in __text of
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.3/llvm-3.3/work/llvm-3.3.src/Release+Debug+Asserts/lib/libLLVMAArch64AsmParser.a(AArch64AsmParser.o)
 in llvm::EmitStrLen(llvm::Value*, llvm::IRBuilder<true,
 llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true> >&,
 llvm::DataLayout const*, llvm::TargetLibraryInfo const*)from
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.3/llvm-3.3/work/llvm-3.3.src/Release+Debug+Asserts/lib/libLLVMTransformUtils.a(BuildLibCalls.o)
 collect2: ld returned 1 exit status
 }}}
 > By removing targets, I mean disabling support for other targets that you
 probably don't need (eg: sparc, mips, etc).  My guess is that the addition
 of AArch64 in llvm-3.3 is what put this over the top.
 Well, how is the best way to let people deselect unwanted architectures
 (targets) like Sun Sparc etc? From the Portfile level, i.e. as soon as a
 32 bit PPC is identified, ancient Silicon Graphics and Sun get dropped?

 Anyway, I do hope that we manage to get llvm-3.3 to be built again on
 32bit PPC, thanks for any help!

-- 
Ticket URL: <https://trac.macports.org/ticket/39761#comment:12>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list