All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/3] gdb: get rid of host-texinfo dependency
@ 2016-10-08 19:03 Thomas De Schampheleire
  2016-10-08 19:03 ` [Buildroot] [PATCH v2 2/3] binutils: get rid of host-texinfo dependency and other documentation tricks Thomas De Schampheleire
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Thomas De Schampheleire @ 2016-10-08 19:03 UTC (permalink / raw)
  To: buildroot

From: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

The host-texinfo dependency in gdb/host-gdb was added because gdb insisted
in building info documentation in recent versions, and we want to avoid
'makeinfo' to be present on the build system.

However, there is another solution that does not require actually building
host-texinfo: instruct the makefiles to use a dummy makeinfo command
('true').

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
 package/gdb/gdb.mk | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

v2: use INSTALL_TARGET_OPTS for target packages iso INSTALL_OPTS
(INSTALL_STAGING_OPTS not needed: INSTALL_STAGING != YES)

diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk
index 1c778e9..0e7abfd 100644
--- a/package/gdb/gdb.mk
+++ b/package/gdb/gdb.mk
@@ -37,12 +37,11 @@ endif
 # also need ncurses.
 HOST_GDB_DEPENDENCIES = host-expat host-ncurses
 
-# Starting with gdb 7.10, gdb wants to re-generate its documentation.
-# We were trying to avoid that by patching the Makefiles, but it wasn't
-# working in all situations. So, we simply add a dependency on
-# host-texinfo in all case.
-GDB_DEPENDENCIES += host-texinfo
-HOST_GDB_DEPENDENCIES += host-texinfo
+# Disable building documentation
+GDB_MAKE_OPTS += MAKEINFO=true
+GDB_INSTALL_TARGET_OPTS += MAKEINFO=true
+HOST_GDB_MAKE_OPTS += MAKEINFO=true
+HOST_GDB_INSTALL_OPTS += MAKEINFO=true
 
 # Apply the Xtensa specific patches
 XTENSA_CORE_NAME = $(call qstrip, $(BR2_XTENSA_CORE_NAME))
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 2/3] binutils: get rid of host-texinfo dependency and other documentation tricks
  2016-10-08 19:03 [Buildroot] [PATCH v2 1/3] gdb: get rid of host-texinfo dependency Thomas De Schampheleire
@ 2016-10-08 19:03 ` Thomas De Schampheleire
  2016-10-08 19:03 ` [Buildroot] [PATCH v2 3/3] Revert "texinfo: new host package" Thomas De Schampheleire
  2016-10-09 11:55 ` [Buildroot] [PATCH v2 1/3] gdb: get rid of host-texinfo dependency Thomas Petazzoni
  2 siblings, 0 replies; 8+ messages in thread
From: Thomas De Schampheleire @ 2016-10-08 19:03 UTC (permalink / raw)
  To: buildroot

From: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

The binutils/host-binutils package applied several tricks to avoid building
info documentation. In the worst case, host-texinfo is added as dependency.

However, there is a simpler solution that removes the need for all these
tricks: instruct the makefiles to use a dummy makeinfo command ('true').

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
 package/binutils/binutils.mk | 25 +++++++++----------------
 1 file changed, 9 insertions(+), 16 deletions(-)

v2: use INSTALL_TARGET_OPTS for target packages iso INSTALL_OPTS
(INSTALL_STAGING_OPTS not needed: custom limited staging install)

diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index 3a4a661..4e87fcb 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -29,19 +29,8 @@ BINUTILS_LICENSE = GPLv3+, libiberty LGPLv2.1+
 BINUTILS_LICENSE_FILES = COPYING3 COPYING.LIB
 
 ifeq ($(BINUTILS_FROM_GIT),y)
-BINUTILS_DEPENDENCIES += host-flex host-bison host-texinfo
-HOST_BINUTILS_DEPENDENCIES += host-flex host-bison host-texinfo
-endif
-
-# The .info files in the >= 2.26 tarball have an incorrect timestamp,
-# so binutils tries to re-generate them. In order to avoid the
-# dependency on host-texinfo, we simply update the timestamps.
-ifeq ($(BR2_BINUTILS_VERSION_2_26_X)$(BR2_BINUTILS_VERSION_2_27_X),y)
-define BINUTILS_FIXUP_INFO_TIMESTAMPS
-	find $(@D) -name '*.info' -exec touch {} \;
-endef
-BINUTILS_POST_PATCH_HOOKS += BINUTILS_FIXUP_INFO_TIMESTAMPS
-HOST_BINUTILS_POST_PATCH_HOOKS += BINUTILS_FIXUP_INFO_TIMESTAMPS
+BINUTILS_DEPENDENCIES += host-flex host-bison
+HOST_BINUTILS_DEPENDENCIES += host-flex host-bison
 endif
 
 # When binutils sources are fetched from the binutils-gdb repository,
