tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] tcc problems on FBSD 4.8 and patch


From: Billy
Subject: Re: [Tinycc-devel] tcc problems on FBSD 4.8 and patch
Date: Tue, 22 Apr 2003 13:51:03 -0700
User-agent: Mutt/1.4i

On Tue, Apr 22, 2003 at 09:18:42PM +0200, Peter Firefly Lund wrote:

> Thanks for using the right MIME type (TEXT/PLAIN) -- but putting the patch
> inline would have been even better.  The patch programs accepts whole
> emails just fine.
> 
> An inline patch is much easier to review and comment on -- and that must
> be the whole point of using patches in text format, right?

Noted.

> --- Makefile  Mon Apr 14 15:21:17 2003
> +++ Makefile  Sun Apr 20 23:28:17 2003
> @@ -3,9 +3,11 @@
>  #
>  include config.mak
> 
>  CFLAGS=-O2 -g -Wall
> +ifeq ($(OS),"Linux")
> 
> Nice how it gets set by the config file.
> (Wouldn't OS=`uname` do just as well?)

Yes, but I was following the existing style.  AR does the same sort of
thing, although it is an application.

> --- bcheck.c  Mon Apr 14 15:21:17 2003
> +++ bcheck.c  Sun Apr 20 23:28:17 2003
> @@ -777,13 +777,13 @@
>      }
>  }
> 
>  #ifndef CONFIG_TCC_MALLOC_HOOKS
> -void *__bound_calloc(size_t nmemb, size_t size)
> +void *__bound_calloc(size_t nmemb, size_t size, const void *caller)
> 
> Perhaps __const would be better?  The bounds checking code is very tightly
> bound to the memory allocator used in glibc (ptmalloc, derived from Doug
> Lea's malloc) and it uses __const -- defined in malloc.h.

I wasn't really thinking about changing the sematics of the code, only
changing the syntax to compile on FreeBSD.  This patch really only for
platform portability.

> > If I have some time, I would like to try and track down
> > the linking issue on FreeBSD.  Any pointers or thoughts on it would be
> > appreciated.
> 
> I did some googling on the subject a couple of months back to help
> somebody in comp.lang.ml get mosml to compile (which is a lot simpler
> than making tcc become a good FreeBSD citizen).  I think the issue was
> that FreeBSD simply doesn't have a complete libdl implementation but that
> they are finally looking into and (probably) deciding that this
> new-fangled technology is not such a bad idea after all.
> 
> There is /some/ implementation of dlsym() and friends but it is not as
> complete as in Linux (and some of the flags are missing).

I think they are discussing this on -Current.
I currently don't know enough on dynamic linking to comment further.

-billy





reply via email to

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