Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mischa Jonker <Mischa.Jonker@synopsys.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] gcc: don't patch gcc if there are no patches to apply
Date: Mon, 11 Nov 2013 15:36:36 +0100	[thread overview]
Message-ID: <1384180596-15125-1-git-send-email-mjonker@synopsys.com> (raw)

While the generic package handler checks for a directory with patches
before starting apply-patches.sh, this is not the case for gcc: the
script is called, even if there is no directory with patches. This results
into a build failure, as apply-patches exits with error code 1 if the
directory doesn't exist.

Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
---
 package/gcc/gcc.mk |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 0c0cc99..41600ef 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -49,7 +49,9 @@ endif
 endif
 
 define HOST_GCC_APPLY_PATCHES
-	support/scripts/apply-patches.sh $(@D) package/gcc/$(GCC_VERSION) \*.patch
+	if test -d package/gcc/$(GCC_VERSION); then \
+	  support/scripts/apply-patches.sh $(@D) package/gcc/$(GCC_VERSION) \*.patch ; \
+	fi;
 	$(HOST_GCC_APPLY_POWERPC_PATCH)
 endef
 
-- 
1.7.9.5

             reply	other threads:[~2013-11-11 14:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11 14:36 Mischa Jonker [this message]
2013-11-11 21:59 ` [Buildroot] [PATCH] gcc: don't patch gcc if there are no patches to apply Peter Korsgaard
2013-11-11 22:04   ` Arnout Vandecappelle
2013-11-11 22:21     ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1384180596-15125-1-git-send-email-mjonker@synopsys.com \
    --to=mischa.jonker@synopsys.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox