Port-vax archive

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

Re: Issues with native build of -10 on VAX



Hi Hans,

On 7/11/23 00:58, Hans Rosenfeld wrote:
Hi,

has anyone already succeeded in doing a native build of -10 on the VAX?

I'm stuck at the tools build, with gcc failing in a way that I don't
really understand:

/usr/src/tools/gcc/../../external/gpl3/gcc/dist/gcc/sancov.c: In instantiation of 'const pass_data {anonymous}::pass_sancov<false>::data':
/usr/src/tools/gcc/../../external/gpl3/gcc/dist/gcc/sancov.c:307:55:   required from '{anonymous}::pass_sancov<O0>::pass_sancov(gcc::context*) [with bool O0 = false]'
/usr/src/tools/gcc/../../external/gpl3/gcc/dist/gcc/sancov.c:345:38:   required from here
/usr/src/tools/gcc/../../external/gpl3/gcc/dist/gcc/sancov.c:328:17: error: 'constinit' variable '{anonymous}::pass_sancov<false>::data' does not have a constant initializer
   328 | const pass_data pass_sancov<O0>::data = {
       |                 ^~~~~~~~~~~~~~~
/usr/src/tools/gcc/../../external/gpl3/gcc/dist/gcc/sancov.c: In instantiation of 'const pass_data {anonymous}::pass_sancov<true>::data':
/usr/src/tools/gcc/../../external/gpl3/gcc/dist/gcc/sancov.c:307:55:   required from '{anonymous}::pass_sancov<O0>::pass_sancov(gcc::context*) [with bool O0 = true]'
/usr/src/tools/gcc/../../external/gpl3/gcc/dist/gcc/sancov.c:351:37:   required from here
/usr/src/tools/gcc/../../external/gpl3/gcc/dist/gcc/sancov.c:328:17: error: 'constinit' variable '{anonymous}::pass_sancov<true>::data' does not have a constant initializer

The code in question looks sane, and so does the preprocessor
output. The same code built correctly when cross-built on amd64 (on
illumos, though).

I assume this has once worked on -current? Perhaps there something got
inadvertently broken in the pullups to -10?

Hmm.  I'm not entirely sure but I *think* this is a manifestation of GCC bug c++/105491.  Native GCC 10 for VAX from -current also fails in the same way, but the GCC 10 cross-compiler from -current (on amd64 on Linux), can compile the same code without issue. It's weird.  I'd have expected the cross-compiler to also fail. For what it's worth, the (patched) native GCC 12.2 that I've built from pkgsrc can compile sancov.c from GCC 10 without complaint. (Bug 105491 is fixed in GCC 12.2 and later.)

I have an inelegant workaround for GCC 10 but it needs some more testing.

kalvis



Home | Main Index | Thread Index | Old Index