[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] cygwin build
From: |
Gregg Reynolds |
Subject: |
Re: [Tinycc-devel] cygwin build |
Date: |
Wed, 29 Aug 2007 08:59:32 -0500 |
On 8/28/07, Rob Landley <address@hidden> wrote:
> I just yanked the ucontext.h include. Let me know when you've got a patch for
> the other two...
Ok, I have a patch, but it's a bit more ambitious. I have:
* stripped Makefile and configure to the bare minimum necessary to
make it go on cygwin
* revamped the install stuff to conform with gnu standards. Put
tcc-specific headers (stddef.h, etc) in PREFIX/lib/tcc/include.
They're private to tcc, so they don't belong in the user-visible
include directories. This might require some tweaking of tcc to look
there first; I haven't tested this out yet, just set up the structure.
This is how gcc does it on cygwin; I had a hell of a time finding
stddef.h. This is part of the larger portability issue of tcc's
relation to various c std libs, to be addressed in a separate message.
* migrated feature tests from bcheck.c to a new file, platform.h,
that gets included in config.h. Specifically, the stuff involving
CONFIG_TCC_MALLOC_HOOKS. I changed that name to HAVE_MALLOC_HOOKS,
and test and set it in platform.h.
* migrated feature tests for strtold etc from tcc.h to platform.h
* migrated into platform.h conditional preproc code from tcc.h involving
TCC_TARGET_I386
CONFIG_TCC_BCHECK
CONFIG_TCC_STATIC
CONFIG_TCC_ASM
TCC_TARGET_COFF
and renamed CONFIG_TCC_BCHECK to HAVE_BCHECK (changes in tcc.c,
tccelf.c, tcctok.c, i386/i386gen.c, etc.)
I think the easiest thing to do might be for you to create branches
for each platform. I've got tinycc-cygwin, tinycc-mingw, tinycc-obsd,
tinycc-osx, and tinycc-fbsd. If I could clone those from your master
repository it might be easier to work with for testing and
experimenting.
Whaddya think?
-gregg