Hi! Enabling cobol explicitly (at least unconditionally) in gcc_release has the disadvantage that the script no longer works for GCC <= 14, I think it would be better to keep it working for all still supported release branches.
And as mentioned in the PR, we still don't generate the --enable-generated-files-in-srcdir extras/infos/man pages for languages not actually enabled. Using --enable-languages=all would mean gcc_release takes far longer and more importantly, various FEs have extra dependencies, Ada requires a working Ada compiler (furthermore not newer than the gcc release, so if I run this on a system with say GCC 15 installed, even when I have Ada installed, I won't be able to gcc_release GCC 14 or 13 etc.), D working D compiler, Go takes a long time to build libgo. So, the following patch instead takes similar approach to what make regenerate-opt-urls takes, it generates stuff even for non-enabled languages. For most languages it works just fine and is a matter of say for cobol make cobol.srcextra cobol.srcinfo cobol.srcman The only problem is Modula 2, which has some messed up dependencies and when the FE is not enabled, this will try to build the whole FE as well and fail. I think it would be useful to fix that but at least before that is fixed on the trunk and all release branches, the following patch just conditionally (so that it works even for GCC 12 which doesn't have Modula 2) enables also m2. And lastly, libffi seems to be only enabled for Go (and maybe D), I'd prefer not to enable those languages for the reasons stated above, so if we really need libffi.info in release tarballs (despite libffi being used only as implementation detail and not installed), the patch just generates it by hand. Tested on x86_64-linux, ok for trunk? 2025-03-29 Jakub Jelinek <ja...@redhat.com> PR other/119510 * gcc_release: Use --enable-languages=c,c++,lto and if m2 is available, with,m2 appended to that. Check for all possible languages and run make $lang.srcextra $lang.srcinfo $lang.srcman for those. Add libffi/doc/libffi.info. --- maintainer-scripts/gcc_release.jj 2025-03-28 15:44:23.714526549 +0100 +++ maintainer-scripts/gcc_release 2025-03-28 19:37:33.955981486 +0100 @@ -266,10 +266,28 @@ EOF '' | 0* | *[!0-9]*) num_cpus=1;; esac fi + enable_langs=c,c++,lto + if [ -f ${SOURCE_DIRECTORY}/gcc/m2/Make-lang.in ]; then + enable_langs=$enable_langs,m2 + fi contrib/gcc_build -d ${SOURCE_DIRECTORY} -o ${OBJECT_DIRECTORY} \ - -c "--enable-languages=default,cobol --enable-generated-files-in-srcdir --disable-multilib" \ + -c "--enable-languages=$enable_langs --enable-generated-files-in-srcdir --disable-multilib" \ -m "-j$num_cpus" build || \ error "Could not rebuild GCC" + cd ${OBJECT_DIRECTORY}/gcc + all_languages=`sed -n -e '/"all_languages"/s/^.*=//p' config.status \ + | sed -e 's/"//g'` + for lang in $all_languages; do + make $lang.srcextra $lang.srcinfo $lang.srcman || \ + error "Could not build GCC $lang source extras" + done + if [ -d ${SOURCE_DIRECTORY}/libffi/doc ]; then + makeinfo --split-size=5000000 -I ${SOURCE_DIRECTORY}/gcc/doc/include \ + -I ${SOURCE_DIRECTORY}/libffi/doc/ -o ${SOURCE_DIRECTORY}/libffi/doc/libffi.info \ + ${SOURCE_DIRECTORY}/libffi/doc/libffi.texi || \ + error "Could not build libffi.info" + fi + cd ${SOURCE_DIRECTORY} fi # Move message catalogs to source directory. Jakub