[FFmpeg-devel] Compiling with Sun cc

Reimar Döffinger Reimar.Doeffinger
Mon Oct 6 08:41:09 CEST 2008


On Sun, Oct 05, 2008 at 09:31:56PM -0700, Roman V. Shaposhnik wrote:
> On Fri, 2008-10-03 at 09:24 +0200, Reimar D?ffinger wrote:
> > On Thu, Oct 02, 2008 at 08:10:22PM -0700, Roman V. Shaposhnik wrote:
> > > On Thu, 2008-10-02 at 11:09 +0200, Diego 'Flameeyes' Petten? wrote:
> > > > > "libavcodec/mpegvideo_enc.c", line 3288: warning: can not set non-default
> > > > > alignment for automatic variable
> > > > 
> > > > This basically means it does not support alignment for stack variable,
> > > > which is probably a very bad thing, this is actually where I stopped and
> > > > waited before continuing...
> > > 
> > > Well, it is very controversial thing, for one. The trouble is, that even
> > > gcc can not really guarantee it, since initial stack assumptions are not
> > > controlled by the compiler, but rather by the combination of an OS
> > > and how linking was done.
> > 
> > How about 64 bit compilation? Does it work there?
> 
> Well, section 3.2.2 of the amd64 ABI guarantees the stack alignment 
> of 16 bytes.

My question was not about the ABI, I know the basics of that. I do not
know how the Sun C compiler behaves though.
The Sun C compiler message is "arning: can not set non-default
alignment for automatic variable", which seems to indicate that it just
ignores the alignment, which would mean the issue still would be the
same for amd64.
Another possibility would be that the compiler has a special case for
amd64.
And a third one would be that the message actually should be "assuming
sufficiently aligned stack for non-default alignment for automatic
variable", which IMO is the most reasonable way to handle it by default.

Greetings,
Reimar




More information about the ffmpeg-devel mailing list