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

MacPorts noreply at macports.org
Fri Apr 21 00:15:44 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 kencu):

 I have a slightly older clang-3.9.0 installed on 10.6, and it works fine.
 I pegged it at that version a few months ago, and pegged ld64 at that time
 too.

 It looks like the `/opt/local/libexec/llvm-3.9/bin/ld` phase of my build
 does not include an `-lto_library` flag, whereas yours does. I'm not
 certain whether that request comes in from clang-3.9, or whether it's a
 function of ld64 (both of which have been updated several times since Dec
 2016 when I pegged them last). But at least it's a clue, I hope.



 {{{
 $ clang --version
 clang version 3.9.0 (tags/RELEASE_390/final)
 Target: x86_64-apple-darwin10.8.0
 Thread model: posix
 InstalledDir: /opt/local/libexec/llvm-3.9/bin


 $ clang -v main.c
 clang version 3.9.0 (tags/RELEASE_390/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 264.3.102 -v -dwarf-column-info -debugger-
 tuning=lldb -resource-dir
 /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.0 -fdebug-compilation-dir
 /Users/cunningh/Desktop/test -ferror-limit 19 -fmessage-length 80 -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/I0/I0fOotq3ErGZHYxrmmWiqU+++TI/-Tmp-/main-
 6686d8.o -x c main.c
 clang -cc1 version 3.9.0 based upon LLVM 3.9.0 default target x86_64
 -apple-darwin10.8.0
 #include "..." search starts here:
 #include <...> search starts here:
  /usr/local/include
  /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.0/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 -dynamic -arch x86_64
 -macosx_version_min 10.6.0 -o a.out -lcrt1.10.6.o
 /var/folders/I0/I0fOotq3ErGZHYxrmmWiqU+++TI/-Tmp-/main-6686d8.o -lSystem
 /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.0/lib/darwin/libclang_rt.osx.a
 }}}

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


More information about the macports-tickets mailing list