[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] TCC on OS X
From: |
Thomas Preud'homme |
Subject: |
Re: [Tinycc-devel] TCC on OS X |
Date: |
Wed, 15 Sep 2010 12:47:44 +0200 |
User-agent: |
KMail/1.13.5 (Linux/2.6.32-5-686; KDE/4.4.5; i686; ; ) |
Le mercredi 15 septembre 2010 00:59:20, vous avez écrit :
> Hey Thomas,
> Sorry for the confusion. As I understand it OS X 10.6 is a 64 bit OS that
> reports itself as i386 for compatibility. The OS has both 32 and 64 bit
> versions of most libraries and headers.
>
> I'm going to try installing TCC tonight on OS X 10.5 which is purely 32
> bit, to see if that works correctly.
>
> In the meantime I have tried manually changing the config.mak and config.h
> files to force a 32 bit build for the x86_64 architecture. I have no idea
> whether this is heading in the right direction or not, but I certainly get
> a different error message now, so I see that as encouraging... :-p
>
> config.mak (changes only)
> CLFAGS=-O2 -m32
> ARCH=x86-64
>
> config.h (changes only)
> #define HOST_X86_64 1
>
> The error I get now is:
> $ make
> gcc -o tcc tcc.c -DTCC_TARGET_X86_64 -O2 -m32 -g -Wall -fno-strict-aliasing
> -Wno-pointer-sign -lm -ldl
> In file included from tcc.c:21:
> libtcc.c: In function ‘rt_get_caller_pc’:
> libtcc.c:1481: error: request for member ‘gregs’ in something not a
> structure or union
> libtcc.c:1481: error: ‘EIP’ undeclared (first use in this function)
> libtcc.c:1481: error: (Each undeclared identifier is reported only once
> libtcc.c:1481: error: for each function it appears in.)
> libtcc.c:1490: error: request for member ‘gregs’ in something not a
> structure or union
> libtcc.c:1490: error: ‘EBP’ undeclared (first use in this function)
> make: *** [tcc] Error 1
Ok, I got a fix for that. Could you try applying the patch attached to this
email? Save the patch somewhere and do patch -p1 <
path/to/patch/macos_mcontext.diff
If this patch is not enough, try adding #define_XOPEN_SOURCE before the
"#include <sys/ucontext.h>" line in tcc.h and tells me if it makes any
difference.
As to handling mac os X 10.6 in configure I need the result of uname -s and
uname -a (just in case). By the way, are you sure macos X 10.6 is only 64 bits
? Because if it's not the case I need to find a way to differentiate between a
64 bit macos fainting 32 bit and a real 32 bit one.
>
> > Could you send me an attached file with the result of echo "" | cpp -dM
>
> please?
> I have attached the result to this email.
Thanks, it was helpful.
>
> Thanks again for your help.
> - Aaron
Best regards,
Thomas Preud'homme
>
> ---
> Aaron Gough
> Web Developer
>
> +1-647-746-7083
> www.thingsaaronmade.com
macos_mcontext.diff
Description: Text Data
signature.asc
Description: This is a digitally signed message part.
- [Tinycc-devel] TCC on OS X, Aaron Gough, 2010/09/14
- Re: [Tinycc-devel] TCC on OS X, Thomas Preud'homme, 2010/09/14
- Re: [Tinycc-devel] TCC on OS X, Aaron Gough, 2010/09/14
- Re: [Tinycc-devel] TCC on OS X, Thomas Preud'homme, 2010/09/14
- Re: [Tinycc-devel] TCC on OS X, Thomas Preud'homme, 2010/09/14
- Re: [Tinycc-devel] TCC on OS X, Aaron Gough, 2010/09/14
- Re: [Tinycc-devel] TCC on OS X, Aaron Gough, 2010/09/14
- Re: [Tinycc-devel] TCC on OS X,
Thomas Preud'homme <=
- Re: [Tinycc-devel] TCC on OS X, Aaron Gough, 2010/09/15
- Re: [Tinycc-devel] TCC on OS X, Thomas Preud'homme, 2010/09/15
- Re: [Tinycc-devel] TCC on OS X, Aaron Gough, 2010/09/15
- Re: [Tinycc-devel] TCC on OS X, Aaron Gough, 2010/09/15
- Re: [Tinycc-devel] TCC on OS X, Thomas Preud'homme, 2010/09/15
- Re: [Tinycc-devel] TCC on OS X, Aaron Gough, 2010/09/16
- Re: [Tinycc-devel] TCC on OS X, Thomas Preud'homme, 2010/09/16
- Re: [Tinycc-devel] TCC on OS X, Aaron Gough, 2010/09/16
- Re: [Tinycc-devel] TCC on OS X, Derek Fawcus, 2010/09/15