bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TinyCC bugs


From: Bruno Haible
Subject: Re: TinyCC bugs
Date: Sat, 16 Oct 2010 14:20:58 +0200
User-agent: KMail/1.9.9

Hi Ludo,

> and a bit of sed to point it to the right libc:
> 
>   
> https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/development/compilers/tinycc/default.nix

Well, this is still not going to work for me. On Linux bi-arch systems, 64-bit
libraries are found in /lib64 and /usr/lib64. This line is not going to help
about it:

        -e's|tcc_add_library_path(s, CONFIG_SYSROOT 
"/lib");|tcc_add_library_path(s, "${stdenv.glibc}/lib");|g;

> > 1) In the gltests directory I get this:
> >
> > /arch/x86-linux/gnu-inst-tcc/0.9.25/bin/tcc -DHAVE_CONFIG_H -I.  
> > -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib    
> > -c -o test-_Exit.o test-_Exit.c
> > In file included from test-_Exit.c:21:
> 
> [...]
> 
> > In file included from ./../gllib/stdlib.h:35:
> > ./../gllib/stdlib.h:35: #include recursion too deep
> >
> > It's apparently a bug in the #include_next handling, triggered by the
> > use of multiple equivalent -I options (like -I../gllib -I./../gllib).
> 
> I can’t reproduce it with, e.g.:
> 
> --8<---------------cut here---------------start------------->8---
> echo '#include <chop/chop.h>' | \
>   tcc -I ~/soft/include/ -I ~/soft/include/../include/ \
>       -I ~/soft/include/./. -c -
> --8<---------------cut here---------------end--------------->8---

I can reproduce it like this:

---------------- stdlib.h --------------------
#include <stdlib.h>
---------------- foo.c -----------------------
#include <stdlib.h>
----------------------------------------------
$ /arch/x86-linux/gnu-inst-tcc/0.9.25/bin/tcc -c -I. -I. foo.c
In file included from foo.c:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
In file included from ./stdlib.h:1:
./stdlib.h:1: #include recursion too deep
$ /arch/x86-linux/gnu-inst-tcc/0.9.25/bin/tcc -c -I. -I./. foo.c
In file included from foo.c:1:
In file included from ./stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
In file included from ././stdlib.h:1:
././stdlib.h:1: #include recursion too deep

> > 2) nextafter not supported
> >
> > /arch/x86-linux/gnu-inst-tcc/0.9.25/bin/tcc     -o test-nextafter 
> > test-nextafter.o ../gllib/libgnu.a  
> > tcc: undefined symbol 'nextafter'
> > make[4]: *** [test-nextafter] Error 1
> 
> I can’t reproduce it with this stripped down case:

Indeed, the problem was already at configuration time:

  checking whether nextafter can be used without linking with libm... no
  checking whether nextafter can be used with libm... no

Fixing it through the patch below.


2010-10-16  Bruno Haible  <address@hidden>

        nextafter: Fix configure check.
        * modules/nextafter (configure.ac): Correct expected prototype.

--- modules/nextafter.orig      Sat Oct 16 14:18:44 2010
+++ modules/nextafter   Sat Oct 16 14:16:26 2010
@@ -7,7 +7,7 @@
 Depends-on:
 
 configure.ac:
-gl_MATHFUNC([nextafter], [double], [(double)])
+gl_MATHFUNC([nextafter], [double], [(double, double)])
 
 Makefile.am:
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]