<pre style='margin:0'>
Chris Jones (cjones051073) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/8fe231e921aea8c4de3f7b6679cd4abcb0d5716b">https://github.com/macports/macports-ports/commit/8fe231e921aea8c4de3f7b6679cd4abcb0d5716b</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 8fe231e921a libgcc10: Distribute libgcc_ext.10.[4-5].dylib following them being dropped in gcc11 Closes: https://trac.macports.org/ticket/65055
</span>8fe231e921a is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 8fe231e921aea8c4de3f7b6679cd4abcb0d5716b
</span>Author: Chris Jones <jonesc@macports.org>
AuthorDate: Wed Apr 27 11:23:33 2022 +0100
<span style='display:block; white-space:pre;color:#404040;'> libgcc10: Distribute libgcc_ext.10.[4-5].dylib following them being dropped in gcc11
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/65055
</span>---
lang/gcc10/Portfile | 221 +++++++++++++--------------
lang/gcc10/files/patch-darwin21-support.diff | 89 +++++++++++
lang/gcc10/files/patch-genconditions.diff | 32 ++++
3 files changed, 225 insertions(+), 117 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/gcc10/Portfile b/lang/gcc10/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index fbbb79bf5c9..d063f3d0e8d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/gcc10/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/gcc10/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -53,11 +53,18 @@ if { ${os.arch} eq "arm" } {
</span> checksums rmd160 8edb715cf1159fd8de773d0d5208d2e83ca36402 \
sha256 64f404c1a650f27fc33da242e1f2df54952e3963a49e06e73f6940f3223ac344 \
size 76692288
<span style='display:block; white-space:pre;background:#ffe0e0;'>- subport libgcc10 { revision [ expr ${revision} + 1 ] }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ subport libgcc10 { revision [ expr ${revision} + 2 ] }
</span> }
patchfiles patch-fix-libgccjit-soname
<span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-darwin21-support.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if { ${os.platform} eq "darwin" && ${os.major} > 19 } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92061
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-genconditions.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> if { ${configure.build_arch} eq "i386" } {
# fix no-pie clang bug bootstrapping gcc on i386
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -183,7 +190,7 @@ pre-configure {
</span> # https://trac.macports.org/ticket/29104
# https://trac.macports.org/ticket/47996
# https://trac.macports.org/ticket/58493
<span style='display:block; white-space:pre;background:#ffe0e0;'>-compiler.blacklist-append {clang < 800} gcc-4.0 *gcc-4.2 {macports-clang-3.[4-7]}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.blacklist-append {clang < 800} gcc-4.0 *gcc-4.2 {macports-clang-3.[4-7]}
</span>
# "-stdlib" would be passed on to the bootstrap compiler if present
configure.cxx_stdlib
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -206,12 +213,29 @@ if { ${os.major} < 10 } {
</span> # gcc cannot build if libunwind-headers is active
conflicts_build-append libunwind-headers
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# clang (as) from Xcode 12.5 has various problems with gcc build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if { ${os.platform} eq "darwin" && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ( [ vercmp ${xcodeversion} 12.5 ] >= 0 || [ vercmp ${cltversion} 12.5 ] >= 0 ) } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pre-configure {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "Applying '--without-build-config' workaround to Xcode ${xcodeversion} / CLT ${cltversion}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "If versions > 12.5 please check if it is still required"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # gcc has build issues on macOS 11.3 with the use of Xcode clang as 'as'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100340
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://trac.macports.org/ticket/62775
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append --without-build-config
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # List of dylibs to be installed
# Note that we really don't want to include libgcc_ext.10.[45].dylib here, but install_name_tool
# doesn't know how to change the id of stubs, and it's easier than recreating them for each
# gcc port.
set all_dylibs {libgcc_ext.10.4.dylib libgcc_ext.10.5.dylib libgcc_s.1.dylib libgcc_s.1.1.dylib libgcc_s.2.dylib libgfortran.5.dylib libquadmath.0.dylib libstdc++.6.dylib libobjc-gnu.4.dylib libgomp.1.dylib libitm.1.dylib libssp.0.dylib libasan.6.dylib libubsan.1.dylib libatomic.1.dylib}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set install_dylibs {libgcc_s.2.dylib}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if { ${os.arch} eq "arm" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set install_dylibs {libgcc_s.2.dylib libgcc_ext.10.4.dylib libgcc_ext.10.5.dylib}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set install_dylibs {libgcc_ext.10.4.dylib libgcc_ext.10.5.dylib}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span>
if {${subport} ne ${name}} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -236,136 +260,99 @@ if {${subport} ne ${name}} {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if { ${os.arch} eq "arm" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # http://trac.macports.org/ticket/35770
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # http://trac.macports.org/ticket/38814
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # While there can be multiple versions of these runtimes in a single
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # process, it is not possible to pass objects between different versions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # so we simplify this by having the libgcc port provide the newest version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # of these runtimes for all versions of gcc to use.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # If there is a binary incompatible change to the runtime in a future
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # version of gcc, then the latest version of gcc to provide a given ABI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # version should continue to provide a subport for that and older gcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # versions.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_run path:share/doc/libgcc/README:libgcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append {*}${depends_lib}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --libdir=${prefix}/lib/${name} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --libdir=${prefix}/lib/libgcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # see https://trac.macports.org/ticket/54766
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --includedir=${prefix}/include/${name} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --includedir=${prefix}/include/gcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --with-gxx-include-dir=${prefix}/include/gcc/c++/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # TODO: Possibly disable bootstrap with appropriate configure flags.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # the problem is that libstdc++'s configure script tests for tls support
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # using the running compiler (not gcc for which libstdc++ is being built).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Thus when we build with clang, we get a mismatch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # http://trac.macports.org/ticket/36116
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #compiler.blacklist-append {clang < 425}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #configure.args-append --disable-bootstrap
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #build.target all
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # http://trac.macports.org/ticket/35770
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # http://trac.macports.org/ticket/38814
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # While there can be multiple versions of these runtimes in a single
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # process, it is not possible to pass objects between different versions,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # so we simplify this by having the libgcc port provide the newest version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # of these runtimes for all versions of gcc to use.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # If there is a binary incompatible change to the runtime in a future
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # version of gcc, then the latest version of gcc to provide a given ABI
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # version should continue to provide a subport for that and older gcc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # versions.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_run path:share/doc/libgcc/README:libgcc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build-append {*}${depends_lib}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args-replace \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --libdir=${prefix}/lib/${name} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --libdir=${prefix}/lib/libgcc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # see https://trac.macports.org/ticket/54766
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args-replace \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --includedir=${prefix}/include/${name} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --includedir=${prefix}/include/gcc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args-replace \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --with-gxx-include-dir=${prefix}/include/gcc/c++/
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # TODO: Possibly disable bootstrap with appropriate configure flags.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # the problem is that libstdc++'s configure script tests for tls support
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # using the running compiler (not gcc for which libstdc++ is being built).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Thus when we build with clang, we get a mismatch
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # http://trac.macports.org/ticket/36116
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #compiler.blacklist-append {clang < 425}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #configure.args-append --disable-bootstrap
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #build.target all
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- post-destroot {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Create temporary lib dir
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file mkdir ${destroot}${prefix}/lib/libgcc.merged
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Loop over the specific libs provided by this port
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach dylib ${install_dylibs} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Different OS versions (e.g. Leopard) or architectures (e.g. PPC) don't produce all the dylibs
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://trac.macports.org/ticket/40098
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://trac.macports.org/ticket/40100
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {! [file exists ${destroot}${prefix}/lib/libgcc/${dylib}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- continue
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Create temporary lib dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file mkdir ${destroot}${prefix}/lib/libgcc.merged
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Loop over the specific libs provided by this port
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach dylib ${install_dylibs} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Different OS versions (e.g. Leopard) or architectures (e.g. PPC) don't produce all the dylibs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://trac.macports.org/ticket/40098
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://trac.macports.org/ticket/40100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {! [file exists ${destroot}${prefix}/lib/libgcc/${dylib}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ continue
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- move ${destroot}${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/libgcc.merged
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[variant_exists universal] && [variant_isset universal]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach archdir [glob ${destroot}${prefix}/lib/libgcc/*/] {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set archdir_nodestroot [string map "${destroot}/ /" ${archdir}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[file exists ${archdir}/${dylib}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "install_name_tool -id ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach link [glob -tails -directory ${archdir} *.dylib] {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "install_name_tool -change ${archdir_nodestroot}${link} ${prefix}/lib/libgcc/${link} ${archdir}/${dylib}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "lipo -create -output ${destroot}${prefix}/lib/libgcc.merged/${dylib}~ ${destroot}${prefix}/lib/libgcc.merged/${dylib} ${archdir}/${dylib} && mv ${destroot}${prefix}/lib/libgcc.merged/${dylib}~ ${destroot}${prefix}/lib/libgcc.merged/${dylib}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ move ${destroot}${prefix}/lib/libgcc/${dylib} ${destroot}${prefix}/lib/libgcc.merged
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_exists universal] && [variant_isset universal]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach archdir [glob ${destroot}${prefix}/lib/libgcc/*/] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set archdir_nodestroot [string map "${destroot}/ /" ${archdir}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists ${archdir}/${dylib}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "install_name_tool -id ${prefix}/lib/libgcc/${dylib} ${archdir}/${dylib}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach link [glob -tails -directory ${archdir} *.dylib] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "install_name_tool -change ${archdir_nodestroot}${link} ${prefix}/lib/libgcc/${link} ${archdir}/${dylib}"
</span> }
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "lipo -create -output ${destroot}${prefix}/lib/libgcc.merged/${dylib}~ ${destroot}${prefix}/lib/libgcc.merged/${dylib} ${archdir}/${dylib} && mv ${destroot}${prefix}/lib/libgcc.merged/${dylib}~ ${destroot}${prefix}/lib/libgcc.merged/${dylib}"
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # strip debug symbols to supress debugger warnings:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # http://trac.macports.org/attachment/ticket/34831
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {! [string match *libgcc_ext* ${dylib}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "strip -x ${destroot}${prefix}/lib/libgcc.merged/${dylib}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Remove stuff not provided by libgccX ports
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file delete -force ${destroot}${prefix}/bin
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file delete -force ${destroot}${prefix}/share
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file delete -force ${destroot}${prefix}/lib/libgcc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file delete -force ${destroot}${prefix}/libexec
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Move temporary lib dir back in place
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- move ${destroot}${prefix}/lib/libgcc.merged ${destroot}${prefix}/lib/libgcc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Remove includes. Provided by newer libgcc.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file delete -force ${destroot}${prefix}/include
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set doc_dir ${destroot}${prefix}/share/doc/${subport}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${doc_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "echo ${subport} provides additional runtime > ${doc_dir}/README"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # strip debug symbols to supress debugger warnings:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # http://trac.macports.org/attachment/ticket/34831
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {! [string match *libgcc_ext* ${dylib}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "strip -x ${destroot}${prefix}/lib/libgcc.merged/${dylib}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # gcc9 runtime versions are identical to that in gcc10, so libgcc9 does not
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # need to provide anything, hence do not build anything.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # port still defined as needed to satisfy dependency tree
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_run path:share/doc/libgcc/README:libgcc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Remove stuff not provided by libgccX ports
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file delete -force ${destroot}${prefix}/bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file delete -force ${destroot}${prefix}/share
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file delete -force ${destroot}${prefix}/lib/libgcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file delete -force ${destroot}${prefix}/libexec
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- fetch.type none
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- build { }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- use_configure no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Move temporary lib dir back in place
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ move ${destroot}${prefix}/lib/libgcc.merged ${destroot}${prefix}/lib/libgcc
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- destroot {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set doc_dir ${destroot}${prefix}/share/doc/${subport}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${doc_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "echo ${subport} provides no runtime > ${doc_dir}/README"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Remove includes. Provided by newer libgcc.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file delete -force ${destroot}${prefix}/include
</span>
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set doc_dir ${destroot}${prefix}/share/doc/${subport}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 755 -d ${doc_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "echo ${subport} provides additional runtime > ${doc_dir}/README"
</span> }
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # clang (as) from Xcode 12.5 has various problems with gcc build
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { ${os.platform} eq "darwin" && \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ( [ vercmp ${xcodeversion} 12.5 ] >= 0 || [ vercmp ${cltversion} 12.5 ] >= 0 ) } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- pre-configure {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_warn "Applying '--without-build-config' workaround to Xcode ${xcodeversion} / CLT ${cltversion}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_warn "If versions > 12.5 please check if it is still required"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # gcc has build issues on macOS 11.3 with the use of Xcode clang as 'as'
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100340
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # https://trac.macports.org/ticket/62775
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args-append --without-build-config
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> post-destroot {
file delete ${destroot}${prefix}/share/info/dir
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/gcc10/files/patch-darwin21-support.diff b/lang/gcc10/files/patch-darwin21-support.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..8f722310371
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/gcc10/files/patch-darwin21-support.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,89 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 20f61faaed3b335d792e38892d826054d2ac9f15 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Saagar Jha <saagar@saagarjha.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 15 Jun 2021 04:08:23 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Darwin, config: Amend for Darwin 21 / macOS 12.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+It seems that the OS major version is now tracking the kernel
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+major version - 9. Minor version tracking is unknown.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Signed-off-by: Saagar Jha <saagar@saagarjha.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+gcc/ChangeLog:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * config.gcc: Adjust for Darwin21.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * config/darwin-c.c (macosx_version_as_macro): Likewise.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * config/darwin-driver.c (validate_macosx_version_min):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Likewise.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (darwin_find_version_from_kernel): Likewise.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gcc/config.gcc | 6 +++---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gcc/config/darwin-c.c | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gcc/config/darwin-driver.c | 10 +++++-----
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 3 files changed, 9 insertions(+), 9 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/gcc/config.gcc b/gcc/config.gcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 498c51e619de772aecac0ad9303fdb72c4db930b..d430c24e4749c66d510f503e9389362a93e6da97 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- gcc/config.gcc.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ gcc/config.gcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -679,9 +679,9 @@ case ${target} in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *-*-darwin[4-9]* | *-*-darwin1[0-9]*)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macos_min=`expr $darwin_maj - 4`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- *-*-darwin20*)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # Darwin 20 corresponds to macOS 11.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- macos_maj=11
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *-*-darwin2*)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # Darwin 20 corresponds to macOS 11, Darwin 21 to macOS 12.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ macos_maj=`expr $darwin_maj - 9`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def_ld64=609.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *-*-darwin)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 951a998775f83e16ed6c11963e6e9eb1286c51a7..62d28fcea501bbcb9eb403c74793af45eb91ca7f 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- gcc/config/darwin-c.c.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ gcc/config/darwin-c.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -691,7 +691,7 @@ macosx_version_as_macro (void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!version_array)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ goto fail;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (version_array[MAJOR] < 10 || version_array[MAJOR] > 11)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (version_array[MAJOR] < 10 || version_array[MAJOR] > 12)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ goto fail;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (version_array[MAJOR] == 10 && version_array[MINOR] < 10)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0b86bb6faf7ca246afd23d43f716242f3d802123..3e02d003cd19dabc9518e21655586768feae6756 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- gcc/config/darwin-driver.c.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ gcc/config/darwin-driver.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -64,17 +64,17 @@ validate_macosx_version_min (const char *version_str)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ major = strtoul (version_str, &end, 10);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (major < 10 || major > 11 ) /* MacOS 10 and 11 are known. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (major < 10 || major > 12 ) /* macOS 10, 11, and 12 are known. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Skip a separating period, if there's one. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ version_str = end + ((*end == '.') ? 1 : 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (major == 11 && *end != '\0' && !ISDIGIT (version_str[0]))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* For MacOS 11, we allow just the major number, but if the minor is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (major > 10 && *end != '\0' && !ISDIGIT (version_str[0]))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* For macOS 11+, we allow just the major number, but if the minor is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ there it must be numeric. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- else if (major == 11 && *end == '\0')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else if (major > 10 && *end == '\0')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* We will rewrite 11 => 11.0.0. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ need_rewrite = true;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else if (major == 10 && (*end == '\0' || !ISDIGIT (version_str[0])))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -172,7 +172,7 @@ darwin_find_version_from_kernel (void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (minor_vers > 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ minor_vers -= 1; /* Kernel 20.3 => macOS 11.2. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* It's not yet clear whether patch level will be considered. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- asprintf (&new_flag, "11.%02d.00", minor_vers);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ asprintf (&new_flag, "%d.%02d.00", major_vers - 9, minor_vers);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else if (major_vers - 4 <= 4)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* On 10.4 and earlier, the old linker is used which does not
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/gcc10/files/patch-genconditions.diff b/lang/gcc10/files/patch-genconditions.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..45d19841de6
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/gcc10/files/patch-genconditions.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,32 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- gcc/genconditions.c 2019-01-01 12:37:19.064943662 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ gcc/genconditions.c 2019-10-11 10:57:11.464595789 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -57,8 +57,9 @@ write_header (void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* It is necessary, but not entirely safe, to include the headers below\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ in a generator program. As a defensive measure, don't do so when the\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- table isn't going to have anything in it. */\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if GCC_VERSION >= 3001\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ table isn't going to have anything in it.\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Clang 9 is buggy and doesn't handle __builtin_constant_p correctly. */\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if GCC_VERSION >= 3001 && __clang_major__ < 9\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Do not allow checking to confuse the issue. */\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #undef CHECKING_P\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -170,7 +171,7 @@ struct c_test\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ vary at run time. It works in 3.0.1 and later; 3.0 only when not\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ optimizing. */\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if GCC_VERSION >= 3001\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if GCC_VERSION >= 3001 && __clang_major__ < 9\n\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static const struct c_test insn_conditions[] = {\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ traverse_c_tests (write_one_condition, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -191,7 +192,7 @@ write_writer (void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ " unsigned int i;\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ " const char *p;\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ " puts (\"(define_conditions [\");\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "#if GCC_VERSION >= 3001\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "#if GCC_VERSION >= 3001 && __clang_major__ < 9\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ " for (i = 0; i < ARRAY_SIZE (insn_conditions); i++)\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ " {\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ " printf (\" (%d \\\"\", insn_conditions[i].value);\n"
</span></pre><pre style='margin:0'>
</pre>