Re: [MacPorts] #70866: gcc14 doesn’t build for x86_64 on macOS 15 (Xcode 16): “Undefined symbols for architecture x86_64” while linking libgcc_s.1.dylib

MacPorts noreply at macports.org
Wed Sep 25 16:41:04 UTC 2024


#70866: gcc14 doesn’t build for x86_64 on macOS 15 (Xcode 16): “Undefined symbols
for architecture x86_64” while linking libgcc_s.1.dylib
---------------------------+-----------------------------------
  Reporter:  markmentovai  |      Owner:  (none)
      Type:  defect        |     Status:  new
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:
Resolution:                |   Keywords:  sonoma sequoia x86_64
      Port:  gcc14         |
---------------------------+-----------------------------------

Comment (by dbl001):

 {{{
 % patch -p1 < ~/Downloads/727cc2bddbd39fbad964d0f2e6eaf3be164e23e7.patch

 % cat libgcc/config.host.rej
 @@ -24,7 +24,7 @@

  # Remember to reset all revision increments below to 0 on new versions
  version             ${gcc_major_v}.2.0
 -revision            1
 +revision            2

  set libgccname      lib${name}
  subport             ${libgccname} { revision [ expr ${revision} + 0 ] }
 @@ -177,14 +177,17 @@
      if { ${os.major} == 18 } {
          patchfiles-append  patch-OSX10.14-ucred-atomic-define.diff
      }
 -    # TEMPORARY workaround for macOS15+. See
 -    #  https://trac.macports.org/ticket/70641
 -    # and upstream discussion at
 -    #  https://github.com/iains/gcc-darwin-arm64/issues/136
 -    # An upstream fix is likely not too far off, but in the meantime use
 -    # this workaround to provide users with a working build
 -    if { ${os.major} >= 24 } {
 -        patchfiles-append  patch-as_needs_dash_for_piped_input.diff
 +
 +    # Additional macOS 15 (and macOS 14 with Xcode 16) compatibility
 patches
 +    # from https://github.com/iains/gcc-14-branch, after tag
 gcc-14.2-darwin-r1.
 +    # See https://trac.macports.org/ticket/70641,
 +    # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116794,
 +    # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116809, and
 +    # https://github.com/iains/gcc-darwin-arm64/issues/136.
 +    if { ${os.major} >= 23 } {
 +        patchfiles-append  0001-Darwin-Allow-for-as-versions-that-need-
 for-std-in.patch \
 +                           0002-libgcc-Darwin-Drop-the-legacy-library-
 build-for-macO.patch \
 +                           0003-libgcc-Darwin-Don-t-build-legacy-
 libgcc_s.1-on-macOS.patch
      }
  }


 }}}

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


More information about the macports-tickets mailing list