[Top][All Lists]

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


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

Thanks for reporting the problem,

reply via email to

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