public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: gonz@ratloop.com
To: gcc-gnats@gcc.gnu.org
Cc: Peter.Barada@motorola.com
Subject: other/8307: libstdc++ fails to compile because of fixincludes headers
Date: Mon, 21 Oct 2002 22:26:00 -0000	[thread overview]
Message-ID: <20021022051917.11143.qmail@sources.redhat.com> (raw)


>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 */


             reply	other threads:[~2002-10-22  5:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-21 22:26 gonz [this message]
2003-01-31 17:02 rearnsha
2003-02-15 20:26 Pete Gonzalez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021022051917.11143.qmail@sources.redhat.com \
    --to=gonz@ratloop.com \
    --cc=Peter.Barada@motorola.com \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).