Make libgcobol/configure.tgt more similar to other libraries

Message ID Z9ACN7XUH3nKpxk+@tucnak
State New
Headers
Series Make libgcobol/configure.tgt more similar to other libraries |

Commit Message

Jakub Jelinek March 11, 2025, 9:28 a.m. UTC
  Hi!

When we know libgcobol is unsupported on 32-bit arches, we should just say
so in configure.tgt, the same way as on other targets.

Tested on x86_64-linux with --enable-languages=c,c++,cobol, ok for trunk?

2025-03-11  Jakub Jelinek  <jakub@redhat.com>

	* configure.tgt: Only set LIBGCOBOL_SUPPORTED for lp64
	multilibs of powerpc64le-*-linux* and x86_64-*-linux*.  Handle
	i?86-*-linux* the same as x86_64-*-linux*.


	Jakub
  

Comments

Andreas Schwab March 11, 2025, 9:45 a.m. UTC | #1
On Mär 11 2025, Jakub Jelinek wrote:

> --- libgcobol/configure.tgt.jj	2025-03-11 09:18:22.133128278 +0100
> +++ libgcobol/configure.tgt	2025-03-11 09:53:32.208959209 +0100
> @@ -30,12 +30,16 @@ case "${target}" in
>  	LIBGCOBOL_SUPPORTED=yes
>  	;;
>      powerpc64le-*-linux*)
> -	LIBGCOBOL_SUPPORTED=yes
> +	if test x$ac_cv_sizeof_void_p = x8; then
> +		LIBGCOBOL_SUPPORTED=yes
> +	fi
>  	;;
>      x86_64-*-linux*x32)
>  	LIBGCOBOL_SUPPORTED=no
>  	;;
> -    x86_64-*-linux*)
> -	LIBGCOBOL_SUPPORTED=yes
> +    x86_64-*-linux* | i?86-*-linux*)
> +	if test x$ac_cv_sizeof_void_p = x8; then
> +		LIBGCOBOL_SUPPORTED=yes
> +	fi

I think that makes the x32 match obsolete.
  
Richard Biener March 11, 2025, 9:51 a.m. UTC | #2
On Tue, 11 Mar 2025, Jakub Jelinek wrote:

> Hi!
> 
> When we know libgcobol is unsupported on 32-bit arches, we should just say
> so in configure.tgt, the same way as on other targets.
> 
> Tested on x86_64-linux with --enable-languages=c,c++,cobol, ok for trunk?

OK.

Thanks,
Richard.

> 2025-03-11  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* configure.tgt: Only set LIBGCOBOL_SUPPORTED for lp64
> 	multilibs of powerpc64le-*-linux* and x86_64-*-linux*.  Handle
> 	i?86-*-linux* the same as x86_64-*-linux*.
> 
> --- libgcobol/configure.tgt.jj	2025-03-11 09:18:22.133128278 +0100
> +++ libgcobol/configure.tgt	2025-03-11 09:53:32.208959209 +0100
> @@ -30,12 +30,16 @@ case "${target}" in
>  	LIBGCOBOL_SUPPORTED=yes
>  	;;
>      powerpc64le-*-linux*)
> -	LIBGCOBOL_SUPPORTED=yes
> +	if test x$ac_cv_sizeof_void_p = x8; then
> +		LIBGCOBOL_SUPPORTED=yes
> +	fi
>  	;;
>      x86_64-*-linux*x32)
>  	LIBGCOBOL_SUPPORTED=no
>  	;;
> -    x86_64-*-linux*)
> -	LIBGCOBOL_SUPPORTED=yes
> +    x86_64-*-linux* | i?86-*-linux*)
> +	if test x$ac_cv_sizeof_void_p = x8; then
> +		LIBGCOBOL_SUPPORTED=yes
> +	fi
>  	;;
>  esac
> 
> 	Jakub
> 
>
  

Patch

--- libgcobol/configure.tgt.jj	2025-03-11 09:18:22.133128278 +0100
+++ libgcobol/configure.tgt	2025-03-11 09:53:32.208959209 +0100
@@ -30,12 +30,16 @@  case "${target}" in
 	LIBGCOBOL_SUPPORTED=yes
 	;;
     powerpc64le-*-linux*)
-	LIBGCOBOL_SUPPORTED=yes
+	if test x$ac_cv_sizeof_void_p = x8; then
+		LIBGCOBOL_SUPPORTED=yes
+	fi
 	;;
     x86_64-*-linux*x32)
 	LIBGCOBOL_SUPPORTED=no
 	;;
-    x86_64-*-linux*)
-	LIBGCOBOL_SUPPORTED=yes
+    x86_64-*-linux* | i?86-*-linux*)
+	if test x$ac_cv_sizeof_void_p = x8; then
+		LIBGCOBOL_SUPPORTED=yes
+	fi
 	;;
 esac