Skip to contentSkip to conversation

gdb: prevent building the documentation

PATCH Superseded Vicente Olivert Riera 4 participants 11 messages Sep 9, 2015

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 gdb: prevent building the documentation

Force gdb to not build the documentation. This way we avoid depending on host-texinfo. This is a temporary fix until upstream accepts a proposed --disable-docs configure option.

Since the documentation will not be build at all, we can remove the parts related to host-texinfo and MAKEINFO in the gdb.mk file.

Fixes:

http://autobuild.buildroot.net/results/dd5/dd50ed99abb2c8495def826866b184030953f90e/

---
Changes v2 -> v3:
- Use the post-patch-hook also for host-gdb (Brendan Heading)
- Remove unnecessary GDB_FROM_GIT (Romain Naour)
Changes v1 -> v2:
- Indent the sed command
- Use a post-patch-hook instead of pre-configure-hook
- Remove the parts related to host-texinfo and MAKEINFO
- Ammend the commit log to be more appropriate

 package/gdb/gdb.mk |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)
package/gdb/gdb.mk +7 -11
index 338de20..66640f8 100644
@@ -11,13 +11,11 @@ GDB_SOURCE = gdb-$(GDB_VERSION).tar.xz
 ifeq ($(BR2_arc),y)
 GDB_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,binutils-gdb,$(GDB_VERSION))
 GDB_SOURCE = gdb-$(GDB_VERSION).tar.gz
-GDB_FROM_GIT = y
 endif
 
 ifeq ($(BR2_microblaze),y)
 GDB_SITE = $(call github,Xilinx,gdb,$(GDB_VERSION))
 GDB_SOURCE = gdb-$(GDB_VERSION).tar.gz
-GDB_FROM_GIT = y
 endif
 
 # Use .tar.bz2 for 7.7.x since there was no .tar.xz release back then
@@ -53,6 +51,13 @@ GDB_PRE_PATCH_HOOKS += GDB_XTENSA_PRE_PATCH
 HOST_GDB_PRE_PATCH_HOOKS += GDB_XTENSA_PRE_PATCH
 endif
 
+# Prevent gdb to build the documentation
+define GDB_DISABLE_DOC
+	$(SED) '/^SUBDIRS =/ s/doc//' $(@D)/gdb/Makefile.in
+endef
+GDB_POST_PATCH_HOOKS += GDB_DISABLE_DOC
+HOST_GDB_POST_PATCH_HOOKS += GDB_DISABLE_DOC
+
 # When gdb sources are fetched from the binutils-gdb repository, they
 # also contain the binutils sources, but binutils shouldn't be built,
 # so we disable it.
@@ -165,15 +170,6 @@ else
 HOST_GDB_CONF_OPTS += --without-python
 endif
 
-ifeq ($(GDB_FROM_GIT),y)
-GDB_DEPENDENCIES += host-texinfo
-HOST_GDB_DEPENDENCIES += host-texinfo
-else
-# don't generate documentation
-GDB_CONF_ENV += ac_cv_prog_MAKEINFO=missing
-HOST_GDB_CONF_ENV += ac_cv_prog_MAKEINFO=missing
-endif
-
 # legacy $arch-linux-gdb symlink
 define HOST_GDB_ADD_SYMLINK
 	cd $(HOST_DIR)/usr/bin && \
Signature · 1 line
1.7.1
#1 lore raw

PATCH v3 1/1 gdb: prevent building the documentation

Quoted 4 lines

Force gdb to not build the documentation. This way we avoid depending on host-texinfo. This is a temporary fix until upstream accepts a proposed --disable-docs configure option.

Quoted 8 lines

Since the documentation will not be build at all, we can remove the parts related to host-texinfo and MAKEINFO in the gdb.mk file.

Fixes:

http://autobuild.buildroot.net/results/dd5/dd50ed99abb2c8495def826866b184030953f90e/

