[FFmpeg-devel] Compiling with Sun cc
Uoti Urpala
uoti.urpala
Fri Oct 3 05:46:25 CEST 2008
On Thu, 2008-10-02 at 20:10 -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.
The initial stack state is irrelevant. GCC will always align the stack
at the start of main(). The only way stack alignment can fail is if
GCC-generated code is called from a function compiled with another
compiler that does not keep the stack aligned. Even that case can be
handled by setting the force_align_arg_pointer function attribute for
functions that can be called from outside code. GCC will then add code
to explicitly align the stack at the start of those functions. FFmpeg
uses that attribute for functions that can be called from outside the
library and require the stack to be aligned.
More information about the ffmpeg-devel
mailing list