[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] Re: freetype-2.3.7 -- ftconfig.h for biarch systems
From: |
mpsuzuki |
Subject: |
[ft-devel] Re: freetype-2.3.7 -- ftconfig.h for biarch systems |
Date: |
Mon, 7 Jul 2008 19:40:36 +0900 |
On Mon, 7 Jul 2008 11:14:42 +0200 (CEST)
Peter Breitenlohner <address@hidden> wrote:
>>> * GNU/Linux (glibc-2.7) on amd64 & gcc-3.3 (default is LP64, -m32 makes
>>> LP32).
>
>Yes, but unfortunately the situation is somewhat more complicated:
>
>GNU/Linux has the commands:
> setarch ARCH [CMD]
> linux32 [CMD]
> linux64 [CMD]
>that execute CMD (or /bin/sh) under a slightly modified environment.
>Depending on the hardware ARCH could be
> i386/i486/i586/i686 vs. x86_64
> ppc/ppc32 vs. ppc64
> mips/mips32 vs. mips64
> sparc/sparc32 vs. sparc64
>etc., and linux32 or linux64 generically select the 32 or 64 bit variant.
>
>E.g., for GNU/Linux on x86_64:
> uname -m => x86_64
> linux64 uname -m => x86_64
> linux32 uname -m => i686
>but
> gcc
> linux64 gcc
> linux32 gcc
>will all produce 64 bit binaries. Adding '-m64' yields the same 64 bit
>binaries, but adding '-m32' will all produce 32 bit binaries.
Excuse me, I'm not sure what you want to say by linux64 and
linux32 command. My cpp code uses the symbols defined by cpp,
it does not use "uname -m" output at all. I tested on AMD64
and I think my sample works.
* If gcc on AMD64 is executed with -m64 or with nothing, its cpp
defines __x86_64__, and __i386__ is undefined. It is same
even if gcc is executed under linux32 or linux64. So my cpp
code defines __LP64__.
* If gcc on AMD64 is executed with -m32, its cpp defines __i386__
and __x86_64__ is undefined. It is same even if gcc is executed
under linux32 or linux64. So my cpp code defines __LP32__.
What is wrong and should be corrected?
>Conclusion: I think for gcc on a potential biarch system you should try 'gcc
>-m32' as well as 'gcc -m64' to detect its true nature. Independently of
>that, ftconfig.h should use SIZEOR_LONG only as if no other possibility
>exists. Such other possibilities could be
> #include <bits/wordsize.h>
> #ifdef __x86_64__
>and analogous.
Sorry, I'm not sure what you want me to do by checking "-m32" and
"-m64", please let me know more detail. When the gcc is found as
biarch-ready (or not-ready), is there any difference that I should do?
In the first step of my cpp code, I defined FT_SIZEOF_INT and
FT_SIZEOF_LONG from C89 standard macros INT_MAX and LONG_MAX.
If cpp does not support the evaluation of 64bit numerics, other
non-standard macros specific to the systems, libraries and compilers
are considered.
Regards,
mpsuzuki
- Re: [ft-devel] freetype-2.3.7 -- ftconfig.h for biarch systems, Sean McBride, 2008/07/01
- Re: [ft-devel] freetype-2.3.7 -- ftconfig.h for biarch systems, Werner LEMBERG, 2008/07/01
- Re: [ft-devel] freetype-2.3.7 -- ftconfig.h for biarch systems, Sean McBride, 2008/07/01
- Re: [ft-devel] freetype-2.3.7 -- ftconfig.h for biarch systems, Werner LEMBERG, 2008/07/02
- Re: [ft-devel] freetype-2.3.7 -- ftconfig.h for biarch systems, mpsuzuki, 2008/07/02
- [ft-devel] Re: freetype-2.3.7 -- ftconfig.h for biarch systems, mpsuzuki, 2008/07/04
- [ft-devel] Re: freetype-2.3.7 -- ftconfig.h for biarch systems, mpsuzuki, 2008/07/04
- [ft-devel] Re: freetype-2.3.7 -- ftconfig.h for biarch systems, Werner LEMBERG, 2008/07/06
- [ft-devel] Re: freetype-2.3.7 -- ftconfig.h for biarch systems, mpsuzuki, 2008/07/07
- [ft-devel] Re: freetype-2.3.7 -- ftconfig.h for biarch systems, Peter Breitenlohner, 2008/07/07
- [ft-devel] Re: freetype-2.3.7 -- ftconfig.h for biarch systems,
mpsuzuki <=
- Re: [ft-devel] Re: freetype-2.3.7 -- ftconfig.h for biarch systems, David Turner, 2008/07/16
- Re: [ft-devel] freetype-2.3.7 -- ftconfig.h for biarch systems, Antoine Leca, 2008/07/08
- Re: [ft-devel] freetype-2.3.7 -- ftconfig.h for biarch systems, mpsuzuki, 2008/07/09
- Re: [ft-devel] freetype-2.3.7 -- ftconfig.h for biarch systems, Antoine Leca, 2008/07/09
- Re: [ft-devel] freetype-2.3.7 -- ftconfig.h for biarch systems, Werner LEMBERG, 2008/07/09
- [ft-devel] bcc and FreeType2 (Re: freetype-2.3.7 -- ftconfig.h for biarch systems), mpsuzuki, 2008/07/11
- [ft-devel] Re: bcc and FreeType2, Werner LEMBERG, 2008/07/12
- [ft-devel] Re: bcc and FreeType2 (Re: freetype-2.3.7 -- ftconfig.h for biarch systems), Antoine Leca, 2008/07/15
- Re: [ft-devel] freetype-2.3.7 -- ftconfig.h for biarch systems, mpsuzuki, 2008/07/10
- Re: [ft-devel] freetype-2.3.7 -- ftconfig.h for biarch systems, Werner LEMBERG, 2008/07/10