[MacPorts] #57612: clang does not respect -syslibroot when linking

MacPorts noreply at macports.org
Sun Nov 25 16:41:41 UTC 2018


#57612: clang does not respect -syslibroot when linking
---------------------+--------------------
  Reporter:  kencu   |      Owner:  (none)
      Type:  defect  |     Status:  new
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:
Resolution:          |   Keywords:
      Port:          |
---------------------+--------------------

Comment (by kencu):

 If we put `-isysroot` into the LDFLAGS directly, and that somehow gets
 passed to `ld` by some port build system without being processed through
 clang, `ld` will error out.
 {{{
 ld
 -isysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
 ld: unknown option:
 -isysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
 }}}

 I'm going to do some testing to see what happens we set the `SDKROOT`
 envvar in MacPorts then, but leave everything else alone.

 If `clang` respects that envvar if set, and doesn't override it if it sees
 no -isysroot being passed, we could do that instead and change very little
 else in `portconfigure.tcl`.

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


More information about the macports-tickets mailing list