sizeof(long) and universal builds
Mojca Miklavec
mojca at macports.org
Fri Mar 2 06:41:18 UTC 2018
On 2 March 2018 at 07:15, Joshua Root wrote:
> On 2018-3-2 08:27 , Mojca Miklavec wrote:
>> On 1 March 2018 at 20:42, Michael Dickens wrote:
>>> In the past, I've handled this situation by using the muniversal PortGroup, so that the sizeof is correct for each build independent of the other. - MLD
>>
>> I'm aware of that. I was wondering if there was some *proper* solution
>> that could allow compiling just once.
>
> Quite a few ports avoid having to use muniversal with a small ed script
> that is applied to config.h in post-configure. You could also patch
> config.h.in and remove the check from the configure script to avoid the
> failure (though I'm not sure why it's failing rather than simply
> erroneously producing a single value.)
>
> Examples of the ed script approach: glib2, lzo, flac.
>
> BTW, checking the size of types by compiling a program at configure time
> should be avoided in general because it also makes cross-compilation
> difficult.
This one was now fixed upstream:
https://github.com/gdraheim/zziplib/commit/9c3d8567d928d04a9ca5a540b494b99c03c8b99e
Thanks for hints,
Mojca
More information about the macports-dev
mailing list