This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'



------- Comment #6 from rwild at gcc dot gnu dot org  2010-09-02 17:15 -------
Please do the following:

make stage2-start
cd libiberty

cat >conftest.c <<\EOF
/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define _FILE_OFFSET_BITS 64
/* end confdefs.h.  */
#include <ctype.h>
#include <stdlib.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c)                (('a' <= (c) && (c) <= 'i')               ||
('j' <= (c) && (c) <= 'r')                   || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
  int i;
  for (i = 0; i < 256; i++)
    if (XOR (islower (i), ISLOWER (i))
        || toupper (i) != TOUPPER (i))
      return 2;
  return 0;
}
EOF

/home/snfilip/GNUBUILD/obj-4.6.0/./prev-gcc/xgcc
-B/home/snfilip/GNUBUILD/obj-4.6.0/./prev-gcc/
-B/home/snfilip/GNUBUILD/gnu460/powerpc64-unknown-linux-gnu/bin/
-B/home/snfilip/GNUBUILD/gnu460/powerpc64-unknown-linux-gnu/bin/
-B/home/snfilip/GNUBUILD/gnu460/powerpc64-unknown-linux-gnu/lib/ -isystem
/home/snfilip/GNUBUILD/gnu460/powerpc64-unknown-linux-gnu/include -isystem
/home/snfilip/GNUBUILD/gnu460/powerpc64-unknown-linux-gnu/sys-include    -o
conftest -g -O2 -gtoggle    conftest.c

./conftest; echo $?

According to the log in comment #4 this outputs 2 in your setup.  It should
output 0.  Can you find out why?  You might want to replace '-o conftest' with
-E to see preprocessed output, maybe some bogus header somewhere.

Thanks.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45482


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]