[FFmpeg-devel] [PATCH] configure: fix the bigendian test
Carl Eugen Hoyos
ceffmpeg at gmail.com
Thu Nov 12 09:30:59 EET 2020
> Am 12.11.2020 um 00:41 schrieb David Michael <fedora.dm0 at gmail.com>:
>
>> On Wed, Nov 11, 2020 at 6:20 PM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>>> Am Mi., 11. Nov. 2020 um 16:30 Uhr schrieb David Michael <fedora.dm0 at gmail.com>:
>>> There are two issues:
>>>
>>> The unused global integer does not make it into the compiled object
>>> file, so declare it static to correct this.
>>
>> How can I reproduce this issue?
>
> The configure test is basically these lines (where I use a PowerPC GCC
> for a big-endian compiler):
>
> echo "unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';" |
> powerpc-gentoo-linux-gnu-gcc $CFLAGS -c -o test.o -xc - &&
> od -A n -t x1 test.o | tr -d '\n' | grep -o '42 *49 *47 *45'
>
> In testing this just now, it seems that the static value is only
> present when "-O2 -g" is in CFLAGS, which I was always using as the
> bare minimum flags from various distro packaging environments. So
> without static, the test is broken with "-flto"; with static, the test
> is broken without "-O2 -g". Maybe it could just check for a
> _BIG_ENDIAN preprocessor definition instead.
Sorry for the misunderstanding:
What do I have to do (on the command line) to reproduce a problem with current FFmpeg git head?
Carl Eugen
More information about the ffmpeg-devel
mailing list