Opened 7 years ago

Closed 7 years ago

#54198 closed update (fixed)

upgrade: port:gcc7

Reported by: RJVB (René Bertin) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: mopihopi, mojca (Mojca Miklavec), cjones051073 (Chris Jones), michaelld (Michael Dickens), W-E-Brown, MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), iqgrande, jeremyhu (Jeremy Huddleston Sequoia)
Port: gcc7

Description

This ticket provides patches to upgrade port:gcc7 from a recent beta version to the 7.1.0 release version. Tested on OS X 10.9.5 .

Gcc 7.1.0 comes with a new libgfortran; this ticket does not provide the patch(es) required to adapt port:gcc6 (and earlier version?) to add a port:libgcc6 (I'm curious why the libgcc ports handle ABI changes this way while all other ports just expect dependents to revbump and rebuild?)

I've added 1 small patch which makes gcc c.s. invoke the cctools assembler with the -q option. This option makes as invoke the clang integrated assembler instead of running its own obsolete GNU-as based routines; the option is supposedly the default but that is clearly not the case in practice. It does indicate that the option must be safe to use; the effect is that the GCC compilers will use an up-to-date assembler with support for instruction sets unknown to Apple's GNU as fork.

I'm including a 2nd Portfile patch, to be applied to the upgraded Portfile which I think should be incorporated at the same time as the upgrade. This provides a PoC implementation of the variant I suggested to roll back the standard runtime libraries into the main port, and turn port:libgcc into a stub that exposes the runtime dylibs into $prefix/lib/libgcc. This cuts install and upgrade times roughly in half for users who install from source, which is all the more interesting to those who need the universal variant. It requires no functionality that should be part of "Base", it just inverts the symlinking logic.

Concretely, interested users can install port:gcc7 with the +with_libgcc variant (name open for improvement). This simply removes the port's dependency on port:libgcc and shunts the post-destroot code replacing the dylibs concerned with symlinks. Then, when port:libgcc is required or upgraded, the with_libgcc variant is detected. That leads to the auto-activation of a +stub variant, which adds a dependency on port:gcc7, drops all source-related phases and re-define the destroot phase to create symlinks in $prefix/lib/libgcc that point to the dylibs in $prefix/lib/gcc7. (I considered using the same variant for both ports but failed to find a term that makes sense for both).

Attachments (5)

gcc7.diff (5.7 KB) - added by RJVB (René Bertin) 7 years ago.
upgrade to gcc 7.1.0
patch-default-clang-assembler.diff (375 bytes) - added by RJVB (René Bertin) 7 years ago.
invoke the assembler with the -q option
gcc7+with_libgcc.diff (4.1 KB) - added by RJVB (René Bertin) 7 years ago.
single-build variants
gcc7+with_libgcc+libcxx.diff (2.2 KB) - added by RJVB (René Bertin) 7 years ago.
incremental diff adding support for (use of) libc++
patch-use-libcxx.diff (3.0 KB) - added by RJVB (René Bertin) 7 years ago.

Download all attachments as: .zip

Change History (22)

Changed 7 years ago by RJVB (René Bertin)

Attachment: gcc7.diff added

upgrade to gcc 7.1.0

Changed 7 years ago by RJVB (René Bertin)

invoke the assembler with the -q option

Changed 7 years ago by RJVB (René Bertin)

Attachment: gcc7+with_libgcc.diff added

single-build variants

comment:1 Changed 7 years ago by RJVB (René Bertin)

RE: the with_libgcc and stub variants: a single +single_build variant might be sufficiently unambiguous to work for both subports, and also indicate that it is of little interest unless you're building the port yourself?

One remark: I did have a single build failure yesterday, a crash of the cc1plus backend during (I think) the fore-last build phase. When I repeated the port build command it completed just fine so it was probably just a glitch, possibly due to memory pressure. (Or caused by the fact I added -march=native to configure.optflags as a reflex.)

Changed 7 years ago by RJVB (René Bertin)

incremental diff adding support for (use of) libc++

Changed 7 years ago by RJVB (René Bertin)

Attachment: patch-use-libcxx.diff added

comment:2 Changed 7 years ago by RJVB (René Bertin)

I added a 2nd incremental patch with accompanying patchfile, which cause G++ to link to libc++ instead of libstdc++

comment:3 Changed 7 years ago by mopihopi

Cc: mopihopi added

comment:4 Changed 7 years ago by rouson (Damian Rouson)

Is it possible for me to add myself to the list of those notified of updates on this ticket? If so, please explain or add me.

comment:5 Changed 7 years ago by RJVB (René Bertin)

You must have a CC button on the CC: line in the header above (bottom-right) just above the description. Easy to miss, I guess.

comment:6 Changed 7 years ago by mojca (Mojca Miklavec)

Cc: mojca added

comment:7 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Status: newaccepted

I will make the necessary updates, possibly next week.

comment:8 Changed 7 years ago by cjones051073 (Chris Jones)

Cc: cjones051073 added

comment:9 Changed 7 years ago by michaelld (Michael Dickens)

Cc: michaelld added

comment:10 Changed 7 years ago by W-E-Brown

Cc: W-E-Brown added

comment:11 Changed 7 years ago by raimue (Rainer Müller)

What is the hold up here? Can we untangle the gcc7 upgrade to 7.1.0 from the additional libgcc/libc++ variants, if that is the problem?

comment:12 Changed 7 years ago by RJVB (René Bertin)

We can as far as I'm concerned (the libc++ variant at least)

comment:13 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

The holdup is that updating libgcc to 7 will require the introduction of libgcc6 and revbumping all gcc ports to depend on it. Since we have to do that, I want to take care of some other issues that also require revbumping.

comment:14 Changed 7 years ago by RJVB (René Bertin)

Why not update port:gcc7 and port:libgcc-devel to 7.1.0 (possibly introducing the libc++ variant as well) so people can start using the gcc7 release version (and its libc++ support)?

comment:15 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: MarcusCalhoun-Lopez added

comment:16 Changed 7 years ago by iqgrande

Cc: iqgrande added

comment:17 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jeremyhu added
Resolution: fixed
Status: acceptedclosed

gcc7 was updated to 7.2.0 in [ff4c4bd6219f166b85c82c44eecb909dd3ae08b3/macports-ports]. Thanks, Jeremy!

Note: See TracTickets for help on using tickets.