diff mbox

[5/5] binutils: fix build of 2.26 when makeinfo is not available

Message ID 1467712019-24632-5-git-send-email-thomas.petazzoni@free-electrons.com
State Accepted
Headers show

Commit Message

Thomas Petazzoni July 5, 2016, 9:46 a.m. UTC
The 2.26 binutils tarball has incorrect timestamps for the .info files,
so binutils build system tries to regenerate them with makeinfo. In
order to avoid depending on host-texinfo, we simply touch the .info
files so that their timestamp is newer than the corresponding source
files.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/binutils/binutils.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Romain Naour July 5, 2016, 11:37 a.m. UTC | #1
Hi Thomas,

Le 05/07/2016 à 11:46, Thomas Petazzoni a écrit :
> The 2.26 binutils tarball has incorrect timestamps for the .info files,
> so binutils build system tries to regenerate them with makeinfo. In
> order to avoid depending on host-texinfo, we simply touch the .info
> files so that their timestamp is newer than the corresponding source
> files.

Build issue reproduced and fixed with this patch.

Reviewed-by: Romain Naour <romain.naour@gmail.com>
Tested-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain


> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/binutils/binutils.mk | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
> index 33aaf85..50a3531 100644
> --- a/package/binutils/binutils.mk
> +++ b/package/binutils/binutils.mk
> @@ -33,6 +33,17 @@ 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),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
> +endif
> +
>  # When binutils sources are fetched from the binutils-gdb repository,
>  # they also contain the gdb sources, but gdb shouldn't be built, so we
>  # disable it.
>
Joel Stanley July 5, 2016, 1:04 p.m. UTC | #2
Hi Thomas,

On Tue, Jul 5, 2016 at 7:16 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> The 2.26 binutils tarball has incorrect timestamps for the .info files,
> so binutils build system tries to regenerate them with makeinfo. In
> order to avoid depending on host-texinfo, we simply touch the .info
> files so that their timestamp is newer than the corresponding source
> files.

Nice. We were hitting this too[1], and I spent today looking at it. I
just sent a patch. but if you prefer your method then please ignore.

The other solutions we found were to add MAKEINFO=true to the command
line, or to do what the ARC toolchain guys did and modify the check in
all of the makefiles.

[1] https://github.com/open-power/op-build/issues/507
[2] http://patchwork.ozlabs.org/patch/644726/

Cheers,

Joel

>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/binutils/binutils.mk | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
> index 33aaf85..50a3531 100644
> --- a/package/binutils/binutils.mk
> +++ b/package/binutils/binutils.mk
> @@ -33,6 +33,17 @@ 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),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
> +endif
> +
>  # When binutils sources are fetched from the binutils-gdb repository,
>  # they also contain the gdb sources, but gdb shouldn't be built, so we
>  # disable it.
> --
> 2.7.4
>
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
diff mbox

Patch

diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index 33aaf85..50a3531 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -33,6 +33,17 @@  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),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
+endif
+
 # When binutils sources are fetched from the binutils-gdb repository,
 # they also contain the gdb sources, but gdb shouldn't be built, so we
 # disable it.