[Ffmpeg-devel] [PATCH] Fix compilation when using --disable-opts
Michael Niedermayer
michaelni
Fri Mar 16 01:19:35 CET 2007
Hi
On Fri, Mar 16, 2007 at 12:52:44AM +0100, Panagiotis Issaris wrote:
> Hi,
>
> M?ns Rullg?rd schreef:
> > Aurelien Jacobs <aurel at gnuage.org> writes:
> >> On Thu, 15 Mar 2007 18:26:47 +0100
> >> Panagiotis Issaris <takis.issaris at uhasselt.be> wrote:
> >>> M?ns Rullg?rd schreef:
> >>>> Diego Biurrun said:
> >>>>> On Thu, Mar 15, 2007 at 05:58:35PM +0100, Panagiotis Issaris wrote:
> >>>>>> The attached patch fixes compilation when using the --disable-opts
> >>>>>> parameter. This to help those interested in using a debugger to debug
> >>>>>> FFmpeg.
> >>>>> Looks good.
> >>>> No, the configure changes lack indentation.
> >>> Like this?
> >>>
> >>> [...]
> >>>
> >>> @@ -1390,6 +1392,31 @@ if test "$?" != 0; then
> >>> die "C compiler test failed."
> >>> fi
> >>>
> >>> +if test $arch = "x86_32"; then
> >>> + # check whether EBP is available on x86
> >>> + # As 'i' is stored on the stack, this program will crash
> >>> + # if the base pointer is used to access it because the
> >>> + # base pointer is cleared in the inline assembly code.
> >>> + ebp_available=no
> >> Shouldn't this be replaced with "disable ebp_available" ? (same for ebx)
> >
> > In fact, it can be removed entirely. Unset is mostly equivalent to
> > "no".
> Updated patch attached.
[...]
> Index: configure
> ===================================================================
> --- configure (revision 8421)
> +++ configure (working copy)
> @@ -542,6 +542,8 @@
> bktr
> dc1394
> dv1394
> + ebp_available
> + ebx_available
> ffmpeg
> ffplay
> ffserver
> @@ -1390,6 +1392,29 @@
> die "C compiler test failed."
> fi
>
> +if test $arch = "x86_32"; then
> + # check whether EBP is available on x86
> + # As 'i' is stored on the stack, this program will crash
> + # if the base pointer is used to access it because the
> + # base pointer is cleared in the inline assembly code.
> + check_exec <<EOF && enable ebp_available
> +int main(){
> + volatile int i=0;
> + asm volatile (
> + "xorl %%ebp, %%ebp"
> + ::: "%ebp");
> + return i;
> +}
> +EOF
> +
> + # check wether EBX is available on x86
> + check_cc <<EOF && enable ebx_available
> +int main(){
> + asm volatile ("":::"%ebx");
> +}
> +EOF
> +fi
> +
> # check for assembler specific support
does this set CONFIG_EBP/EBX_AVAILABLE on x86-64 ? it MUST set it
if the test is not run otherwise you disable all the asm code for x86-64
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070316/8f296cc4/attachment.pgp>
More information about the ffmpeg-devel
mailing list