lightning
[Top][All Lists]
Advanced

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

Re: [Lightning] WORDSIZE detection with GCC 4.2


From: Paulo César Pereira de Andrade
Subject: Re: [Lightning] WORDSIZE detection with GCC 4.2
Date: Mon, 2 Sep 2013 12:47:58 -0300

2013/9/2 Vitaly Magerya <address@hidden>:
> Hi. I'm having a problem building lightning on FreeBSD/i386: build
> fails saying "cannot figure __WORDSIZE" (example log: [1]).

  Hi,

> 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).

  I just started working on having 2 vms (i386 and amd64) of FreeBSD 9.1
so that I can keep a test environment.

> 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).

  That is an option.

> Is there a better solution?

  There may be something else in "cpp -dM /dev/null", or some header
like <limits.h>.

  It should work with CFLAGS="$CFLAGS -D__WORDSIZE=32" as
it would not be overwritten anywhere...

> [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

Thanks for reporting the problem,
Paulo



reply via email to

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