Opened 6 years ago

Last modified 4 years ago

#50904 assigned defect

gcc: change dist_subdir

Reported by: mojca (Mojca Miklavec) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 gcc49 gcc5 gcc6 gcc7

Description

The crossgcc PortGroup sets

dist_subdir     gcc

This means that we end up with two copies of each version of gcc, one in gcc and the other one in gcc${version}.

It would be great if gcc ports would also store the distfiles to /opt/local/var/macports/distfiles/gcc/.

Change History (7)

comment:1 Changed 5 years ago by kurthindenburg (Kurt Hindenburg)

Owner: changed from mww@… to macports-tickets@…
Status: newassigned

comment:2 Changed 4 years ago by raimue (Rainer Müller)

As of [067574baa2b43cc841f4d3b77b416772cafbba62/macports-ports], crossgcc is using

dist_subdir     gcc[lindex [split ${version} .] 0]

However, for some ports we also download newlib and its tarball would still end up multiple times in each gcc directory.

comment:3 Changed 4 years ago by mojca (Mojca Miklavec)

Oh, sorry. I didn't notice that.

I don't have a Mac at hand: how does that work for 4.7 etc? Doesn't that end up under gcc4 as opposed to gcc47?

Just curious: what are the advantages of using gcc7 as opposed to using plain gcc?

I'm linking this to PR #788.

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

Port: gcc7 added

You are right, it would use gcc4 instead of the correct gcc47. I guess I went with gcc[lindex [split ${version} .] 0] because that matches the dist_subdir of gcc >= 5. If we would want to switch to a plain gcc, we need the change in the gcc ports first.

comment:5 Changed 4 years ago by mojca (Mojca Miklavec)

We could of course fix the expression to end up with the correct subdir. It's just that I don't see a huge benefit, in particular not if some files are shared between different versions of gcc.

Do you see any potential problems with switching to gcc distname in all gcc ports?

comment:6 Changed 4 years ago by raimue (Rainer Müller)

I see no downsides of using a shared directory for all gcc ports. The only change would be that a port clean would produce a warning about other distfiles in this directory, but the warning is harmless:

$ sudo port clean --dist gcc6
--->  Cleaning gcc6
Warning: Distfiles directory '/opt/local/var/macports/distfiles/gcc' may contain distfiles needed for other ports, use the -f flag to force removal

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

In e3b98f1eadf598515cc86648645256a03282705f/macports-ports:

gcc5: Update to 5.5.0 and fix gcj

Closes: #55068
Closes: #49227
See: #22066

Also use a common dist_subdir.

See: #50904

Note: See TracTickets for help on using tickets.