Tested host GDB clean rebuild for versions 7.8.x, 7.9.x and 7.10.x as well as target GDB with and without BR2_PACKAGE_GDB_DEBUGGER - builds fine in all cases.

regards

Brendan

#2 lore raw

PATCH v3 1/1 gdb: prevent building the documentation

In reply to Vicente Olivert Riera

Dear Vicente Olivert Riera,

Quoted 4 lines · Vicente Olivert Riera

Force gdb to not build the documentation. This way we avoid depending on host-texinfo. This is a temporary fix until upstream accepts a proposed --disable-docs configure option.

Quoted 8 lines

Since the documentation will not be build at all, we can remove the parts related to host-texinfo and MAKEINFO in the gdb.mk file.

Fixes:

http://autobuild.buildroot.net/results/dd5/dd50ed99abb2c8495def826866b184030953f90e/

Maybe we could do a similar thing for the binutils package (which is the only other user of the host-texinfo package), and then remove the host-texinfo package altogether. That's obviously a completely separate set of changes.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v3 1/1 gdb: prevent building the documentation

Quoted 4 lines

Maybe we could do a similar thing for the binutils package (which is the only other user of the host-texinfo package), and then remove the host-texinfo package altogether. That's obviously a completely separate set of changes.

Why not keep host-texinfo around, even if it is not used by any package which is included with buildroot ?

It would be useful to people maintaining their own packages within buildroot, now or in the future, where it's easier for them to add the dependency rather than figure out how/where to patch the package to prevent it from building documentation.

Brendan

#4 lore raw

PATCH v3 1/1 gdb: prevent building the documentation

Brendan,

Quoted 7 lines · Brendan Heading
Quoted 4 lines

Maybe we could do a similar thing for the binutils package (which is the only other user of the host-texinfo package), and then remove the host-texinfo package altogether. That's obviously a completely separate set of changes.

Why not keep host-texinfo around, even if it is not used by any package which is included with buildroot ?

Because we don't like to have host packages that are not used by any other target packages, as this means this host package is never tested.

This is something that is discussed quite often, recently for the python-colorama package. I sometimes change my mind a bit on this, it's hard to be completely clear-cut. For python-colorama, the submitter came with a potentially interesting use case.

For host-texinfo, if there's nothing that depends on it in Buildroot, we should simply drop it I believe.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH v3 1/1 gdb: prevent building the documentation

In reply to Thomas Petazzoni

Dear Thomas Petazzoni,

Quoted 12 lines · Thomas Petazzoni

Dear Vicente Olivert Riera,

Quoted 9 lines · Vicente Olivert Riera

Force gdb to not build the documentation. This way we avoid depending on host-texinfo. This is a temporary fix until upstream accepts a proposed --disable-docs configure option.

Since the documentation will not be build at all, we can remove the parts related to host-texinfo and MAKEINFO in the gdb.mk file.

Fixes:

Quoted 8 lines
Quoted 3 lines

http://autobuild.buildroot.net/results/dd5/dd50ed99abb2c8495def826866b184030953f90e/

Maybe we could do a similar thing for the binutils package (which is the only other user of the host-texinfo package), and then remove the host-texinfo package altogether. That's obviously a completely separate set of changes.

according to the binutils.mk file, only the one for ARC architecture needs host-texinfo:

ifeq ($(BR2_arc),y)
BINUTILS_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,binutils-gdb,$(BINUTILS_VERSION)) BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.gz BINUTILS_FROM_GIT = y
endif

[snip]

ifeq ($(BINUTILS_FROM_GIT),y)
BINUTILS_DEPENDENCIES += host-texinfo host-flex host-bison HOST_BINUTILS_DEPENDENCIES += host-texinfo host-flex host-bison endif

However, I have removed the texinfo package and also removed the host-texinfo dependencies from binutils.mk, and it worked fine:

