diff mbox series

[FFmpeg-devel] configure: detect 64-bit generic platforms

Message ID 20240611164819.25048-1-remi@remlab.net
State New
Headers show
Series [FFmpeg-devel] configure: detect 64-bit generic platforms | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Rémi Denis-Courmont June 11, 2024, 4:48 p.m. UTC
Currently, any unrecognised platform is treated as 32-bit. This should
detect *most* 64-bit platforms, namely LP64 and LLP64 ones.
Unfortunately this will not work for ILP32 ABIs on 64-bit ISAs, but
still better than nothing.
---
 configure | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Rémi Denis-Courmont June 11, 2024, 5:06 p.m. UTC | #1
Le tiistaina 11. kesäkuuta 2024, 19.48.19 EEST Rémi Denis-Courmont a écrit :
> Currently, any unrecognised platform is treated as 32-bit. This should
> detect *most* 64-bit platforms, namely LP64 and LLP64 ones.
> Unfortunately this will not work for ILP32 ABIs on 64-bit ISAs, but
> still better than nothing.
> ---
>  configure | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/configure b/configure
> index 83284427df..24eb051713 100755
> --- a/configure
> +++ b/configure
> @@ -5599,6 +5599,12 @@ elif enabled x86; then
>          ;;
>      esac
> 
> +else
> +
> +    if test_cpp_condition inttypes.h "UINTPTR_MAX == UINT64_MAX"; then

Should probably check >= rather than ==

> +        enable fast_64bit
> +    fi
> +
>  fi
> 
>  if [ "$cpu" != generic ]; then
Sean McGovern June 11, 2024, 9:37 p.m. UTC | #2
Hi Remi,


On Tue, Jun 11, 2024, 13:06 Rémi Denis-Courmont <remi@remlab.net> wrote:

> Le tiistaina 11. kesäkuuta 2024, 19.48.19 EEST Rémi Denis-Courmont a écrit
> :
> > Currently, any unrecognised platform is treated as 32-bit. This should
> > detect *most* 64-bit platforms, namely LP64 and LLP64 ones.
> > Unfortunately this will not work for ILP32 ABIs on 64-bit ISAs, but
> > still better than nothing.
> > ---
> >  configure | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/configure b/configure
> > index 83284427df..24eb051713 100755
> > --- a/configure
> > +++ b/configure
> > @@ -5599,6 +5599,12 @@ elif enabled x86; then
> >          ;;
> >      esac
> >
> > +else
> > +
> > +    if test_cpp_condition inttypes.h "UINTPTR_MAX == UINT64_MAX"; then
>
> Should probably check >= rather than ==
>
> > +        enable fast_64bit
> > +    fi
> > +
> >  fi
> >
> >  if [ "$cpu" != generic ]; then
>
>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
>
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>

+1 for this. Let's get it in first before AVR32 & Alpha removal.

-- Sean McGovern

>
Rémi Denis-Courmont June 12, 2024, 3:32 a.m. UTC | #3
Le keskiviikkona 12. kesäkuuta 2024, 0.37.12 EEST Sean McGovern a écrit :
> +1 for this. Let's get it in first before AVR32 & Alpha removal.

AVR32 is not 64-bit; there are no deps one way or the other between the 
patches.
diff mbox series

Patch

diff --git a/configure b/configure
index 83284427df..24eb051713 100755
--- a/configure
+++ b/configure
@@ -5599,6 +5599,12 @@  elif enabled x86; then
         ;;
     esac
 
+else
+
+    if test_cpp_condition inttypes.h "UINTPTR_MAX == UINT64_MAX"; then
+        enable fast_64bit
+    fi
+
 fi
 
 if [ "$cpu" != generic ]; then