[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Lightning] WORDSIZE detection with GCC 4.2
From: |
Vitaly Magerya |
Subject: |
[Lightning] WORDSIZE detection with GCC 4.2 |
Date: |
Mon, 02 Sep 2013 15:43:51 +0300 |
User-agent: |
Thunderbird |
Hi. I'm having a problem building lightning on FreeBSD/i386: build
fails saying "cannot figure __WORDSIZE" (example log: [1]).
The problem is that FreeBSD still ships with GCC 4.2.1, and GCC 4.2
does not define _ILP32, __SIZEOF_POINTER__ or any similar macro that
directly identifies the size of a pointer (you can take a look at the
docs at [2]; __SIZEOF_POINTER__ is only defined since 4.3).
One possible workaround would be to set __WORDSIZE to 32 if __i386__,
is defined -- with a similar test for all the other platforms (I don't
even know which of the platforms that lightning supports are 32 bit).
Is there a better solution?
[1] http://redports.org/~rm/20130901164000-16447-142124/lightning-2.0.0_2.log
[2] http://gcc.gnu.org/onlinedocs/gcc-4.2.1/cpp/Common-Predefined-Macros.html
- [Lightning] WORDSIZE detection with GCC 4.2,
Vitaly Magerya <=