[Buildroot] [PATCH 1/1] package/gcc: fix disabling the documentation
Yann E. MORIN
yann.morin.1998 at free.fr
Sun Nov 26 15:38:19 UTC 2023
Nicolas, All,
On 2023-11-22 16:47 +0100, Nicolas Cavallari spake thusly:
> gcc.mk attempts to disable building the documentation by setting
> MAKEINFO=missing, but it is not working. If makeinfo is installed
> and recent enough, gcc still uses it. This can be checked easily:
>
> grep BUILD_INFO='info' host-gcc-initial-*/build/gcc/config.log
>
> It happens because the root ./configure script will check
> $MAKEINFO --version (aka 'missing --version') and will overwrite it with
> MAKEINFO='missing makeinfo' because the version does not match.
>
> Having MAKEINFO='missing makeinfo' is a problem because
> 'missing makeinfo' will actually attempt to run 'makeinfo' before
> failing with an error message. If makeinfo is installed on the host,
> then 'missing makeinfo' will successfully run makeinfo anyway.
>
> Many gcc subprojects will check $MAKEINFO --version and enable building
> the documentation if it is recent enough. This patch overrides these
> checks by forcing gcc_cv_prog_makeinfo_modern=no.
>
> Building the GCC documentation can fail with the wrong makeinfo version.
> It happened at least when building GCC 11.3.0 with makeinfo 7.1.
>
> Signed-off-by: Nicolas Cavallari <nicolas.cavallari at green-communications.fr>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
>
> This patch is mostly useful when backported to 2023.02
> ---
> package/gcc/gcc.mk | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
> index 9a164c8374..93bc46643c 100644
> --- a/package/gcc/gcc.mk
> +++ b/package/gcc/gcc.mk
> @@ -91,9 +91,12 @@ HOST_GCC_COMMON_CONF_OPTS += --with-debug-prefix-map=$(BASE_DIR)=buildroot
> endif
>
> # Don't build documentation. It takes up extra space / build time,
> -# and sometimes needs specific makeinfo versions to work
> +# and sometimes needs specific makeinfo versions to work. Override the check
> +# for a modern makeinfo otherwise the configure scripts will still enable it.
> HOST_GCC_COMMON_CONF_ENV = \
> MAKEINFO=missing
> +HOST_GCC_COMMON_MAKE_OPTS = \
> + gcc_cv_prog_makeinfo_modern=no
>
> GCC_COMMON_TARGET_CFLAGS = $(TARGET_CFLAGS)
> GCC_COMMON_TARGET_CXXFLAGS = $(TARGET_CXXFLAGS)
> @@ -298,7 +301,7 @@ HOST_GCC_COMMON_TOOLCHAIN_WRAPPER_ARGS += -DBR_CROSS_PATH_SUFFIX='".br_real"'
> # For gcc-final, the gcc logic to detect whether SSP support is
> # available or not in the C library is not working properly for
> # uClibc, so let's be explicit as well.
> -HOST_GCC_COMMON_MAKE_OPTS = \
> +HOST_GCC_COMMON_MAKE_OPTS += \
> gcc_cv_libc_provides_ssp=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no)
>
> ifeq ($(BR2_CCACHE),y)
> --
> 2.42.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
More information about the buildroot
mailing list