Re: [hatari-devel] -fno-common for macOS

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Sat, 26 Jul 2025 23:07:51 +0200
schrieb Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:

> Le 21/07/2025 à 11:45, Andreas Grabher a écrit :
> > Hello all,
> > 
> > it seems the latest compilers on macOS require -fno-common to be set in 
> > order to avoid a compilation error (/ld: warning: reducing alignment of 
> > section __DATA,__common from 0x8000 //to 0x4000 because it exceeds 
> > segment maximum alignment/).
> > 
> > Here is a post about the issue: https://lists.ffmpeg.org/pipermail/ 
> > ffmpeg-devel/2025-May/343169.html <https://lists.ffmpeg.org/pipermail/ 
> > ffmpeg-devel/2025-May/343169.html>
> > 
> > At the moment -fno-common is only set if ASAN is enabled but it should 
> > always be set.  
> 
> Hi
> 
> for now this doesn't seem to create an issue in our macOS cirrus-ci 
> build, but that's certainly because we doesn't use the latest macOS in 
> the CI job.
> 
> Let's see after 2.6.1 if there's any side effect when -fno-common is used.

According to that description on ffmpeg.org, the issue should be there
since GCC 10 and Clang 11, which are certainly several years old already
and used in older macOS versions, too. But the issue apparently only
triggers when you try to use large global tables. I guess we don't have
such large global tables in Hatari, otherwise we would have seen such
linking errors in the CI before.

 Thomas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/