Skip to content

Commit

Permalink
package/gcc: fix disabling the documentation
Browse files Browse the repository at this point in the history
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@green-communications.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
  • Loading branch information
Nicolas Cavallari authored and yann-morin-1998 committed Nov 26, 2023
1 parent 6a94b0b commit f7b9d3a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions package/gcc/gcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f7b9d3a

Please sign in to comment.