Hi Jakub, > On Fri, Apr 18, 2025 at 01:53:25PM +0200, Rainer Orth wrote: >> Unless this can be figured out quickly, I suspect the safest solution >> for now would be to replace the (not filename-related) NAME_MAX by it's >> Linux <limits.h> definition of 255. Something like this would be >> required to unbreak Solaris/amd64 --enable-languages=all bootstrap. > > I'd think if Solaris/amd64 --enable-languages=all doesn't work out of the > box, the safest thing for GCC 15 would be to ensure it doesn't include cobol > in that case (and we can surely change that for 15.2 and definitely should > for 16).
no argument from me: my primary goal for GCC 15.1 right now is to avoid breaking the build on Solaris. > So completely untested: > --- configure.ac 2025-04-08 14:08:47.450334780 +0200 > +++ configure.ac 2025-04-18 16:49:48.469756364 +0200 > @@ -801,7 +801,7 @@ case ,${enable_languages}, in > ;; > *) > case "${target}" in > - *-*-darwin*) > + *-*-darwin*|*-*-solaris*) > unsupported_languages="$unsupported_languages cobol" > ;; > x86_64-*-*|aarch64-*-*) > @@ -811,6 +811,9 @@ case ,${enable_languages}, in > ;; > esac > case "${host}" in > + *-*-solaris*) > + unsupported_languages="$unsupported_languages cobol" > + ;; > x86_64-*-*|aarch64-*-*) > ;; > *-*-*) That's one option, but maybe it's better the other way round: instead of excluding known-bad targets, restrict cobol to known-good ones (i.e. x86_64-*-linux* and aarch64-*-linux*) instead. I've been using the following for this (should be retested for safety). Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2025-03-17 Rainer Orth <r...@cebitec.uni-bielefeld.de> PR cobol/119217 * configure.ac: Restrict cobol to aarch64-*-linux*, x86_64-*-linux*. * configure: Regenerate.
# HG changeset patch # Parent 07c6a0900562d1d9cd3ea087fcd7c2f74cc2f917 cobol: Restrict COBOL to supported Linux arches [PR 119217] diff --git a/configure b/configure --- a/configure +++ b/configure @@ -3571,31 +3571,28 @@ case ,${enable_languages}, in *,cobol,*) case ,${enable_languages}, in *,c++,*) - ;; + ;; *) # We have an explicit cobol, but no c++. We need c++, because cobol # requires libstdc++ enable_languages="$enable_languages,c++" - ;; + ;; esac ;; *) case "${target}" in - *-*-darwin*) - unsupported_languages="$unsupported_languages cobol" - ;; - x86_64-*-*|aarch64-*-*) + aarch64-*-linux*|x86_64-*-linux*) ;; *-*-*) - unsupported_languages="$unsupported_languages cobol" - ;; + unsupported_languages="$unsupported_languages cobol" + ;; esac case "${host}" in - x86_64-*-*|aarch64-*-*) + aarch64-*-linux*|x86_64-*-linux*) ;; *-*-*) - unsupported_languages="$unsupported_languages cobol" - ;; + unsupported_languages="$unsupported_languages cobol" + ;; esac ;; esac diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -791,31 +791,28 @@ case ,${enable_languages}, in *,cobol,*) case ,${enable_languages}, in *,c++,*) - ;; + ;; *) # We have an explicit cobol, but no c++. We need c++, because cobol # requires libstdc++ enable_languages="$enable_languages,c++" - ;; + ;; esac ;; *) case "${target}" in - *-*-darwin*) - unsupported_languages="$unsupported_languages cobol" - ;; - x86_64-*-*|aarch64-*-*) + aarch64-*-linux*|x86_64-*-linux*) ;; *-*-*) - unsupported_languages="$unsupported_languages cobol" - ;; + unsupported_languages="$unsupported_languages cobol" + ;; esac case "${host}" in - x86_64-*-*|aarch64-*-*) + aarch64-*-linux*|x86_64-*-linux*) ;; *-*-*) - unsupported_languages="$unsupported_languages cobol" - ;; + unsupported_languages="$unsupported_languages cobol" + ;; esac ;; esac