Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] host-gcc: apply patches stored in global patches directories
@ 2016-04-11  3:01 He Chunhui
  2016-04-12 20:05 ` Arnout Vandecappelle
  0 siblings, 1 reply; 2+ messages in thread
From: He Chunhui @ 2016-04-11  3:01 UTC (permalink / raw)
  To: buildroot

When building host gcc, patches stored in global patches directories are skipped.
This patch fixes the unexpected behavior.

Signed-off-by: He Chunhui <hchunhui@mail.ustc.edu.cn>
---
 package/gcc/gcc.mk | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 5646b66..de9a65c 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -42,9 +42,15 @@ endif
 endif
 
 define HOST_GCC_APPLY_PATCHES
-	if test -d package/gcc/$(GCC_VERSION); then \
-	  $(APPLY_PATCHES) $(@D) package/gcc/$(GCC_VERSION) \*.patch ; \
-	fi;
+	for D in \
+	    package/gcc/$(GCC_VERSION) \
+	    $(addsuffix /gcc,$(call qstrip,$(BR2_GLOBAL_PATCH_DIR)))/$(GCC_VERSION) \
+	    $(addsuffix /gcc,$(call qstrip,$(BR2_GLOBAL_PATCH_DIR))) \
+	    ; do \
+	  if test -d $${D}; then \
+	    $(APPLY_PATCHES) $(@D) $${D} \*.patch || exit 1; \
+	  fi; \
+	done;
 	$(HOST_GCC_APPLY_POWERPC_PATCH)
 endef
 
-- 
2.1.4

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

* [Buildroot] [PATCH] host-gcc: apply patches stored in global patches directories
  2016-04-11  3:01 [Buildroot] [PATCH] host-gcc: apply patches stored in global patches directories He Chunhui
@ 2016-04-12 20:05 ` Arnout Vandecappelle
  0 siblings, 0 replies; 2+ messages in thread
From: Arnout Vandecappelle @ 2016-04-12 20:05 UTC (permalink / raw)
  To: buildroot

On 04/11/16 05:01, He Chunhui wrote:
> When building host gcc, patches stored in global patches directories are skipped.
> This patch fixes the unexpected behavior.

  That's because they should be in subdirectories gcc-initial and gcc-final. But 
I agree that it's unexpected behaviour...

>
> Signed-off-by: He Chunhui <hchunhui@mail.ustc.edu.cn>
> ---
>   package/gcc/gcc.mk | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
> index 5646b66..de9a65c 100644
> --- a/package/gcc/gcc.mk
> +++ b/package/gcc/gcc.mk
> @@ -42,9 +42,15 @@ endif
>   endif
>
>   define HOST_GCC_APPLY_PATCHES
> -	if test -d package/gcc/$(GCC_VERSION); then \
> -	  $(APPLY_PATCHES) $(@D) package/gcc/$(GCC_VERSION) \*.patch ; \
> -	fi;
> +	for D in \
> +	    package/gcc/$(GCC_VERSION) \
> +	    $(addsuffix /gcc,$(call qstrip,$(BR2_GLOBAL_PATCH_DIR)))/$(GCC_VERSION) \
> +	    $(addsuffix /gcc,$(call qstrip,$(BR2_GLOBAL_PATCH_DIR))) \

  You ahould also add this to HOST_GCC_COMMON_CCACHE_HASH_FILES, below, to make 
sure that the ccache hash is updated appropriately. Make sure you update the 
comment there as well.

> +	    ; do \
> +	  if test -d $${D}; then \

  This should be indented with two tabs.

> +	    $(APPLY_PATCHES) $(@D) $${D} \*.patch || exit 1; \

  And three tabs here.


  Regards,
  Arnout

> +	  fi; \
> +	done;
>   	$(HOST_GCC_APPLY_POWERPC_PATCH)
>   endef
>
>


-- 
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

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

end of thread, other threads:[~2016-04-12 20:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-11  3:01 [Buildroot] [PATCH] host-gcc: apply patches stored in global patches directories He Chunhui
2016-04-12 20:05 ` Arnout Vandecappelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox