> -----Original Message-----
> From: Matthias Klose <d...@debian.org>
> Sent: Wednesday, February 19, 2025 06:55
> To: gcc-patches@gcc.gnu.org; James K. Lowden <jklow...@schemamania.org>
> Subject: Re: [PATCH] COBOL 3/15 92K bld: config and build machinery
>
> libgcobol/ChangeLog
>       * Makefile.in: New file.
>       * acinclude.m4: New file.
>       * aclocal.m4: New file.
>       * configure.ac: New file.
>       * configure.tgt: New file.
>
> I had updated the configure.tgt, please find it attached here again.

And I thank you for those efforts.  Jim and I have come up against the basic 
problem of "If we try to incrementally do everything, then we risk 
completing nothing."  We will return to the LIBGCOBOL_SUPPORTED question 
when I have an oppurtunity to understand it better.

>
> also disabling cobol in the toplevel configury seems to be strange.
>
> +# It's early days for COBOL, and it is known to compile on only some
> host and
> +# target systems.  We remove COBOL from other builds with a warning.
> +
> +cobol_is_okay_host="no"
> +cobol_is_okay_target="no"
> +
> +case "${host}" in
> +  x86_64-*-*)
> +    cobol_is_okay_host="yes"
> +    ;;
> +  aarch64-*-*)
> +    cobol_is_okay_host="yes"
> +    ;;
> +esac
> +case "${target}" in
> +  x86_64-*-*)
> +    cobol_is_okay_target="yes"
> +    ;;
> +  aarch64-*-*)
> +    cobol_is_okay_target="yes"
> +    ;;
> +esac
> +
> +if test "$cobol_is_okay_host" = "no" || test "$cobol_is_okay_target" =
> "no"; then
> +   if echo "${new_enable_languages}" | grep "cobol" >/dev/null 2>&1; then
> +   echo "WARNING: cobol is not available on this host or target"
> +   new_enable_languages=`echo "${new_enable_languages}" | sed
> s/,cobol//g`
> +   fi
> +fi
> +
>
> I don't see that for other languages.

I agree that it is unique, and the game plan is to remove that code in the 
future.

But at the present time, my immediate goal is to introduce cobol in a way 
that has absolutely no impact on existing scripting. Right now, the only 
systems that I personally know can build cobol are 64-bit x86_64 and 
aarch64. And given that, right now, I am the only one supporting cobol, I 
wanted to restrict compilation to those systems I know work.

I tried modifying configure.ac to put cobol on the list of "can't be done" 
languages for certain hosts/targets, at which point a warning was issued 
(which is what I wanted).  But then the configure stopped with a failure 
code.  That was no good because it was inconsistent with my self-imposed 
goal of "don't interfere with existing scripting".

So, I came up with the "remove cobol from the list except for aarch64 and 
x86_64" solution.

At some point I hope to learn more about how testing and packaging are 
accomplished so that the the configure.ac can be improved.  But for now I 
chose to err on the side "don't break the build."

>It's also missing the powerpc64le-
> linux-gnu target, where it builds as well.

Thanks for that information.  I currently don't have access to a powerpc. 
My hope at this point is that we can get cobol into GCC-15, and then 
somebody who can actually test the change can make the change.

>
> Matthias

Reply via email to