From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13291 invoked by alias); 22 Oct 2002 05:26:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 13271 invoked by uid 71); 22 Oct 2002 05:26:00 -0000 Resent-Date: 22 Oct 2002 05:26:00 -0000 Resent-Message-ID: <20021022052600.13270.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, Peter.Barada@motorola.com Resent-Reply-To: gcc-gnats@gcc.gnu.org, gonz@ratloop.com Received: (qmail 11144 invoked by uid 61); 22 Oct 2002 05:19:17 -0000 Message-Id: <20021022051917.11143.qmail@sources.redhat.com> Date: Mon, 21 Oct 2002 22:26:00 -0000 From: gonz@ratloop.com Reply-To: gonz@ratloop.com To: gcc-gnats@gcc.gnu.org Cc: Peter.Barada@motorola.com X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify: Peter.Barada@motorola.com Subject: other/8307: libstdc++ fails to compile because of fixincludes headers X-SW-Source: 2002-10/txt/msg00802.txt.bz2 List-Id: >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 #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 */