diff mbox

[FFmpeg-devel,3/5] configure: memalign is broken on djgpp 2.05

Message ID 7aa021c5ccf1fa1834c99fca0bd8bc8eda57a360.1542723097.git.pross@xvid.org
State Accepted
Headers show

Commit Message

Peter Ross Nov. 20, 2018, 2:29 p.m. UTC
djgpp 2.05 finally provides posix-compatible memalign, but it is broken,
so use disable it if this version is detected.

discussion: http://www.delorie.com/archives/browse.cgi?p=djgpp/2017/12/29/16:26:58
---
 configure | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Comments

Michael Niedermayer Nov. 20, 2018, 10:24 p.m. UTC | #1
On Wed, Nov 21, 2018 at 01:29:48AM +1100, Peter Ross wrote:
> djgpp 2.05 finally provides posix-compatible memalign, but it is broken,
> so use disable it if this version is detected.
> 
> discussion: http://www.delorie.com/archives/browse.cgi?p=djgpp/2017/12/29/16:26:58
> ---
>  configure | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index 6d58d30df6..5d2f57684c 100755
> --- a/configure
> +++ b/configure
> @@ -6793,10 +6793,17 @@ check_deps $CONFIG_LIST       \
>  enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86"
>  enabled avresample && warn "Building with deprecated library libavresample"
>  
> -if test $target_os = "haiku"; then
> +case $target_os in
> +haiku)
>      disable memalign
>      disable posix_memalign
> -fi
> +    ;;
> +*-dos|freedos|opendos)
> +    if test_cpp_condition sys/version.h "defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR == 5"; then
> +        disable memalign
> +    fi

will this be fixed in the next version after 2.5 ?

[...]
Michael Niedermayer Nov. 20, 2018, 10:26 p.m. UTC | #2
On Tue, Nov 20, 2018 at 11:24:10PM +0100, Michael Niedermayer wrote:
> On Wed, Nov 21, 2018 at 01:29:48AM +1100, Peter Ross wrote:
> > djgpp 2.05 finally provides posix-compatible memalign, but it is broken,
> > so use disable it if this version is detected.
> > 
> > discussion: http://www.delorie.com/archives/browse.cgi?p=djgpp/2017/12/29/16:26:58
> > ---
> >  configure | 11 +++++++++--
> >  1 file changed, 9 insertions(+), 2 deletions(-)
> > 
> > diff --git a/configure b/configure
> > index 6d58d30df6..5d2f57684c 100755
> > --- a/configure
> > +++ b/configure
> > @@ -6793,10 +6793,17 @@ check_deps $CONFIG_LIST       \
> >  enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86"
> >  enabled avresample && warn "Building with deprecated library libavresample"
> >  
> > -if test $target_os = "haiku"; then
> > +case $target_os in
> > +haiku)
> >      disable memalign
> >      disable posix_memalign
> > -fi
> > +    ;;
> > +*-dos|freedos|opendos)
> > +    if test_cpp_condition sys/version.h "defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR == 5"; then
> > +        disable memalign
> > +    fi
> 
> will this be fixed in the next version after 2.5 ?

s/2.5/2.05/

[...]
Peter Ross Nov. 21, 2018, 11:28 a.m. UTC | #3
On Tue, Nov 20, 2018 at 11:26:31PM +0100, Michael Niedermayer wrote:
> On Tue, Nov 20, 2018 at 11:24:10PM +0100, Michael Niedermayer wrote:
> > On Wed, Nov 21, 2018 at 01:29:48AM +1100, Peter Ross wrote:
> > > djgpp 2.05 finally provides posix-compatible memalign, but it is broken,
> > > so use disable it if this version is detected.
> > > 
> > > discussion: http://www.delorie.com/archives/browse.cgi?p=djgpp/2017/12/29/16:26:58
> > > ---
> > >  configure | 11 +++++++++--
> > >  1 file changed, 9 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/configure b/configure
> > > index 6d58d30df6..5d2f57684c 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -6793,10 +6793,17 @@ check_deps $CONFIG_LIST       \
> > >  enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86"
> > >  enabled avresample && warn "Building with deprecated library libavresample"
> > >  
> > > -if test $target_os = "haiku"; then
> > > +case $target_os in
> > > +haiku)
> > >      disable memalign
> > >      disable posix_memalign
> > > -fi
> > > +    ;;
> > > +*-dos|freedos|opendos)
> > > +    if test_cpp_condition sys/version.h "defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR == 5"; then
> > > +        disable memalign
> > > +    fi
> > 
> > will this be fixed in the next version after 2.5 ?
> 
> s/2.5/2.05/

maybe. there is an attempted fix in djggp cvs, but ffmpeg is able to break that too. 

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
Michael Niedermayer Nov. 21, 2018, 11:45 a.m. UTC | #4
On Wed, Nov 21, 2018 at 10:28:16PM +1100, Peter Ross wrote:
> On Tue, Nov 20, 2018 at 11:26:31PM +0100, Michael Niedermayer wrote:
> > On Tue, Nov 20, 2018 at 11:24:10PM +0100, Michael Niedermayer wrote:
> > > On Wed, Nov 21, 2018 at 01:29:48AM +1100, Peter Ross wrote:
> > > > djgpp 2.05 finally provides posix-compatible memalign, but it is broken,
> > > > so use disable it if this version is detected.
> > > > 
> > > > discussion: http://www.delorie.com/archives/browse.cgi?p=djgpp/2017/12/29/16:26:58
> > > > ---
> > > >  configure | 11 +++++++++--
> > > >  1 file changed, 9 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/configure b/configure
> > > > index 6d58d30df6..5d2f57684c 100755
> > > > --- a/configure
> > > > +++ b/configure
> > > > @@ -6793,10 +6793,17 @@ check_deps $CONFIG_LIST       \
> > > >  enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86"
> > > >  enabled avresample && warn "Building with deprecated library libavresample"
> > > >  
> > > > -if test $target_os = "haiku"; then
> > > > +case $target_os in
> > > > +haiku)
> > > >      disable memalign
> > > >      disable posix_memalign
> > > > -fi
> > > > +    ;;
> > > > +*-dos|freedos|opendos)
> > > > +    if test_cpp_condition sys/version.h "defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR == 5"; then
> > > > +        disable memalign
> > > > +    fi
> > > 
> > > will this be fixed in the next version after 2.5 ?
> > 
> > s/2.5/2.05/
> 
> maybe. there is an attempted fix in djggp cvs, but ffmpeg is able to break that too. 

maybe we should "unconditionally" disable memalign for djgpp until its fixed,
not sure
either way iam fine with this patch too

[...]
diff mbox

Patch

diff --git a/configure b/configure
index 6d58d30df6..5d2f57684c 100755
--- a/configure
+++ b/configure
@@ -6793,10 +6793,17 @@  check_deps $CONFIG_LIST       \
 enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86"
 enabled avresample && warn "Building with deprecated library libavresample"
 
-if test $target_os = "haiku"; then
+case $target_os in
+haiku)
     disable memalign
     disable posix_memalign
-fi
+    ;;
+*-dos|freedos|opendos)
+    if test_cpp_condition sys/version.h "defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR == 5"; then
+        disable memalign
+    fi
+    ;;
+esac
 
 flatten_extralibs(){
     nested_entries=