Bug#195123: libc6-dev: Bug in alloca.h for compilers other than gcc
Package: libc6-dev
Version: 2.2.5-11.5
Severity: normal
In /usr/include/alloca.h we find
--------------------------------------------------------
extern void *alloca (size_t __size) __THROW;
#ifdef __GNUC__
# define alloca(size) __builtin_alloca (size)
#endif /* GCC. */
--------------------------------------------------------
Things work fine with gcc, but they don't with anything else
- the alloca referred to in the extern void* doesn't seem to
exist in the libraries.
In particular, I tried TCC (package tcc) and I used it to
compile lwc version 0.5, available at
http://students.ceid.upatras.gr/~sxanth/lwc/lwc-0.5.tar.bz2
(I replaced gcc with tcc in the Makefile) and the result was
tcc -O2 main.c objdir/*.o -o objdir/lwc
tcc: undefined symbol 'alloca'
and also I tried doing this last step with gcc, but with
similar results:
gcc -O2 main.c objdir/*.o -o objdir/lwc
objdir/dcl.o: In function `add_this':
objdir/dcl.o(.text+0x1152): undefined reference to `alloca'
objdir/dcl.o: In function `mark_function_def':
objdir/dcl.o(.text+0x2702): undefined reference to `alloca'
objdir/dcl.o: In function `pdcl_function':
objdir/dcl.o(.text+0x2871): undefined reference to `alloca'
objdir/dcl.o: In function `send_virtual':
objdir/dcl.o(.text+0x29f4): undefined reference to `alloca'
objdir/dcl.o(.text+0x2ab8): undefined reference to `alloca'
objdir/dcl.o(.text+0x32f4): more undefined references to `alloca' follow
collect2: ld returned 1 exit status
but it worked fine with gcc-3.0 in the Makefile instead of
tcc.
(I wasn't sure whether to report this as libc6 or libc6-dev)
-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux ssb22 2.4.21-rc1-ssb #13 Tue Apr 29 16:48:19 BST 2003 i686
Locale: LANG=en_GB, LC_CTYPE=en_GB
Versions of packages libc6-dev depends on:
ii libc6 2.2.5-11.5 GNU C Library: Shared libraries an
Reply to: