Skip to content

Commit

Permalink
Make gcc14 the primary version on Tiger+
Browse files Browse the repository at this point in the history
gcc7 is obsolete at this point and fails to build a lot of software.
Enables gcc14 for all platforms as sets it as default.

gcc14 is built using gcc10-bootstrap on 10.4 and 10.5.

This does not enable other versions of gcc between 9 and 14
because there doesn't really seem to be a reason to use those
given that gcc14 is available (this can be revisited later if turns out
that someone needs those other versions).
  • Loading branch information
glebm committed Nov 17, 2024
1 parent 944aa0e commit 6104f0f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
3 changes: 2 additions & 1 deletion _resources/port1.0/compilers/gcc_compilers.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ if {${os.major} >= 10 || [option os.platform] ne "darwin"} {
lappend compilers macports-gcc-14 macports-gcc-13 macports-gcc-12 macports-gcc-11 macports-gcc-10
}

# GCC 9 and older only on OSX10.10 and older
# GCC 14, GCC 9 and older only on OSX10.10 and older
# https://trac.macports.org/ticket/65472
if {${os.major} < 15} {
lappend compilers macports-gcc-14
if {${os.major} >= 10} {
lappend compilers macports-gcc-9 macports-gcc-8
}
Expand Down
6 changes: 1 addition & 5 deletions _resources/port1.0/compilers/gcc_dependencies.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

# GCC version providing the primary runtime
# Note settings here *must* match those in the lang/libgcc port and compilers PG
if {[option os.platform] eq "darwin" && [option os.major] < 10} {
set gcc_main_version 7
} else {
set gcc_main_version 14
}
set gcc_main_version 14

# compiler links against libraries in libgcc\d* and/or libgcc-devel
if {[vercmp ${gcc_version} 4.6] < 0} {
Expand Down
17 changes: 5 additions & 12 deletions _resources/port1.0/group/compilers-1.0.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,7 @@ options compilers.add_gcc_rpath_support
default compilers.add_gcc_rpath_support yes

# Set a default gcc version
if {${os.major} < 10 && ${os.platform} eq "darwin" } {
# see https://trac.macports.org/ticket/57135
set compilers.gcc_default gcc7
} else {
set compilers.gcc_default gcc14
}
set compilers.gcc_default gcc14

set compilers.list {cc cxx cpp objc fc f77 f90}

Expand All @@ -107,16 +102,14 @@ if { ${os.arch} eq "arm" || ${os.platform} ne "darwin" } {
if { [vercmp ${xcodeversion} < 16.0] && [vercmp ${xcodecltversion} < 16.0] } {
lappend gcc_versions 10 11 12 13
}
lappend gcc_versions 14 devel
}
lappend gcc_versions 14 devel
}

# GCC version providing the primary runtime
# Note settings here *must* match those in the lang/libgcc port.
if { ${os.major} < 10 && ${os.platform} eq "darwin" } {
set gcc_main_version 7
} else {
set gcc_main_version 14
}
set gcc_main_version 14

ui_debug "GCC versions for Darwin ${os.major} ${os.arch} - ${gcc_versions}"
foreach ver ${gcc_versions} {
# Remove dot from version if present
Expand Down
12 changes: 11 additions & 1 deletion lang/gcc14/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ name gcc${gcc_major_v}

homepage https://gcc.gnu.org/

platforms {darwin >= 10}
categories lang
maintainers nomaintainer
# an exception in the license allows dependents to not be GPL
Expand Down Expand Up @@ -69,6 +68,17 @@ depends_lib-append port:cctools \
depends_run-append port:gcc_select \
path:share/doc/libgcc/README:libgcc

platform darwin {
if {(${configure.build_arch} in [list ppc ppc64]) || ${os.major} < 10} {
configure.compiler.add_deps \
no
depends_build-append \
port:gcc10-bootstrap
configure.cc ${prefix}/libexec/gcc10-bootstrap/bin/gcc
configure.cxx ${prefix}/libexec/gcc10-bootstrap/bin/g++
}
}

depends_skip_archcheck-append gcc_select ld64 cctools
license_noconflict gmp mpfr ppl libmpc zlib

Expand Down
5 changes: 4 additions & 1 deletion lang/gcc7/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ checksums rmd160 91d46ec088badec75f41a2ad2a0ba228a6715107 \
# If it is, libgcc7 installs a full runtime, otherwise it only installs
# what is missing from newer libgccX builds.
# NOTE : The logic here must match that in the libgcc port.
set isLastSupported [ expr ${os.major} < 10 ]
# set isLastSupported [ expr ${os.major} < 10 ]

# libgcc7 is currently not the last supported libgcc for any system
set isLastSupported false

if { ${configure.build_arch} eq "i386" && ${os.major} >= 10 } {

Expand Down
9 changes: 3 additions & 6 deletions lang/libgcc/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PortGroup select 1.0

epoch 3
name libgcc
version 8.0
version 9.0
revision 0

conflicts libgcc-devel
Expand All @@ -31,11 +31,8 @@ variant universal { }
# Pick the gcc version that provides the primary runtime.
# NOTE : The logic here must match that in the gccX ports *and*
# that in _resources/port1.0/group/compilers-1.0.tcl
if { ${os.major} < 10 } {
set gcc_version 7
} else {
set gcc_version 14
}
set gcc_version 14

depends_lib port:libgcc${gcc_version}

build { }
Expand Down

0 comments on commit 6104f0f

Please sign in to comment.