[MPlayer-dev-eng] Compilation issue

Maurizio Monge monge at sns.it
Sun Apr 11 11:38:13 CEST 2004


I wasn't able to compile MPlayer with gcc 3.4 prerelease because of
expressions like (for instance in postproc/swscale.c):

//------------BEGIN--------------- 
static const int hello = 56; 
int main() 
{ 
        asm( 
        "mov hello, %eax\n" 
        ); 
        return 0; 
} 
//------------END----------------- 

this program compiles fine with gcc-3.2.3 -O0 and -O2 and gcc-3.4 -O0,
but fails with gcc-3.4 -O2 (undefined reference to `hello', etc...).

I reported the bug to gcc people, but they answered:

Invalid, you have to mark the static const as used if you are going to use it 
in asm.
Do the following:
static const int hello __attribute__((used)) = 56; 


What do you mplayer developers think about that?

Maurizio


-- 
Your mouse has moved. Windows must be restarted for the change
to take effect. Reboot now?




More information about the MPlayer-dev-eng mailing list