@@ -68,8 +57,12 @@ endif
 
 # Don't build documentation. It takes up extra space / build time,
 # and sometimes needs specific makeinfo versions to work
-BINUTILS_CONF_ENV += ac_cv_prog_MAKEINFO=missing
-HOST_BINUTILS_CONF_ENV += ac_cv_prog_MAKEINFO=missing
+BINUTILS_CONF_ENV += MAKEINFO=true
+BINUTILS_MAKE_OPTS += MAKEINFO=true
+BINUTILS_INSTALL_TARGET_OPTS += MAKEINFO=true
+HOST_BINUTILS_CONF_ENV += MAKEINFO=true
+HOST_BINUTILS_MAKE_OPTS += MAKEINFO=true
+HOST_BINUTILS_INSTALL_OPTS += MAKEINFO=true
 
 # gcc bug with Os/O2/O3, PR77311
 # error: unable to find a register to spill in class 'CCREGS'
@@ -109,7 +102,7 @@ HOST_BINUTILS_CONF_OPTS = \
 # binutils run configure script of subdirs at make time, so ensure
 # our TARGET_CONFIGURE_ARGS are taken into consideration for those
 define BINUTILS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_ARGS) $(MAKE) -C $(@D)
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_ARGS) $(MAKE) $(BINUTILS_MAKE_OPTS) -C $(@D)
 endef
 
 # We just want libbfd, libiberty and libopcodes,
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 3/3] Revert "texinfo: new host package"
  2016-10-08 19:03 [Buildroot] [PATCH v2 1/3] gdb: get rid of host-texinfo dependency Thomas De Schampheleire
  2016-10-08 19:03 ` [Buildroot] [PATCH v2 2/3] binutils: get rid of host-texinfo dependency and other documentation tricks Thomas De Schampheleire
@ 2016-10-08 19:03 ` Thomas De Schampheleire
  2016-10-09 11:55 ` [Buildroot] [PATCH v2 1/3] gdb: get rid of host-texinfo dependency Thomas Petazzoni
  2 siblings, 0 replies; 8+ messages in thread
From: Thomas De Schampheleire @ 2016-10-08 19:03 UTC (permalink / raw)
  To: buildroot

From: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

This reverts commit ea161cf6891c3a3a601dfce072f68ee4aed08d21.

The host-texinfo dependency is no longer used by any package, after using
another solution to the problem that required its introduction in the first
place.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
 package/texinfo/texinfo.hash |  2 --
 package/texinfo/texinfo.mk   | 13 -------------
 2 files changed, 15 deletions(-)
 delete mode 100644 package/texinfo/texinfo.hash
 delete mode 100644 package/texinfo/texinfo.mk

diff --git a/package/texinfo/texinfo.hash b/package/texinfo/texinfo.hash
deleted file mode 100644
index 4bdf343..0000000
--- a/package/texinfo/texinfo.hash
+++ /dev/null
@@ -1,2 +0,0 @@
-# Locally calculated
-sha256 ac68394ce21b2420ba7ed7cec65d84aacf308cc88e9bf4716fcfff88286883d2 texinfo-6.1.tar.xz
diff --git a/package/texinfo/texinfo.mk b/package/texinfo/texinfo.mk
deleted file mode 100644
index ebd0b48..0000000
--- a/package/texinfo/texinfo.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-#
-# texinfo
-#
-################################################################################
-
-TEXINFO_VERSION = 6.1
-TEXINFO_SITE = $(BR2_GNU_MIRROR)/texinfo
-TEXINFO_SOURCE = texinfo-$(TEXINFO_VERSION).tar.xz
-TEXINFO_LICENSE = GPLv3+
-TEXINFO_LICENSE_FILES = COPYING
-
-$(eval $(host-autotools-package))
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 1/3] gdb: get rid of host-texinfo dependency
  2016-10-08 19:03 [Buildroot] [PATCH v2 1/3] gdb: get rid of host-texinfo dependency Thomas De Schampheleire
  2016-10-08 19:03 ` [Buildroot] [PATCH v2 2/3] binutils: get rid of host-texinfo dependency and other documentation tricks Thomas De Schampheleire
  2016-10-08 19:03 ` [Buildroot] [PATCH v2 3/3] Revert "texinfo: new host package" Thomas De Schampheleire
@ 2016-10-09 11:55 ` Thomas Petazzoni
  2016-10-09 13:04   ` Thomas Petazzoni
  2 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2016-10-09 11:55 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  8 Oct 2016 21:03:31 +0200, Thomas De Schampheleire wrote:
> From: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
> 
> The host-texinfo dependency in gdb/host-gdb was added because gdb insisted
> in building info documentation in recent versions, and we want to avoid
> 'makeinfo' to be present on the build system.
> 
> However, there is another solution that does not require actually building
> host-texinfo: instruct the makefiles to use a dummy makeinfo command
> ('true').
> 
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
> ---
>  package/gdb/gdb.mk | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)

All three patches applied to master. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 1/3] gdb: get rid of host-texinfo dependency
  2016-10-09 11:55 ` [Buildroot] [PATCH v2 1/3] gdb: get rid of host-texinfo dependency Thomas Petazzoni
