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

MacPorts noreply at macports.org
Sat Jul 1 03:06:07 UTC 2017


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

Comment (by jeremyhu):

 Replying to [comment:23 kencu]:
 > Jeremy - the revbump might work but I don't think so - but I was too
 verbose above.
 >
 > Short short short answer is ld64-127 (the current 10.6 default ld64)
 doesn't understand the flag `-lto-library`. And clang-3.9.1 uses this by
 default.

 No.  clang-3.9.1 uses it if the value of -mlinker-version= is >= 133, and
 if -mlinker-version= is not passed in explicitly, it uses the version of
 ld that was present at build time.

 > I had ld64-136 installed previously (before the regression).

 Exactly.  clang-3.9 was built when ld64-136 was active.  When it was
 downgraded to 127, you hit this problem because clang assumed it had
 version 136.

 Revbumping forces a rebuild with ld64-127 active and thus clang-3.9 won't
 pass it on such installs.

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


More information about the macports-tickets mailing list