Re: [PATCH 2/3] ci: avoid bare "gcc" for osx-gcc job
- From
Patrick Steinhardt <ps@pks.im>
- Date
- May 10, 2024, 07:00 UTC
- Message-ID
- <Zj3F_paYzkQUC9fC@tanuki>
- In-Reply-To
- <20240509162415.GB1708042@coredump.intra.peff.net>
On Thu, May 09, 2024 at 12:24:15PM -0400, Jeff King wrote:
> On macOS, a bare "gcc" (without a version) will invoke a wrapper for > clang, not actual gcc. Even when gcc is installed via homebrew, that > only provides version-specific links in /usr/local/bin (like "gcc-13"), > and never a version-agnostic "gcc" wrapper.
That's awful.
Show 6 quoted lines
> As far as I can tell, this has been the case for a long time, and this > osx-gcc job has largely been doing nothing. We can point it at "gcc-13", > which will pick up the homebrew-installed version. > > The fix here is specific to the github workflow file, as the gitlab one > does not have a matching job.
Indeed we don't. We could add it, but that certainly does not need to be part of this patch series.
Show 11 quoted lines
> It's a little unfortunate that we cannot just ask for the latest version > of gcc which homebrew provides, but as far as I can tell there is no > easy alias (you'd have to find the highest number gcc-* in > /usr/local/bin yourself). > > Signed-off-by: Jeff King <peff@peff.net> > --- > We'll eventually have to bump "gcc-13" to "gcc-14" here, and so on. I > don't think we ever cared about gcc-13 in particular; it's just that > older versions of the runner image had some ancient version which we > wanted to avoid.
As an alternative we could munge PATH such that Homebrew's GCC is found before Apple's.
Patrick