@ 2016-10-09 13:04   ` Thomas Petazzoni
  2016-10-09 13:13     ` Thomas De Schampheleire
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2016-10-09 13:04 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 9 Oct 2016 13:55:52 +0200, Thomas Petazzoni wrote:

> All three patches applied to master. Thanks!

And I reverted the texinfo patch and the binutils patch. The binutils
patch badly breaks the build of the toolchain. See:

  http://autobuild.buildroot.net/results/90d/90d0537bc12cbb2a7c6d344b3c6c9e1a5046d791/build-end.log
  http://autobuild.buildroot.net/results/9a2/9a2b30bfd08c3a4af43f0523276eb5f799699aaa/build-end.log
  http://autobuild.buildroot.net/results/d8a/d8a4afeeec8d6b070b17a067d0ded5aefe4e3f6a/build-end.log

Please do a toolchain build before sending the next iterations of the
patches. A basic ARM toolchain would not even build with your
patches :-/

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 1/3] gdb: get rid of host-texinfo dependency
  2016-10-09 13:04   ` Thomas Petazzoni
@ 2016-10-09 13:13     ` Thomas De Schampheleire
  2016-10-09 14:32       ` Waldemar Brodkorb
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas De Schampheleire @ 2016-10-09 13:13 UTC (permalink / raw)
  To: buildroot

On Oct 9, 2016 15:05, "Thomas Petazzoni" <
thomas.petazzoni@free-electrons.com> wrote:
>
> Hello,
>
> On Sun, 9 Oct 2016 13:55:52 +0200, Thomas Petazzoni wrote:
>
> > All three patches applied to master. Thanks!
>
> And I reverted the texinfo patch and the binutils patch. The binutils
> patch badly breaks the build of the toolchain. See:
>
>
http://autobuild.buildroot.net/results/90d/90d0537bc12cbb2a7c6d344b3c6c9e1a5046d791/build-end.log
>
http://autobuild.buildroot.net/results/9a2/9a2b30bfd08c3a4af43f0523276eb5f799699aaa/build-end.log
>
http://autobuild.buildroot.net/results/d8a/d8a4afeeec8d6b070b17a067d0ded5aefe4e3f6a/build-end.log
>
> Please do a toolchain build before sending the next iterations of the
> patches. A basic ARM toolchain would not even build with your
> patches :-/

Will check, sorry...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20161009/bffc588e/attachment.html>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 1/3] gdb: get rid of host-texinfo dependency
  2016-10-09 13:13     ` Thomas De Schampheleire
@ 2016-10-09 14:32       ` Waldemar Brodkorb
  2016-10-09 18:44         ` Thomas De Schampheleire
  0 siblings, 1 reply; 8+ messages in thread
From: Waldemar Brodkorb @ 2016-10-09 14:32 UTC (permalink / raw)
  To: buildroot

Hi Thomas,
Thomas De Schampheleire wrote,

> On Oct 9, 2016 15:05, "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>
> wrote:
> >
> > Hello,
> >
> > On Sun, 9 Oct 2016 13:55:52 +0200, Thomas Petazzoni wrote:
> >
> > > All three patches applied to master. Thanks!
> >
> > And I reverted the texinfo patch and the binutils patch. The binutils
> > patch badly breaks the build of the toolchain. See:
> >
> > ? http://autobuild.buildroot.net/results/90d/
> 90d0537bc12cbb2a7c6d344b3c6c9e1a5046d791/build-end.log
> > ? http://autobuild.buildroot.net/results/9a2/
> 9a2b30bfd08c3a4af43f0523276eb5f799699aaa/build-end.log
> > ? http://autobuild.buildroot.net/results/d8a/
> d8a4afeeec8d6b070b17a067d0ded5aefe4e3f6a/build-end.log
> >
> > Please do a toolchain build before sending the next iterations of the
> > patches. A basic ARM toolchain would not even build with your
> > patches :-/
> 
> Will check, sorry...

Binutils isn't installed into output/host.
May be try something like this:
diff --git a/package/binutils/binutils.mk
b/package/binutils/binutils.mk
index 4e87fcb..8aa3fc7 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -59,10 +59,8 @@ endif
 # and sometimes needs specific makeinfo versions to work
 BINUTILS_CONF_ENV += MAKEINFO=true
 BINUTILS_MAKE_OPTS += MAKEINFO=true
