tech-toolchain archive

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

Re: Host requirements to build the Tools binaries



On Fri, 2024-08-30 at 01:32 +0700, Robert Elz wrote:
> I think we need to make sure that the tools use only POSIX standard
> functions
> (excluding any that are optional) and probably only those from a
> fairly old
> version of POSIX (2008 just perhaps).

I didn't realise that the X/Open System Interfaces (XSI) part of POSIX
was optional. I thought that the XSI tag in the documentation was only
for historical provenance. 

A quick web search tells me that all the usual suspects (Solaris, HP-UX
and AIX) provide the XSI option for POSIX. I did find an SGI Indy in my
basement with a copy of IRIX 6.5 that does not provide the XSI option
for POSIX. That copy of IRIX will be somewhere between 21 and 26 years
old. 

I also had a look at src/bin/date.c to see when the XSI code was added
to it, and it was added two years ago via an import from FreeBSD. One
use of strptime() in date.c was toolified in January this year, but
there is still one unprotected reference to strptime() in date.c. That
isn't the only tool with this problem, it's just the one I looked at.

Why did nobody notice that our tools have been unable to build without
XSI for at least two years? Obviously nobody is building on a platform
that doesn't have the XSI option. Why do we have code that uses XSI? We
are pulling code from projects that don't restrict themselves to
baseline POSIX.

XSI seems completely ubiquitous these days, everyone provides it and
everyone uses it.

I understand that build platforms haven't always been the most feature
rich and NetBSD has had to be really defensive when building tools in
the past. The world has changed over the years though and things have
got easier. We can just change the tools policy to be POSIX baseline +
XSI. Is that something for core to decide? 

I'm going to hold off doing anything more (such as committing anything)
until those who make policy have had a think about policy. 

Ngā mihi,
Lloyd



Home | Main Index | Thread Index | Old Index