This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/10957] New: m68k-cross build broken in libiberty (hashtab.c)
- From: "randy dot rude at gdcanada dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 May 2003 19:12:47 -0000
- Subject: [Bug c/10957] New: m68k-cross build broken in libiberty (hashtab.c)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10957
Summary: m68k-cross build broken in libiberty (hashtab.c)
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: major
Priority: P2
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: randy.rude@gdcanada.com
CC: gcc-bugs@gcc.gnu.org
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: m68k-elf
Build of a m68k-cross compiler fails with the following error: G_H -O2 -g -O2 -I. -I../../../gcc/libiberty/../include -W -Wall -Wtraditional -pedantic ../../../gcc/libiberty/hashtab.c -o hashtab.o ../../../gcc/libiberty/hashtab.c: In function `higher_prime_number': ../../../gcc/libiberty/hashtab.c:133: warning: implicit declaration of function `abort' ../../../gcc/libiberty/hashtab.c: In function `htab_create': ../../../gcc/libiberty/hashtab.c:204: error: `free' undeclared (first use in this function) ../../../gcc/libiberty/hashtab.c:204: error: (Each undeclared identifier is reported only once ../../../gcc/libiberty/hashtab.c:204: error: for each function it appears in.) ../../../gcc/libiberty/hashtab.c: In function `htab_try_create': ../../../gcc/libiberty/hashtab.c:214: error: `calloc' undeclared (first use in this function) ../../../gcc/libiberty/hashtab.c:214: error: `free' undeclared (first use in this function) make[1]: *** [hashtab.o] Error 1 make[1]: Leaving directory `/home/rrude/src/gnu/build-m68k-gcc/m68k-elf/libiberty' make: *** [all-target-libiberty] Error 2 This failure is also present in GCC 3.3: http://gcc.gnu.org/ml/gcc/2003-05/msg01930.html native gcc -v: Reading specs from /home/rrude/tools/native/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs Configured with: ../gcc/configure --verbose --prefix=/home/rrude/tools/native --enable-languages=c,c++,ada,java Thread model: posix gcc version 3.3 20030407 (prerelease) This trivial patch addresses the problem: -- snip diff -Nwupr gcc-20030407/libiberty/hashtab.c /home/rrude/src/gnu/gcc-20030407/libiberty/hashtab.c --- gcc-20030407/libiberty/hashtab.c 2003-01-20 11:41:47.000000000 -0700 +++ /home/rrude/src/gnu/gcc-20030407/libiberty/hashtab.c 2003-04-07 16:21:51.000000000 -0600 @@ -46,6 +46,7 @@ Boston, MA 02111-1307, USA. */ #endif #include <stdio.h> +#include <malloc.h> #include "libiberty.h" #include "hashtab.h" -- snip This patch was submitted to gcc-patches: http://gcc.gnu.org/ml/gcc-patches/2003-04/msg00726.html and a better solution was requested. It's unlikely I will be able to supply the requested changes anytime soon.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.