tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: next steps from recent macOS fallout



At 7 Apr 2024 16:03:40 -0400, "Amitai Schleier" <schmonz%schmonz.com@localhost> wrote:
Subject: Re: next steps from recent macOS fallout
> 
> On 7 Apr 2024, at 15:53, Edgar Fuß wrote:
> 
> > What does the C standard say about these "zealous errors"?
> > In case programs rely on an older
> > version of the C standard, the pkgsrc
> > Makefile should just express this. Or so I think.
> 
> Yes, if that's demonstrated to suffice
> then it could be an elegant solution. The
> idea was also suggested by Greg Woods and
> is mentioned in this commit:
> http://mail-index.netbsd.org/pkgsrc-changes/2024/03/19/msg295555.html
> 
> Whether it would suffice remains to be
> demonstrated. Now would be a relatively
> good time for someone to experiment with
> it :-)
> 
> - Amitai


I think the best "first-fix" solution that will cover pkgsrc's needs on
a few different platforms, including those with Clang as their native
"cc", as well as newer those with newer GCC releases with similar
problems, is to default "-std=" to something like "gnu99".

As I mentioned in the following:

	https://mail-index.netbsd.org/tech-pkg/2024/03/18/msg029026.html

this is effectively what was happening implicitly for NetBSD's native
"cc" for some time now.

However as I also mentioned in that message:

I'm actually not quite sure how this should be done in pkgsrc today.
USE_CC_FEATURES is not yet fully implemented as far as I can see.  It
seems entirely lacking for Clang still (there's no support for setting
_C_STD_FLAG.xxx at all for Clang, and for gcc it only seems to set
GCC_REQD, and not also set "-std=" -- the latter is still reliant on the
apparently "deprecated" uses of USE_LANGUAGES!).

So, the USE_CC_FEATURES feature should be fully implemented first, and
with the ability to have a default value (like "gnu99").

Once that's done the special hacks for clang on macos should be removed.

I think it's still rather rare for existing packages to already
_require_ a newer compiler and language standard.  Those that do can
eventually set USE_CC_FEATURES to the minimum newer standard they are
compatible with.

-- 
					Greg A. Woods <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>

Attachment: pgpUClqEumUlN.pgp
Description: OpenPGP Digital Signature



Home | Main Index | Thread Index | Old Index