[MacPorts] #64694: gcc/libgcc: update older systems prior to 10.6 to a newer gcc version?
MacPorts
noreply at macports.org
Sun Jul 17 14:37:45 UTC 2022
#64694: gcc/libgcc: update older systems prior to 10.6 to a newer gcc version?
----------------------------+---------------------------
Reporter: barracuda156 | Owner: (none)
Type: request | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.7.1
Resolution: | Keywords: leopard tiger
Port: libgcc, gcc10 |
----------------------------+---------------------------
Comment (by cjones051073):
The way things are set up for gcc in macports is a little involved,
primarily due to the fact we want there to be a single runtime that is
hared by all gcc compilers. This leads to slightly more complex logic in a
number of places, than just a single version set somewhere.
The first place to look is in the libgcc port, that is what proves the
primary runtime. It is though just a shim port that sets a dep on a
specific versioned libgccX based on the os versio. See
https://github.com/macports/macports-
ports/blob/82071e70dd05d0afd94b2d02b9801ca894eebd32/lang/libgcc/Portfile#L31
Then, you need to look in the port files for the gcc version listed above,
which are gcc12 for most system, and gcc7 for the really old ones.
So, if someone wanted to migrate the old oses from using gcc7 as its
primary runtime, to something else, you would need to first update the
libgcc7 port, removing the logic to decide if its a primary or secondary
runtime provider, making it a secondary for all, and move that logic into
the gcc version you want to become the new primary runtime. See eg.
https://github.com/macports/macports-
ports/blob/82071e70dd05d0afd94b2d02b9801ca894eebd32/lang/gcc7/Portfile#L40
There is probably a few other little details I have forgotten about… i
have to remind myself how to do the migration each time i add a new major
version, and migrate libgcc to use it.
I am not going to do the above myself, i do not have the time but more
importantly no means to test on OSX10.5 or older. But hopefully if someone
else is interested the above would give them a starting point to make the
changes ..
--
Ticket URL: <https://trac.macports.org/ticket/64694#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list