public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* other/8307: libstdc++ fails to compile because of fixincludes headers
@ 2002-10-21 22:26 gonz
0 siblings, 0 replies; 3+ messages in thread
From: gonz @ 2002-10-21 22:26 UTC (permalink / raw)
To: gcc-gnats; +Cc: Peter.Barada
>Number: 8307
>Category: other
>Synopsis: libstdc++ fails to compile because of fixincludes headers
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Oct 21 22:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Pete Gonzalez
>Release: GCC 3.2 / NewLib 1.10.0 / Binutils 2.12.1
>Organization:
>Environment:
Cross compiler from i686-pc-cygwin for target arm-agb-elf
>Description:
This bug has been reported before in various forms:
http://gcc.gnu.org/ml/gcc/2002-02/msg00644.html
http://gcc.gnu.org/ml/gcc/2002-04/msg00908.html
http://gcc.gnu.org/ml/gcc/2002-06/msg01602.html
The occurs because build-gcc/gcc/include/stdlib.h is being used instead of the real "stdlib.h" from NewLib. The "fixed" header file is missing many definitions which libstdc++-v3/include/cstdlib is looking for. The problem can be fixed by deleting the aforementioned file, which is created by the "fixincludes" script.
I poked around in inclhack.def, but was unable to figure out where stdlib.h is coming from; it clearly is not derived from the NewLib version. Maybe fixincludes is doing a search+replace on the wrong file? I've attached a copy of the erroneous stdlib.h for reference.
>How-To-Repeat:
Unfortunately it would be difficult to reproduce the exact compiler environment.
>Fix:
1. Run "make"
2. When compilation of libstdc++ fails, delete build-gcc/gcc/include/stdlib.h
3. Resume "make"
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="stdlib.h"
Content-Disposition: inline; filename="stdlib.h"
#ifndef __stdlib_h
#define __stdlib_h
#define __need_size_t
#include <stddef.h>
#if defined(__USE_FIXED_PROTOTYPES__) || defined(__cplusplus) || defined (__STRICT_ANSI__)
#ifndef abort
extern void abort (void);
#endif
extern int abs (int);
extern int atexit (void (*) (void));
extern double atof (const char *);
extern int atoi (const char *);
extern long int atol (const char *);
extern void * bsearch (const void *, const void *, __SIZE_TYPE__, __SIZE_TYPE__, int (*) (const void *, const void *));
extern void * calloc (__SIZE_TYPE__, __SIZE_TYPE__);
extern void exit (int);
extern void free (void *);
extern char * getenv (const char *);
extern long int labs (long int);
extern void * malloc (__SIZE_TYPE__);
extern int putenv (char *);
extern void qsort (void *, __SIZE_TYPE__, __SIZE_TYPE__, int (*) (const void *, const void *));
extern int rand (void);
extern void * realloc (void *, __SIZE_TYPE__);
extern void srand (unsigned int);
extern double strtod (const char *, char **);
extern long int strtol (const char *, char **, int);
extern long unsigned int strtoul (const char *, char **, int);
extern int system (const char *);
#endif /* defined(__USE_FIXED_PROTOTYPES__) || ... */
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
#endif /* __stdlib_h */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: other/8307: libstdc++ fails to compile because of fixincludes headers
@ 2003-02-15 20:26 Pete Gonzalez
0 siblings, 0 replies; 3+ messages in thread
From: Pete Gonzalez @ 2003-02-15 20:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR other/8307; it has been noted by GNATS.
From: Pete Gonzalez <gonz@ratloop.com>
To: gcc-gnats@gcc.gnu.org,gcc-bugs@gcc.gnu.org,nobody@gcc.gnu.org,
gcc-prs@gcc.gnu.org,gonz@ratloop.com,Peter.Barada@motorola.com
Cc:
Subject: Re: other/8307: libstdc++ fails to compile because of
fixincludes headers
Date: Sat, 15 Feb 2003 15:20:42 -0500
>I regularly build a GCC/Newlib/binutils toolchain and don't see this
>problem. Are you configuring using the "--with-headers=..." option?
Yes, but my environment is a bit unusual. I am building an ARM
cross-compiler under Cygwin, using a modified version of this kit:
http://www.io.com/~fenix/devkitadv/
I think this is just an unusual setup that hasn't been tested by
whoever maintains the "fixincludes" code. I don't think it's
specific to Cygwin, because at one point I was able to reproduce
the bug under Debian Linux. If someone wants to volunteer to
debug it, I could probably create a Makefile that reproduces the
problem in one of those environments.
Thanks,
-Pete
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: other/8307: libstdc++ fails to compile because of fixincludes headers
@ 2003-01-31 17:02 rearnsha
0 siblings, 0 replies; 3+ messages in thread
From: rearnsha @ 2003-01-31 17:02 UTC (permalink / raw)
To: Peter.Barada, gcc-bugs, gcc-prs, gonz, nobody
Synopsis: libstdc++ fails to compile because of fixincludes headers
State-Changed-From-To: open->feedback
State-Changed-By: rearnsha
State-Changed-When: Fri Jan 31 17:02:40 2003
State-Changed-Why:
I regularly build a GCC/Newlib/binutils toolchain and don't see this problem. Are you configuring using the "--with-headers=..." option?
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8307
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-02-15 20:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-21 22:26 other/8307: libstdc++ fails to compile because of fixincludes headers gonz
2003-01-31 17:02 rearnsha
2003-02-15 20:26 Pete Gonzalez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).