Current-Users archive

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

Re: Building PCC for "tools" is broken (missing symbol __USE)- PCC bug or NetBSD source tree error?

Yes, I think you can set UNSUPPORTED_COMPILER.pcc in the Makefile and it
will proceed using a different one

For the time being, I'll make a note of all the tools that pcc cannot currently build, and set Makefiles accordingly. I'm not sure if these tools under gpl track upstream or not, so at least for tonight I'm not sure if feel comfortable changing the actual source code of binutils to make pcc compile it successfully. Although perhaps submitting a patch to binutils that undefines __restrict in arrays if pcc is being used is a possible solution for the time being.

-----Original Message----- From: Iain Hibbert
Sent: Friday, July 25, 2014 1:46 AM
To: William D. Jones
Subject: Re: Building PCC for "tools" is broken (missing symbol __USE)- PCC bug or NetBSD source tree error?

On Thu, 24 Jul 2014, William D. Jones wrote:

First error of the night:

#   compile  libiberty/regex.o
/mnt/lfs/NetBSD-CVS/src/../tools/bin/i486--netbsdelf-pcc -O2    -std=gnu99
-Werror   -Os -Wno-error=uninitialized -Wno-error=maybe-uninitialized
--sysroot=/mnt/lfs/NetBSD-CVS/src/../destdir/i386-pb -DHAVE_CONFIG_H
-I/mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/dist/include  -c
/mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/dist/libiberty/regex.c -o
/mnt/lfs/NetBSD-CVS/src/external/gpl3/binutils/dist/include/xregex2.h, line
544: syntax error

I know about this one, this construct appears in a couple of places in GNU

The relevant lines which cause an error are here:
extern int regexec (const regex_t *__restrict __preg,
                   const char *__restrict __string, size_t __nmatch,
line 544:                    regmatch_t __pmatch[__restrict_arr],
                   int __eflags);

With that being said, I guess this is a gcc extension-related error,
although I'm not sure how to fix it. Based upon lines 512 to 532, line
544 should be defined to "regmatch_t __pmatch[__restrict]". Perhaps pcc
does not support that extension inside an array, but does elsewhere?

Yes, it is a GCC extension to recognise the restrict keyword in an array
declaration.  I have not fully looked into it due to lack of time but I
think it might be simple to support (ignore)


William D. Jones
Rowan University | ECE | 2012
Member IEEE
Member Tau Beta Pi
Message sent using 'Windows Live Mail' client.

Home | Main Index | Thread Index | Old Index