$ grep "BR2_arc=y" .config
BR2_arc=y
$ ls package/texinfo
ls: cannot access package/texinfo: No such file or directory
$ ls output/build/host-binutils-arc-2015.06/.stamp_host_installed
output/build/host-binutils-arc-2015.06/.stamp_host_installed
$ ls output/build/binutils-arc-2015.06/.stamp_target_installed
output/build/binutils-arc-2015.06/.stamp_target_installed

So this dependency is unnecessary.

Regards,

Vincent.

Quoted 4 lines

Thanks,

Thomas

#6 lore raw

PATCH v3 1/1 gdb: prevent building the documentation

Vicente,

Quoted 26 lines · Vicente Olivert Riera

according to the binutils.mk file, only the one for ARC architecture needs host-texinfo:

ifeq ($(BR2_arc),y)
BINUTILS_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,binutils-gdb,$(BINUTILS_VERSION)) BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.gz BINUTILS_FROM_GIT = y
endif

[snip]

ifeq ($(BINUTILS_FROM_GIT),y)
BINUTILS_DEPENDENCIES += host-texinfo host-flex host-bison HOST_BINUTILS_DEPENDENCIES += host-texinfo host-flex host-bison endif

However, I have removed the texinfo package and also removed the host-texinfo dependencies from binutils.mk, and it worked fine:

$ grep "BR2_arc=y" .config
BR2_arc=y
$ ls package/texinfo
ls: cannot access package/texinfo: No such file or directory
Quoted 7 lines
$ ls output/build/host-binutils-arc-2015.06/.stamp_host_installed
output/build/host-binutils-arc-2015.06/.stamp_host_installed
$ ls output/build/binutils-arc-2015.06/.stamp_target_installed
output/build/binutils-arc-2015.06/.stamp_target_installed

So this dependency is unnecessary.

Actually, it is not clear to me when binutils/gdb want to rebuild their documentation. Some versions of gdb did not try to rebuild their documentation, some did. I wonder if gdb/binutils don't come with a pre-generated version of the documentation, which might get re-generated if the timestamps of the generated doc is older than the documentation source. This is pure guess.

But in any case, if host-texinfo is no longer needed to build the ARC binutils, then indeed we can drop the host-texinfo dependency, and drop the host-texinfo package as well.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#7 lore raw

PATCH v3 1/1 gdb: prevent building the documentation

Dear Thomas Petazzoni,

Quoted 45 lines · Thomas Petazzoni

Vicente,

Quoted 26 lines · Vicente Olivert Riera

according to the binutils.mk file, only the one for ARC architecture needs host-texinfo:

ifeq ($(BR2_arc),y)
BINUTILS_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,binutils-gdb,$(BINUTILS_VERSION)) BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.gz BINUTILS_FROM_GIT = y
endif

[snip]

ifeq ($(BINUTILS_FROM_GIT),y)
BINUTILS_DEPENDENCIES += host-texinfo host-flex host-bison HOST_BINUTILS_DEPENDENCIES += host-texinfo host-flex host-bison endif

However, I have removed the texinfo package and also removed the host-texinfo dependencies from binutils.mk, and it worked fine:

$ grep "BR2_arc=y" .config
BR2_arc=y
$ ls package/texinfo
ls: cannot access package/texinfo: No such file or directory
Quoted 7 lines
$ ls output/build/host-binutils-arc-2015.06/.stamp_host_installed
output/build/host-binutils-arc-2015.06/.stamp_host_installed
$ ls output/build/binutils-arc-2015.06/.stamp_target_installed
output/build/binutils-arc-2015.06/.stamp_target_installed

So this dependency is unnecessary.

Actually, it is not clear to me when binutils/gdb want to rebuild their documentation. Some versions of gdb did not try to rebuild their documentation, some did. I wonder if gdb/binutils don't come with a pre-generated version of the documentation, which might get re-generated if the timestamps of the generated doc is older than the documentation source. This is pure guess.

Quoted 3 lines

