[MacPorts] #53931: clang's ld doesn't recognise "-lto_library" flag on 10.6

MacPorts noreply at macports.org
Thu Apr 20 20:47:31 UTC 2017


#53931: clang's ld doesn't recognise "-lto_library" flag on 10.6
-------------------------------------------------+-------------------------
  Reporter:  mojca                               |      Owner:  jeremyhu
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:  snowleopard
      Port:  clang-3.9 clang-4.0 llvm-3.9        |
  llvm-4.0                                       |
-------------------------------------------------+-------------------------

Comment (by michael-o0):

 Would like input as well, it makes 3.9 unusable:
 {{{
 $ cat main.c
 #include <stdio.h>

 int
 main (int argc, char **argv)
 {
         printf("Hello\n");
         return (0);
 }

 $ clang -v main.c
 clang version 3.9.1 (tags/RELEASE_391/final)
 Target: x86_64-apple-darwin10.8.0
 Thread model: posix
 InstalledDir: /opt/local/libexec/llvm-3.9/bin
  "/opt/local/libexec/llvm-3.9/bin/clang" -cc1 -triple x86_64-apple-
 macosx10.6.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage
 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-
 names -main-file-name main.c -mrelocation-model pic -pic-level 2 -mthread-
 model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu
 core2 -target-linker-version 136 -v -dwarf-column-info -debugger-
 tuning=lldb -resource-dir
 /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1 -fdebug-compilation-dir
 /Users/m -ferror-limit 19 -fmessage-length 194 -stack-protector 1 -fblocks
 -fobjc-runtime=macosx-10.6.0 -fencode-extended-block-signature -fmax-type-
 align=16 -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/MT
 /MTiEpDjxGZOrGNo6rf-bGk+++TI/-Tmp-/main-ceb961.o -x c main.c
 clang -cc1 version 3.9.1 based upon LLVM 3.9.1 default target x86_64
 -apple-darwin10.8.0
 ignoring nonexistent directory "/usr/local/include"
 #include "..." search starts here:
 #include <...> search starts here:
  /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/include
  /usr/include
  /System/Library/Frameworks (framework directory)
  /Library/Frameworks (framework directory)
 End of search list.
  "/opt/local/libexec/llvm-3.9/bin/ld" -demangle -lto_library
 /opt/local/libexec/llvm-3.9/lib/libLTO.dylib -dynamic -arch x86_64
 -macosx_version_min 10.6.0 -o a.out -lcrt1.10.6.o /var/folders/MT
 /MTiEpDjxGZOrGNo6rf-bGk+++TI/-Tmp-/main-ceb961.o -lSystem
 /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/lib/darwin/libclang_rt.osx.a
 ld: library not found for -lto_library
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)

 $ ls -al /opt/local/libexec/llvm-3.9/lib/libLTO.dylib
 -rwxr-xr-x  1 root  admin  179892 Apr 19 17:07
 /opt/local/libexec/llvm-3.9/lib/libLTO.dylib

 $ uname -a
 Darwin m.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36
 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/53931#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list