[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib files issue compiling gawk with revived PCC
From: |
arnold |
Subject: |
Re: gnulib files issue compiling gawk with revived PCC |
Date: |
Tue, 02 May 2023 01:18:17 -0600 |
User-agent: |
Heirloom mailx 12.5 7/5/10 |
Hi.
Thanks for all this. I will review the changes and integrate
them as works for me.
I appreciate the help.
Arnold
Paul Eggert <eggert@cs.ucla.edu> wrote:
> On 2023-04-30 11:28, Aharon Robbins wrote:
> > This would seem to be due to the expansion of the INT_MULTIPLY_WRAPV
> > macro. I tried following its definition, but got lost in the maze
> > of twisty little ifdefs.
>
> It's gotta be a bug in pcc's preprocessor: it's not expanding that
> INT_MULTIPLY_WRAPV at all, and is simply erroring out. The attached
> patches fix this not by tracking the bug down, but by working around it.
> They change dfa.c to use ckd_mul (i.e., C23 style) instead of
> INT_MULTIPLY_WRAPV (older Gnulib style). We are gradually changing
> Gnulib to C23 style anyway, so this change is a win regardless of pcc's
> bugs.
>
> I found several other problems with pcc and Gnulib as used in Gawk, and
> made the following changes to Gnulib to port to Ubuntu 23.04 pcc:
>
> * pcc <limits.h> doesn't define MB_LEN_MAX; fixed by
> <https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=98deb4fad3bdc7986274feebac3f0f8a50fdce0a>.
>
> * pcc -E errors out on INT_MULTIPLY_WRAPV in Gnulib modules that Gawk
> uses; fixed by
> <https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=e915c32cc74671a03a4f656bdbbe9b8103a5ff19>,
>
> <https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=a1d7a312646ec112140f4a3e112daac2194549df>,
>
> and
> <https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=bdc715b1f7a4eee75214709d4a949bdf65bcc9a2>.
>
> * Even though pcc claims to be GCC 4 and to support C11 extern inline,
> it doesn't work; fixed by
> <https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=20022b888d0da7f927fd18cb8f18d78f8ac03107>.
>
> To test the above with Gawk, I propagated recent Gnulib into my copy of
> Gawk; see attached patches 0001-0010. pcc also mishandled some of Gawk's
> own code, so I made five changes to Gawk directly; see patches
> 0010-0015. Patch 0016 simply regenerates all autogenerated files. With
> all these patches installed Gawk "./configure CC=pcc; make check" works
> on Ubuntu 23.04 x86-64.
>
> Although these patches may seem large, almost all of them are simply
> copies from Gnulib, or autogenerated. The parts I wrote by hand are
> mostly summarized in the attached patch summary.patch, so I suggest
> looking at that first. summary.patch is meant for human review; the
> other patches can be slurped into Gawk simply via "git am 0*.patch".
>
> I'll cc this email to bug-gawk as I think Gnulib is now fixed for pcc,
> and the attached patches are for Gawk not Gnulib.