tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Patch for graphics/lcms2 (alignment issues on sparc)
> On Oct 31, 2026, at 4:38 PM, Taylor R Campbell <riastradh%netbsd.org@localhost> wrote:
>
>
>>
>> Date: Sat, 31 Oct 2026 14:24:04 -0400
>> From: vom513 <vom513%gmail.com@localhost>
>>
>> +# lcms2's suballocator defaults to sizeof(void *) alignment; 32-bit SPARC
>> +# needs 8 for doubles (Ghostscript's bundled lcms2mt already does this).
>> +.if ${MACHINE_ARCH} == "sparc"
>> +CPPFLAGS+= -DCMS_PTR_ALIGNMENT=8
>
> Maybe this should be alignof(max_align_t) instead? I expect this
> affects more than just sparc32.
Upstream declined to change the default (PR #635). The maintainer agrees pointer size is the wrong default for sparc32, but lcms2 is
used on memory-constrained embedded targets (e.g. dsPIC) where a
larger default alignment would waste memory, so he prefers that platforms needing it pass -DCMS_PTR_ALIGNMENT explicitly, and
specifically suggested pkgsrc do so.
https://github.com/mm2/Little-CMS/pull/635
Home |
Main Index |
Thread Index |
Old Index