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

Re: [MiNT] Alignment 2



Le Sat, 09 Feb 2008 18:23:51 +0100
Vincent Rivière <vincent.riviere@freesbee.fr> a écrit:

> Patrice Mandin wrote:
> >> So we should have 2 configurations for our development tools for
> >> optimal  size and performance :
> >> "Optimized for ST": -m68000, no FPU, alignment on 2
> >> "Optimized for Falcon": -m68020-60, with FPU, alignment on 4
> >>
> >> That would be good.
> > 
> > Not so sure, what would happen if you mix 68000 program with 68020
> > compiled libs ? Or more frequently, compiling a program for 020+ and
> > linking against 68000 libraries (because 020+ libraries don't exist)
> > ?
> 
> Well, it will produce an invalid executable, or course !
> It is currently the same problem with -mshort
> 
> The problem is about the multilib model in GCC.
> The different multilib versions of a library have more or less the
> same  contents, but are binary incompatible. It should be possible to
> forbid  linking of different versions, but it is not the case right
> now.

Then I think it would be wise to keep alignment to 2 then, to retain
compatibility between libs. It's already a huge task to port recent
binutils and gcc, you don't need to add more difficulty, and it will be
harder to check what would be the cause of a problem if something
breaks.

You can always set alignment to 4 in a later release/patch, when all is
tested and working.

-- 
Patrice Mandin
WWW: http://pmandin.atari.org/
Programmeur Linux, Atari
Spécialité: Développement, jeux