[MacPorts] #61717: sbcl: wrong reinplace on Xcode versions other than 8.0

MacPorts noreply at macports.org
Tue Dec 1 15:15:36 UTC 2020


#61717: sbcl: wrong reinplace on Xcode versions other than 8.0
------------------------+----------------------
 Reporter:  ryandesign  |      Owner:  easye
     Type:  defect      |     Status:  assigned
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:  2.6.4
 Keywords:              |       Port:  sbcl
------------------------+----------------------
 In [05b517c9376ce4dbecc03cc089beb09615c49dab/macports-ports] (see #51733)
 this code was added to the sbcl port:

 {{{
     # <https://trac.macports.org/attachment/ticket/51733/>
     # This change is required as the Xcode 8 linker now defaults to
     # PIE binaries regardless of the deployment target so an explicit
     # '-Wl,-no_pie' is now required. The rbcl program is incompatible
     # with ASLR and the previous upstream hack of setting the
     # deployment target to less than 10.7 doesn't prevent the PIE
     # executables from being created against the Xcode 8
     # linker. Tested on 10.11 with Xcode 8 beta.
     if {[vercmp "8.0" ${xcodeversion}] >= 0} {
         reinplace "s|0x100000|0x100000 -Wl,-no_pie|g"
 ${worksrcpath}/src/runtime/Config.x86-64-darwin
     }
 }}}

 It sounds like this change was made to fix a problem observed starting in
 Xcode 8.0 beta, with the intention that the change would be made in all
 Xcode versions 8.0 and greater, but the `vercmp` invocation is wrong, so
 it actually applies to all Xcode versions 8.0 and ''earlier''. The correct
 statement would be:

 {{{
     if {[vercmp ${xcodeversion} 8.0] >= 0} {
 }}}

 The change was made 4 years ago and apparently nobody has noticed, so
 maybe the change isn't actually needed on all Xcode versions greater than
 8.0. You may need to investigate to find what the correct fix is.

-- 
Ticket URL: <https://trac.macports.org/ticket/61717>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list