This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
target/10338: [gcc 3.3 regression] Cygwin cross target compilation error
- From: Svein dot Seldal at solidas dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 7 Apr 2003 12:51:12 -0000
- Subject: target/10338: [gcc 3.3 regression] Cygwin cross target compilation error
- Reply-to: Svein dot Seldal at solidas dot com
>Number: 10338
>Category: target
>Synopsis: [gcc 3.3 regression] Cygwin cross target compilation error
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Apr 07 12:56:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Svein dot Seldal at solidas dot com
>Release: gcc version 3.3 release 20030407
>Organization:
>Environment:
Windows XP/Cygwin 1.3.22. Native compiler gcc 3.2 20020907
>Description:
Compilation of cross target fails on cygwin. Tested cross targets are tic4x and avr. Tested gcc-3.3 versions are 20030407, 20030404, 20030315 and 20030302. Please note that this bug does not occur when building a native compiler.
I configure gcc with:
configure --target=tic4x --disable-nls --enable-languages="c,c++"
configure detect that mempcpy exists, but fails when it tries to link fixincl.exe. The cause of the error is located in gcc/fixinc/gnu-regex.c:5723.
#if defined HAVE_MEMPCPY || defined _LIBC
*((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
#else
memcpy (errbuf, msg, errbuf_size - 1);
errbuf[errbuf_size - 1] = 0;
#endif
configure tests and detects that mempcpy() exists (which it does). However in the gcc/fixinc/gnu-regex.c file the function __mempcpy() is used (which does _not_ exist in cygwin).
I need to comment that this bug is likely a bug or change in the cygwin libc, because the gcc-3.3 20030315 and 20030302 *has* worked on cygwin earlier. I dont know what changes I have made to my local cygwin installation that causes the failures. -- In either cases either cygwin or gcc need to change some code to get this up and working.
>How-To-Repeat:
configure --target=tic4x --disable-nls --enable-languages="c,c++"
make
>Fix:
Comment out the #if section in gcc/fixinc/gnu-regex.c:5723, and use the code in the #else section instead.
>Release-Note:
>Audit-Trail:
>Unformatted: