[FFmpeg-devel] Hacks on FATE

Michael Kostylev michael.kostylev
Thu Jun 18 16:55:56 CEST 2009


On Thu Jun 18 11:29:38 2009
M?ns Rullg?rd wrote:

>>> x86_32 DOS: --extra-cflags='-U__STRICT_ANSI__ -fno-builtin' --disable-network
>>>   What breaks without -fno-builtin?
>> The c99 math function detection doesn't work correctly - false positives
>> happen.
> Can you please post the relevant parts of config.err without this flag?

Attached. The *lrint* tests fail as expected.

>>>   Why is --disable-network needed? 
>> Network is enabled by default but DOS lacks its own network stack.
>> There is an alternative: add --extra-cflags=-I/some/non-standard/path
>> (e.g. /usr/i386-pc-msdosdjgpp/include/watt32) to make the network headers
>> visible.
> So we're missing a header check?

Exactly, patch attached.

>>> x86_32 OpenBSD: cavsdsp_mmx-fPIC-friendly.diff; CFLAGS='-fPIC -DPIC'
>>>   Does OpenBSD require PIC even for static builds?
>> Excluding completely -static.

Or linked with -pie.

> Why is this?  It makes no sense.  Does the dynamic linker not support
> text relocations at all?

That's a great question. I only checked whether ff* and seek_test binaries
linked with either -static or -pie work.

>>> x86_32 OpenSolaris: sed -i -e 's/^\(SHFLAGS\)=\(.*\)/\1=-mimpure-text \2/' config.mak
>>>   The -mimpure-text option allows non-PIC in shared libs.  This should
>>>   be set in configure.
>> Btw, the Sun linker still complains about relocations even when objects are built with 
>> -fPIC:
>> gcc -shared -Wl,-h,libavcodec.so.52 ...
>> Text relocation remains                         referenced
>>     against symbol                  offset      in file
>> .rodata (section)                   0x2fd0      libavcodec/x86/dsputil_mmx.o
>> .rodata (section)                   0x9         libavcodec/x86/idct_sse2_xvid.o
>> [skip ~4300 lines]
>> ff_pw_9                             0x3b0       libavcodec/x86/vc1dsp_mmx.o
>> ld: fatal: relocations remain against allocatable but non-writable sections
>> collect2: ld returned 1 exit status
> I take it this is without -mimpure-text, correct?

Yes.

Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no_network.diff
Type: text/x-diff
Size: 248 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090618/bae04e58/attachment.diff>
-------------- next part --------------
check_ld
check_cc
BEGIN /tmp/ffconf.XXjjUkTY.c
    1   #include <math.h>
    2   int main(void) { return (llrint(3.999f) > 0)?0:1; }
END /tmp/ffconf.XXjjUkTY.c
i386-pc-msdosdjgpp-gcc-4.2 -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -U__STRICT_ANSI__ -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fomit-frame-pointer -c -o /tmp/ffconf.XXgpe0QY.o /tmp/ffconf.XXjjUkTY.c
/tmp/ffconf.XXjjUkTY.c: In function 'main':
/tmp/ffconf.XXjjUkTY.c:2: warning: implicit declaration of function 'llrint'
/tmp/ffconf.XXjjUkTY.c:2: warning: incompatible implicit declaration of built-in function 'llrint'
i386-pc-msdosdjgpp-gcc-4.2 -o /tmp/ffconf.XXSdvzYY.exe /tmp/ffconf.XXgpe0QY.o -lz -lbz2 -lm
/tmp/ffconf.XXgpe0QY.o:ffconf.XXjjUkTY.c:(.text+0x1e): undefined reference to `_llrint'
collect2: ld returned 1 exit status
[...]
check_ld
check_cc
BEGIN /tmp/ffconf.XXjjUkTY.c
    1   #include <math.h>
    2   int main(void) { return (round(3.999f) > 0)?0:1; }
END /tmp/ffconf.XXjjUkTY.c
i386-pc-msdosdjgpp-gcc-4.2 -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -U__STRICT_ANSI__ -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fomit-frame-pointer -c -o /tmp/ffconf.XXgpe0QY.o /tmp/ffconf.XXjjUkTY.c
/tmp/ffconf.XXjjUkTY.c: In function 'main':
/tmp/ffconf.XXjjUkTY.c:2: warning: implicit declaration of function 'round'
/tmp/ffconf.XXjjUkTY.c:2: warning: incompatible implicit declaration of built-in function 'round'
i386-pc-msdosdjgpp-gcc-4.2 -o /tmp/ffconf.XXSdvzYY.exe /tmp/ffconf.XXgpe0QY.o -lz -lbz2 -lm
check_ld
check_cc
BEGIN /tmp/ffconf.XXjjUkTY.c
    1   #include <math.h>
    2   int main(void) { return (roundf(3.999f) > 0)?0:1; }
END /tmp/ffconf.XXjjUkTY.c
i386-pc-msdosdjgpp-gcc-4.2 -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -U__STRICT_ANSI__ -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fomit-frame-pointer -c -o /tmp/ffconf.XXgpe0QY.o /tmp/ffconf.XXjjUkTY.c
/tmp/ffconf.XXjjUkTY.c: In function 'main':
/tmp/ffconf.XXjjUkTY.c:2: warning: implicit declaration of function 'roundf'
/tmp/ffconf.XXjjUkTY.c:2: warning: incompatible implicit declaration of built-in function 'roundf'
i386-pc-msdosdjgpp-gcc-4.2 -o /tmp/ffconf.XXSdvzYY.exe /tmp/ffconf.XXgpe0QY.o -lz -lbz2 -lm
check_ld
check_cc
BEGIN /tmp/ffconf.XXjjUkTY.c
    1   #include <math.h>
    2   int main(void) { return (truncf(3.999f) > 0)?0:1; }
END /tmp/ffconf.XXjjUkTY.c
i386-pc-msdosdjgpp-gcc-4.2 -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -U__STRICT_ANSI__ -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fomit-frame-pointer -c -o /tmp/ffconf.XXgpe0QY.o /tmp/ffconf.XXjjUkTY.c
/tmp/ffconf.XXjjUkTY.c: In function 'main':
/tmp/ffconf.XXjjUkTY.c:2: warning: implicit declaration of function 'truncf'
/tmp/ffconf.XXjjUkTY.c:2: warning: incompatible implicit declaration of built-in function 'truncf'
i386-pc-msdosdjgpp-gcc-4.2 -o /tmp/ffconf.XXSdvzYY.exe /tmp/ffconf.XXgpe0QY.o -lz -lbz2 -lm



More information about the ffmpeg-devel mailing list