Opened 4 years ago

Closed 17 months ago

#61717 closed defect (fixed)

sbcl: wrong reinplace on Xcode versions other than 8.0

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: easye
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc: jwhowarth
Port: sbcl

Description

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.

Change History (1)

comment:1 Changed 17 months ago by catap (Kirill A. Korinsky)

Resolution: fixed
Status: assignedclosed

In a3cf7fd3e526e62a9437521c1b34228447249293/macports-ports (master):

sbcl: update to 2.3.5; pin for old macOS; add myself as co-maintainer

I also fixed build on old macOS

Closes: #61717
Closes: #65188
Closes: #65484
Closes: #66002

Note: See TracTickets for help on using tickets.