tech-toolchain archive

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

Re: building with C89 host compiler

On 2014-01-02 12:08Z, Alan Barrett wrote:
[Note: Quotes ares out of order]
> On Fri, 02 Jan 2015, Antoine LECA wrote:
>> I had a hard time trying to cross-compile NetBSD from Interix (which
>> features the Microsft libc, C89 conforming but definitively lacking a
>> number of C99 library features) and it was all pain.
> Did you report the problems?

No, I believed it would have not been useful.
Also I experimented about 18 months ago, and the statement about C89 in
tools/README was added more recently; so without that hint, the fact
that quite a bit of C99 code was added in the recent years led me to the
impression that a C99 libc was indeed expected.

But perhaps I was wrong on this then; thanks Alan to give the
opportunity to raise the discussion.

While Interix was an interesting platform, now in 2015 it suffers from
several important drawbacks when it comes to consider it:
 - the product has been basically killed by Microsoft, cutting
subventions, no maintenance since 2008, and finally removed the basic
hooks in the NT 6.3 kernel (2012 R2 a.k.a Windows 8.1) released in 2013;
 - the code was not released, not even the parts which were derived from
OpenBSD back in 1997, when it was known as Softway's OpenNT; nor AFAIK
were released the patches Softway (a.k.a. Interops Systems, or Rodney
Ruddock) did for the pkgsrc inspired/derived "UNIX Tools";
 - the "workstation" variant required the upper licenses (7 Ultimate, or
7 or 8 Enterprise) which kept them out of reach of many hackers, mainly
the students.

> I still think that being able to build tools with a C89 compiler is
> a worthwhile goal.

In case I wasn't clear enough: my previous post was NOT intented as a
complaint to have Interix support in tools/compat; rather a hint that
not having C99 support on the host libc is a pain.

I can add that I think that pain is increasing over time.

So while I agree that the goal is worthwhile, I believe that it is going
against the ease given by assuming C99 conformance.

Now from this discussion, I should agree with you and Kamil that it
really boils down to add (several) support functions to libnbcompat.a
(for my experience, at least the mbrtowc family, and the whole *printf
family, to be able to use C99 modifiers like %zu or %td.)

Of course, you really should request long long support in addition to
C89, because otherwise there are no way be able to even start: in MINIX
we tried a long time to cope with the lack of 64-bit integers, but when
the project moved to NetBSD, the unavoidable need for long long was
clear and not discussed.


Home | Main Index | Thread Index | Old Index