-BINUTILS_INSTALL_TARGET_OPTS += MAKEINFO=true
 HOST_BINUTILS_CONF_ENV += MAKEINFO=true
 HOST_BINUTILS_MAKE_OPTS += MAKEINFO=true
-HOST_BINUTILS_INSTALL_OPTS += MAKEINFO=true
 
 # gcc bug with Os/O2/O3, PR77311
 # error: unable to find a register to spill in class 'CCREGS'

It seem binutils get confused and just do true make install...

best regards
 Waldemar

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 1/3] gdb: get rid of host-texinfo dependency
  2016-10-09 14:32       ` Waldemar Brodkorb
@ 2016-10-09 18:44         ` Thomas De Schampheleire
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas De Schampheleire @ 2016-10-09 18:44 UTC (permalink / raw)
  To: buildroot

On Sun, Oct 9, 2016 at 4:32 PM, Waldemar Brodkorb <wbx@openadk.org> wrote:
> Hi Thomas,
> Thomas De Schampheleire wrote,
>
>> On Oct 9, 2016 15:05, "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>
>> wrote:
>> >
>> > Hello,
>> >
>> > On Sun, 9 Oct 2016 13:55:52 +0200, Thomas Petazzoni wrote:
>> >
>> > > All three patches applied to master. Thanks!
>> >
>> > And I reverted the texinfo patch and the binutils patch. The binutils
>> > patch badly breaks the build of the toolchain. See:
>> >
>> >   http://autobuild.buildroot.net/results/90d/
>> 90d0537bc12cbb2a7c6d344b3c6c9e1a5046d791/build-end.log
>> >   http://autobuild.buildroot.net/results/9a2/
>> 9a2b30bfd08c3a4af43f0523276eb5f799699aaa/build-end.log
>> >   http://autobuild.buildroot.net/results/d8a/
>> d8a4afeeec8d6b070b17a067d0ded5aefe4e3f6a/build-end.log
>> >
>> > Please do a toolchain build before sending the next iterations of the
>> > patches. A basic ARM toolchain would not even build with your
>> > patches :-/
>>
>> Will check, sorry...
>
> Binutils isn't installed into output/host.
> May be try something like this:
> diff --git a/package/binutils/binutils.mk
> b/package/binutils/binutils.mk
> index 4e87fcb..8aa3fc7 100644
> --- a/package/binutils/binutils.mk
> +++ b/package/binutils/binutils.mk
> @@ -59,10 +59,8 @@ endif
>  # and sometimes needs specific makeinfo versions to work
>  BINUTILS_CONF_ENV += MAKEINFO=true
>  BINUTILS_MAKE_OPTS += MAKEINFO=true
> -BINUTILS_INSTALL_TARGET_OPTS += MAKEINFO=true
>  HOST_BINUTILS_CONF_ENV += MAKEINFO=true
>  HOST_BINUTILS_MAKE_OPTS += MAKEINFO=true
> -HOST_BINUTILS_INSTALL_OPTS += MAKEINFO=true

No, I'm sure that at least in some combinations, the install command
needs to get the makeinfo override.

I have compared the logs and results now, and found the issue. It
seems that for FOO_INSTALL_{TARGET_,STAGING_,}OPTS there is a default
applied that already includes 'install'. The += does not actually
append because it is evaluated before the defaults in
package/pkg-autotools.mk.
So, without my patch the install command essentially was 'make
install', but with my patch it became 'make MAKEINFO=true' without
target.

The silly thing is, I actually did see this failure during my testing,
but dismissed it too quickly, thinking it surely could not have been
caused by my changes, and would 'probably' be caused by some funny
state I left my repo in during my testing. [bumps head into wall]

I'll do some further testing first ;-) and then resend the patches.

Thanks,
Thomas

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-10-09 18:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-08 19:03 [Buildroot] [PATCH v2 1/3] gdb: get rid of host-texinfo dependency Thomas De Schampheleire
2016-10-08 19:03 ` [Buildroot] [PATCH v2 2/3] binutils: get rid of host-texinfo dependency and other documentation tricks Thomas De Schampheleire
2016-10-08 19:03 ` [Buildroot] [PATCH v2 3/3] Revert "texinfo: new host package" Thomas De Schampheleire
2016-10-09 11:55 ` [Buildroot] [PATCH v2 1/3] gdb: get rid of host-texinfo dependency Thomas Petazzoni
2016-10-09 13:04   ` Thomas Petazzoni
2016-10-09 13:13     ` Thomas De Schampheleire
2016-10-09 14:32       ` Waldemar Brodkorb
2016-10-09 18:44         ` Thomas De Schampheleire

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.