[FFmpeg-trac] #4474(build system:new): Some inline asm code does not compile on Haiku 32-bit with GCC 4
FFmpeg
trac at avcodec.org
Sat Apr 11 21:04:37 CEST 2015
#4474: Some inline asm code does not compile on Haiku 32-bit with GCC 4
-------------------------------------+-------------------------------------
Reporter: | Owner:
Timothy_Gu | Status: new
Type: defect | Component: build
Priority: normal | system
Version: git- | Keywords: haiku
master | Blocking:
Blocked By: | Analyzed by developer: 0
Reproduced by developer: 0 |
-------------------------------------+-------------------------------------
== Summary of the bug ==
FFmpeg does not compile on Haiku 32-bit out-of-the-box.
== How to reproduce ==
Clone FFmpeg.
Configure with `--enable-gpl` (but that shouldn't matter).
Make.
{{{
CC libavfilter/x86/vf_noise.o
libavfilter/x86/vf_noise.c: In function 'line_noise_avg_mmx':
libavfilter/x86/vf_noise.c:62:5: error: 'asm' operand has impossible
constraints
__asm__ volatile(
^
make: *** [libavfilter/x86/vf_noise.o] Error 1
}}}
== Workarounds ==
1. Configure with `--disable-inline-asm`
2. Manually define `HAVE_6REGS` or `HAVE_EBP_AVAILABLE` to 0.
3. Manually set `CFLAGS` to `-fno-PIC` (Haiku uses PIC by default so to
disable it one has to explicitly add `-fno-PIC`)
== Interesting parts in `config.log` ==
{{{
check_ld cc
check_cc
BEGIN /tmp/ffconf.uJdXoo5E.c
1 #include <signal.h>
2 static void sighandler(int sig){
3 raise(SIGTERM);
4 }
5 int foo(void){
6 volatile int i=0;
7 __asm__ volatile ("xorl %%ebp, %%ebp" ::: "%ebp");
8 return i;
9 }
10 int (*func_ptr)(void) = foo;
11 int main(void){
12 signal(SIGILL, sighandler);
13 signal(SIGFPE, sighandler);
14 signal(SIGSEGV, sighandler);
15 #ifdef SIGBUS
16 signal(SIGBUS, sighandler);
17 #endif
18 return func_ptr();
19 }
END /tmp/ffconf.uJdXoo5E.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC
-std=c99 -fomit-frame-pointer -fPIC -c -o /tmp/ffconf.47o9YaJR.o
/tmp/ffconf.uJdXoo5E.c
gcc -o /tmp/ffconf.L9dLDbtf /tmp/ffconf.47o9YaJR.o
check_inline_asm ebx_available ""::"b"(0)
check_cc
BEGIN /tmp/ffconf.uJdXoo5E.c
1 void foo(void){ __asm__ volatile(""::"b"(0)); }
END /tmp/ffconf.uJdXoo5E.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC
-std=c99 -fomit-frame-pointer -fPIC -c -o /tmp/ffconf.47o9YaJR.o
/tmp/ffconf.uJdXoo5E.c
/tmp/ffconf.uJdXoo5E.c: In function 'foo':
/tmp/ffconf.uJdXoo5E.c:1:17: error: inconsistent operand constraints in an
'asm'
void foo(void){ __asm__ volatile(""::"b"(0)); }
^
}}}
== Compiler version ==
{{{
gcc (2014_12_21) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
}}}
== Patches should be submitted to the ffmpeg-devel mailing list and not
this bug tracker. ==
I know.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4474>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list