diff mbox

[v2] host-gcc: apply patches stored in global patches directories

Message ID 1460429140-27357-1-git-send-email-hchunhui@mail.ustc.edu.cn
State Superseded
Headers show

Commit Message

Chunhui He April 12, 2016, 2:45 a.m. UTC
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(-)

Comments

Arnout Vandecappelle April 12, 2016, 8:39 p.m. UTC | #1
On 04/12/16 04:45, He Chunhui wrote:
> When building host gcc, patches stored in global patches directories are skipped.

  I didn't notice this one earlier: commit log should be wrapped at 72 columns.

> This patch fixes the unexpected behavior.
>
> Signed-off-by: He Chunhui <hchunhui@mail.ustc.edu.cn>
> ---

  Please include a patch changelog when you send a v2, i.e.:

Signed-off-by: ...
---
v2: move the $(GCC_VERSION) part of the suffix to the correct place.



  Regards,
  Arnout


>   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..c7862a5 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/$(GCC_VERSION),$(call qstrip,$(BR2_GLOBAL_PATCH_DIR))) \
> +	    $(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
>
>
diff mbox

Patch

diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 5646b66..c7862a5 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/$(GCC_VERSION),$(call qstrip,$(BR2_GLOBAL_PATCH_DIR))) \
+	    $(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