But in any case, if host-texinfo is no longer needed to build the ARC binutils, then indeed we can drop the host-texinfo dependency, and drop the host-texinfo package as well.

Maybe this is the reason why host-texinfo is no longer needed:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=bba33ab1e0f7d2ebd8f8435f92ed12e2a3c558a4

Regards,

Vincent.

Quoted 4 lines

Best regards,

Thomas

#8 lore raw

PATCH v3 1/1 gdb: prevent building the documentation

Dear Vicente Olivert Riera,

Quoted 7 lines · Vicente Olivert Riera
Quoted 3 lines

But in any case, if host-texinfo is no longer needed to build the ARC binutils, then indeed we can drop the host-texinfo dependency, and drop the host-texinfo package as well.

Maybe this is the reason why host-texinfo is no longer needed:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=bba33ab1e0f7d2ebd8f8435f92ed12e2a3c558a4

Very possible indeed. But that would only fix the problem for release tarballs, as the commit log suggests. In binutils, we were depending on host-texinfo only for ARC, because for ARC, we are pulling the binutils sources from git, not from a release tarball.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#9 lore raw

PATCH v3 1/1 gdb: prevent building the documentation

Dear Thomas Petazzoni,

Quoted 8 lines · Thomas Petazzoni

Dear Vicente Olivert Riera,

Quoted 4 lines · Vicente Olivert Riera
Quoted 3 lines

But in any case, if host-texinfo is no longer needed to build the ARC binutils, then indeed we can drop the host-texinfo dependency, and drop the host-texinfo package as well.

Quoted 8 lines
Quoted 3 lines

Maybe this is the reason why host-texinfo is no longer needed:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=bba33ab1e0f7d2ebd8f8435f92ed12e2a3c558a4

Very possible indeed. But that would only fix the problem for release tarballs, as the commit log suggests. In binutils, we were depending on host-texinfo only for ARC, because for ARC, we are pulling the binutils sources from git, not from a release tarball.

well, for ARC we are also downloading a tarball:

https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/arc-2015.06.tar.gz

But yeah, that tarball doesn't include the fixes introduced by that commit. However, it includes an interesting comment in bfs/doc/Makefile.{am,in} (the two files that commit patches):

# We do not depend on chew directly so that we can distribute the info # files, and permit people to rebuild them, without requiring the makeinfo

# program.  If somebody tries to rebuild info, but none of the .texi files
# have changed, then nothing will be rebuilt.

Regards,

Vincent.

Quoted 5 lines

Best regards,

Thomas

#10 lore raw

PATCH v3 1/1 gdb: prevent building the documentation

In reply to Vicente Olivert Riera
Quoted 12 lines · Vicente Olivert Riera

Force gdb to not build the documentation. This way we avoid depending on host-texinfo. This is a temporary fix until upstream accepts a proposed --disable-docs configure option.

Since the documentation will not be build at all, we can remove the parts related to host-texinfo and MAKEINFO in the gdb.mk file.

Fixes:

http://autobuild.buildroot.net/results/dd5/dd50ed99abb2c8495def826866b184030953f90e/

[snip]

package/gdb/gdb.mk GDB_PRE_PATCH_HOOKS += GDB_XTENSA_PRE_PATCH · line 59

Quoted 6 lines
package/gdb/gdb.mk +6 -0
+# Prevent gdb to build the documentation
+define GDB_DISABLE_DOC
+	$(SED) '/^SUBDIRS =/ s/doc//' $(@D)/gdb/Makefile.in
+endef
+GDB_POST_PATCH_HOOKS += GDB_DISABLE_DOC
+HOST_GDB_POST_PATCH_HOOKS += GDB_DISABLE_DOC

Sorry to be fickle, but post-patch hooks are not called in the OVERRIDE_SRCDIR
case, so perhaps it's better after all to do it in pre-configure (with appropriate comment why).

Or perhaps we should call post-patch hooks in .stamp-rsynced...

Regards,
Arnout

[snip]

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF