All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] scripts: apply-patches: don't stop if no patch is found for a package
@ 2013-11-05 13:00 Andi Shyti
  2013-11-05 18:51 ` Arnout Vandecappelle
  0 siblings, 1 reply; 12+ messages in thread
From: Andi Shyti @ 2013-11-05 13:00 UTC (permalink / raw)
  To: buildroot

If no patch is available for a specific package it doesn't mean
that is necessarily an error, perhaps there is no need to apply
any patches. Therefore, don't stop the build by returning '1',
but go ahead.

Signed-off-by: Andi Shyti <andi@etezian.org>
---
 support/scripts/apply-patches.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
index ff72b45..aabab4f 100755
--- a/support/scripts/apply-patches.sh
+++ b/support/scripts/apply-patches.sh
@@ -43,7 +43,7 @@ if [ ! -d "${builddir}" ] ; then
 fi
 if [ ! -d "${patchdir}" ] ; then
     echo "Aborting.  '${patchdir}' is not a directory."
-    exit 1
+    exit
 fi
 
 # Remove any rejects present BEFORE patching - Because if there are
-- 
1.8.4.2

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

* [Buildroot] [PATCH] scripts: apply-patches: don't stop if no patch is found for a package
  2013-11-05 13:00 [Buildroot] [PATCH] scripts: apply-patches: don't stop if no patch is found for a package Andi Shyti
@ 2013-11-05 18:51 ` Arnout Vandecappelle
  2013-11-05 20:17   ` Andi Shyti
  0 siblings, 1 reply; 12+ messages in thread
From: Arnout Vandecappelle @ 2013-11-05 18:51 UTC (permalink / raw)
  To: buildroot

On 05/11/13 14:00, Andi Shyti wrote:
> If no patch is available for a specific package it doesn't mean
> that is necessarily an error, perhaps there is no need to apply
> any patches. Therefore, don't stop the build by returning '1',
> but go ahead.

  This is in fact intentional, because it indicates that there is 
something wrong with the configuration. When you specify in your 
configuration that some specific patch directory should be used, but that 
directory doesn't exist, then it probably means you made a mistake in 
your configuration.

  Can you give an example of a specific situation where you had a problem 
with this check?

  Regards,
  Arnout

>
> Signed-off-by: Andi Shyti <andi@etezian.org>
> ---
>   support/scripts/apply-patches.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
> index ff72b45..aabab4f 100755
> --- a/support/scripts/apply-patches.sh
> +++ b/support/scripts/apply-patches.sh
> @@ -43,7 +43,7 @@ if [ ! -d "${builddir}" ] ; then
>   fi
>   if [ ! -d "${patchdir}" ] ; then
>       echo "Aborting.  '${patchdir}' is not a directory."
> -    exit 1
> +    exit
>   fi
>
>   # Remove any rejects present BEFORE patching - Because if there are
>


-- 
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH] scripts: apply-patches: don't stop if no patch is found for a package
  2013-11-05 18:51 ` Arnout Vandecappelle
@ 2013-11-05 20:17   ` Andi Shyti
  2013-11-06 21:32     ` Arnout Vandecappelle
  0 siblings, 1 reply; 12+ messages in thread
From: Andi Shyti @ 2013-11-05 20:17 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

> >If no patch is available for a specific package it doesn't mean
> >that is necessarily an error, perhaps there is no need to apply
> >any patches. Therefore, don't stop the build by returning '1',
> >but go ahead.
> 
>  This is in fact intentional, because it indicates that there is
> something wrong with the configuration. When you specify in your
> configuration that some specific patch directory should be used, but
> that directory doesn't exist, then it probably means you made a
> mistake in your configuration.
> 
>  Can you give an example of a specific situation where you had a
> problem with this check?

this happens when for example you want to get as cross compiler
the daily snapshot instead of a specific version.

The build stops with an error because of that 'exit 1' since it
doesn't find any gcc-20131105 patch directory (i think the
snapshot is called so).

Andi

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

* [Buildroot] [PATCH] scripts: apply-patches: don't stop if no patch is found for a package
  2013-11-05 20:17   ` Andi Shyti
@ 2013-11-06 21:32     ` Arnout Vandecappelle
  2013-11-06 22:16       ` Thomas Petazzoni
                         ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Arnout Vandecappelle @ 2013-11-06 21:32 UTC (permalink / raw)
  To: buildroot

On 05/11/13 21:17, Andi Shyti wrote:
> Hi Arnout,
>
>>> If no patch is available for a specific package it doesn't mean
>>> that is necessarily an error, perhaps there is no need to apply
>>> any patches. Therefore, don't stop the build by returning '1',
>>> but go ahead.
>>
>>   This is in fact intentional, because it indicates that there is
>> something wrong with the configuration. When you specify in your
>> configuration that some specific patch directory should be used, but
>> that directory doesn't exist, then it probably means you made a
>> mistake in your configuration.
>>
>>   Can you give an example of a specific situation where you had a
>> problem with this check?
>
> this happens when for example you want to get as cross compiler
> the daily snapshot instead of a specific version.
>
> The build stops with an error because of that 'exit 1' since it
> doesn't find any gcc-20131105 patch directory (i think the
> snapshot is called so).

  That's a bug in the gcc package then :-)

  It should actually be converted to using the default patch strategy 
instead of post-patch hooks. Let me look into it...


  Regards,
  Arnout


-- 
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH] scripts: apply-patches: don't stop if no patch is found for a package
  2013-11-06 21:32     ` Arnout Vandecappelle
@ 2013-11-06 22:16       ` Thomas Petazzoni
  2013-11-06 22:59       ` [Buildroot] [PATCH] gcc: use generic infrastructure for patches Arnout Vandecappelle
  2013-11-06 23:40       ` [Buildroot] [PATCH] scripts: apply-patches: don't stop if no patch is found for a package Andi Shyti
  2 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2013-11-06 22:16 UTC (permalink / raw)
  To: buildroot

Dear Arnout Vandecappelle,

On Wed, 06 Nov 2013 22:32:58 +0100, Arnout Vandecappelle wrote:

>   That's a bug in the gcc package then :-)
> 
>   It should actually be converted to using the default patch strategy 
> instead of post-patch hooks. Let me look into it...

Good luck. The gcc package is special: there is only one location for
the gcc patches (i.e package/gcc/<version>/), but there are in fact
three gcc packages (package/gcc/gcc-{initial,intermediate,final}).

I'm impatient to see what your solution will be :-)

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

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

* [Buildroot] [PATCH] gcc: use generic infrastructure for patches
  2013-11-06 21:32     ` Arnout Vandecappelle
  2013-11-06 22:16       ` Thomas Petazzoni
@ 2013-11-06 22:59       ` Arnout Vandecappelle
  2013-11-06 23:13         ` Thomas Petazzoni
  2013-11-07  1:19         ` Andi Shyti
  2013-11-06 23:40       ` [Buildroot] [PATCH] scripts: apply-patches: don't stop if no patch is found for a package Andi Shyti
  2 siblings, 2 replies; 12+ messages in thread
From: Arnout Vandecappelle @ 2013-11-06 22:59 UTC (permalink / raw)
  To: buildroot

This solves the patch error for gcc snapshots.

Also sneak in an extra condition when applying the powerpc softfloat patch,
so that the error is really fixed.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
The powerpc patch could be converted to link-with-math-lib.patch.powerpc,
but since we're deprecating the *.patch.$(ARCH) pattern I choose to keep
this special treatment.

I didn't want to bother with splitting this patch for the powerpc stuff.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/gcc/gcc-final/4.2.2-avr32-2.1.5          | 1 +
 package/gcc/gcc-final/4.3.6                      | 1 +
 package/gcc/gcc-final/4.4.7                      | 1 +
 package/gcc/gcc-final/4.5.4                      | 1 +
 package/gcc/gcc-final/4.6.4                      | 1 +
 package/gcc/gcc-final/4.7.3                      | 1 +
 package/gcc/gcc-final/4.8-arc                    | 1 +
 package/gcc/gcc-final/4.8.2                      | 1 +
 package/gcc/gcc-final/gcc-final.mk               | 2 +-
 package/gcc/gcc-initial/4.2.2-avr32-2.1.5        | 1 +
 package/gcc/gcc-initial/4.3.6                    | 1 +
 package/gcc/gcc-initial/4.4.7                    | 1 +
 package/gcc/gcc-initial/4.5.4                    | 1 +
 package/gcc/gcc-initial/4.6.4                    | 1 +
 package/gcc/gcc-initial/4.7.3                    | 1 +
 package/gcc/gcc-initial/4.8-arc                  | 1 +
 package/gcc/gcc-initial/4.8.2                    | 1 +
 package/gcc/gcc-initial/gcc-initial.mk           | 2 +-
 package/gcc/gcc-intermediate/4.2.2-avr32-2.1.5   | 1 +
 package/gcc/gcc-intermediate/4.3.6               | 1 +
 package/gcc/gcc-intermediate/4.4.7               | 1 +
 package/gcc/gcc-intermediate/4.5.4               | 1 +
 package/gcc/gcc-intermediate/4.6.4               | 1 +
 package/gcc/gcc-intermediate/4.7.3               | 1 +
 package/gcc/gcc-intermediate/4.8-arc             | 1 +
 package/gcc/gcc-intermediate/4.8.2               | 1 +
 package/gcc/gcc-intermediate/gcc-intermediate.mk | 2 +-
 package/gcc/gcc.mk                               | 9 +++------
 28 files changed, 30 insertions(+), 9 deletions(-)
 create mode 120000 package/gcc/gcc-final/4.2.2-avr32-2.1.5
 create mode 120000 package/gcc/gcc-final/4.3.6
 create mode 120000 package/gcc/gcc-final/4.4.7
 create mode 120000 package/gcc/gcc-final/4.5.4
 create mode 120000 package/gcc/gcc-final/4.6.4
 create mode 120000 package/gcc/gcc-final/4.7.3
 create mode 120000 package/gcc/gcc-final/4.8-arc
 create mode 120000 package/gcc/gcc-final/4.8.2
 create mode 120000 package/gcc/gcc-initial/4.2.2-avr32-2.1.5
 create mode 120000 package/gcc/gcc-initial/4.3.6
 create mode 120000 package/gcc/gcc-initial/4.4.7
 create mode 120000 package/gcc/gcc-initial/4.5.4
 create mode 120000 package/gcc/gcc-initial/4.6.4
 create mode 120000 package/gcc/gcc-initial/4.7.3
 create mode 120000 package/gcc/gcc-initial/4.8-arc
 create mode 120000 package/gcc/gcc-initial/4.8.2
 create mode 120000 package/gcc/gcc-intermediate/4.2.2-avr32-2.1.5
 create mode 120000 package/gcc/gcc-intermediate/4.3.6
 create mode 120000 package/gcc/gcc-intermediate/4.4.7
 create mode 120000 package/gcc/gcc-intermediate/4.5.4
 create mode 120000 package/gcc/gcc-intermediate/4.6.4
 create mode 120000 package/gcc/gcc-intermediate/4.7.3
 create mode 120000 package/gcc/gcc-intermediate/4.8-arc
 create mode 120000 package/gcc/gcc-intermediate/4.8.2

diff --git a/package/gcc/gcc-final/4.2.2-avr32-2.1.5 b/package/gcc/gcc-final/4.2.2-avr32-2.1.5
new file mode 120000
index 0000000..032c9e3
--- /dev/null
+++ b/package/gcc/gcc-final/4.2.2-avr32-2.1.5
@@ -0,0 +1 @@
+../4.2.2-avr32-2.1.5
\ No newline at end of file
diff --git a/package/gcc/gcc-final/4.3.6 b/package/gcc/gcc-final/4.3.6
new file mode 120000
index 0000000..e1c481e
--- /dev/null
+++ b/package/gcc/gcc-final/4.3.6
@@ -0,0 +1 @@
+../4.3.6
\ No newline at end of file
diff --git a/package/gcc/gcc-final/4.4.7 b/package/gcc/gcc-final/4.4.7
new file mode 120000
index 0000000..a7ca0e2
--- /dev/null
+++ b/package/gcc/gcc-final/4.4.7
@@ -0,0 +1 @@
+../4.4.7
\ No newline at end of file
diff --git a/package/gcc/gcc-final/4.5.4 b/package/gcc/gcc-final/4.5.4
new file mode 120000
index 0000000..b758df2
--- /dev/null
+++ b/package/gcc/gcc-final/4.5.4
@@ -0,0 +1 @@
+../4.5.4
\ No newline at end of file
diff --git a/package/gcc/gcc-final/4.6.4 b/package/gcc/gcc-final/4.6.4
new file mode 120000
index 0000000..d4c8b47
--- /dev/null
+++ b/package/gcc/gcc-final/4.6.4
@@ -0,0 +1 @@
+../4.6.4
\ No newline at end of file
diff --git a/package/gcc/gcc-final/4.7.3 b/package/gcc/gcc-final/4.7.3
new file mode 120000
index 0000000..6c32215
--- /dev/null
+++ b/package/gcc/gcc-final/4.7.3
@@ -0,0 +1 @@
+../4.7.3
\ No newline at end of file
diff --git a/package/gcc/gcc-final/4.8-arc b/package/gcc/gcc-final/4.8-arc
new file mode 120000
index 0000000..4f63276
--- /dev/null
+++ b/package/gcc/gcc-final/4.8-arc
@@ -0,0 +1 @@
+../4.8-arc
\ No newline at end of file
diff --git a/package/gcc/gcc-final/4.8.2 b/package/gcc/gcc-final/4.8.2
new file mode 120000
index 0000000..27736e8
--- /dev/null
+++ b/package/gcc/gcc-final/4.8.2
@@ -0,0 +1 @@
+../4.8.2
\ No newline at end of file
diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index b396382..409ac97 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -18,7 +18,7 @@ ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),)
 HOST_GCC_FINAL_POST_EXTRACT_CMDS += HOST_GCC_FINAL_XTENSA_OVERLAY_EXTRACT
 endif
 
-HOST_GCC_FINAL_POST_PATCH_HOOKS += HOST_GCC_APPLY_PATCHES
+HOST_GCC_FINAL_POST_PATCH_HOOKS += HOST_GCC_APPLY_POWERPC_PATCH
 
 # gcc doesn't support in-tree build, so we create a 'build'
 # subdirectory in the gcc sources, and build from there.
diff --git a/package/gcc/gcc-initial/4.2.2-avr32-2.1.5 b/package/gcc/gcc-initial/4.2.2-avr32-2.1.5
new file mode 120000
index 0000000..032c9e3
--- /dev/null
+++ b/package/gcc/gcc-initial/4.2.2-avr32-2.1.5
@@ -0,0 +1 @@
+../4.2.2-avr32-2.1.5
\ No newline at end of file
diff --git a/package/gcc/gcc-initial/4.3.6 b/package/gcc/gcc-initial/4.3.6
new file mode 120000
index 0000000..e1c481e
--- /dev/null
+++ b/package/gcc/gcc-initial/4.3.6
@@ -0,0 +1 @@
+../4.3.6
\ No newline at end of file
diff --git a/package/gcc/gcc-initial/4.4.7 b/package/gcc/gcc-initial/4.4.7
new file mode 120000
index 0000000..a7ca0e2
--- /dev/null
+++ b/package/gcc/gcc-initial/4.4.7
@@ -0,0 +1 @@
+../4.4.7
\ No newline at end of file
diff --git a/package/gcc/gcc-initial/4.5.4 b/package/gcc/gcc-initial/4.5.4
new file mode 120000
index 0000000..b758df2
--- /dev/null
+++ b/package/gcc/gcc-initial/4.5.4
@@ -0,0 +1 @@
+../4.5.4
\ No newline at end of file
diff --git a/package/gcc/gcc-initial/4.6.4 b/package/gcc/gcc-initial/4.6.4
new file mode 120000
index 0000000..d4c8b47
--- /dev/null
+++ b/package/gcc/gcc-initial/4.6.4
@@ -0,0 +1 @@
+../4.6.4
\ No newline at end of file
diff --git a/package/gcc/gcc-initial/4.7.3 b/package/gcc/gcc-initial/4.7.3
new file mode 120000
index 0000000..6c32215
--- /dev/null
+++ b/package/gcc/gcc-initial/4.7.3
@@ -0,0 +1 @@
+../4.7.3
\ No newline at end of file
diff --git a/package/gcc/gcc-initial/4.8-arc b/package/gcc/gcc-initial/4.8-arc
new file mode 120000
index 0000000..4f63276
--- /dev/null
+++ b/package/gcc/gcc-initial/4.8-arc
@@ -0,0 +1 @@
+../4.8-arc
\ No newline at end of file
diff --git a/package/gcc/gcc-initial/4.8.2 b/package/gcc/gcc-initial/4.8.2
new file mode 120000
index 0000000..27736e8
--- /dev/null
+++ b/package/gcc/gcc-initial/4.8.2
@@ -0,0 +1 @@
+../4.8.2
\ No newline at end of file
diff --git a/package/gcc/gcc-initial/gcc-initial.mk b/package/gcc/gcc-initial/gcc-initial.mk
index 0eb492f..6a1ec3c 100644
--- a/package/gcc/gcc-initial/gcc-initial.mk
+++ b/package/gcc/gcc-initial/gcc-initial.mk
@@ -16,7 +16,7 @@ ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),)
 HOST_GCC_INITIAL_POST_EXTRACT_CMDS += HOST_GCC_XTENSA_OVERLAY_EXTRACT
 endif
 
-HOST_GCC_INITIAL_POST_PATCH_HOOKS += HOST_GCC_APPLY_PATCHES
+HOST_GCC_INITIAL_POST_PATCH_HOOKS += HOST_GCC_APPLY_POWERPC_PATCH
 
 # gcc doesn't support in-tree build, so we create a 'build'
 # subdirectory in the gcc sources, and build from there.
diff --git a/package/gcc/gcc-intermediate/4.2.2-avr32-2.1.5 b/package/gcc/gcc-intermediate/4.2.2-avr32-2.1.5
new file mode 120000
index 0000000..032c9e3
--- /dev/null
+++ b/package/gcc/gcc-intermediate/4.2.2-avr32-2.1.5
@@ -0,0 +1 @@
+../4.2.2-avr32-2.1.5
\ No newline at end of file
diff --git a/package/gcc/gcc-intermediate/4.3.6 b/package/gcc/gcc-intermediate/4.3.6
new file mode 120000
index 0000000..e1c481e
--- /dev/null
+++ b/package/gcc/gcc-intermediate/4.3.6
@@ -0,0 +1 @@
+../4.3.6
\ No newline at end of file
diff --git a/package/gcc/gcc-intermediate/4.4.7 b/package/gcc/gcc-intermediate/4.4.7
new file mode 120000
index 0000000..a7ca0e2
--- /dev/null
+++ b/package/gcc/gcc-intermediate/4.4.7
@@ -0,0 +1 @@
+../4.4.7
\ No newline at end of file
diff --git a/package/gcc/gcc-intermediate/4.5.4 b/package/gcc/gcc-intermediate/4.5.4
new file mode 120000
index 0000000..b758df2
--- /dev/null
+++ b/package/gcc/gcc-intermediate/4.5.4
@@ -0,0 +1 @@
+../4.5.4
\ No newline at end of file
diff --git a/package/gcc/gcc-intermediate/4.6.4 b/package/gcc/gcc-intermediate/4.6.4
new file mode 120000
index 0000000..d4c8b47
--- /dev/null
+++ b/package/gcc/gcc-intermediate/4.6.4
@@ -0,0 +1 @@
+../4.6.4
\ No newline at end of file
diff --git a/package/gcc/gcc-intermediate/4.7.3 b/package/gcc/gcc-intermediate/4.7.3
new file mode 120000
index 0000000..6c32215
--- /dev/null
+++ b/package/gcc/gcc-intermediate/4.7.3
@@ -0,0 +1 @@
+../4.7.3
\ No newline at end of file
diff --git a/package/gcc/gcc-intermediate/4.8-arc b/package/gcc/gcc-intermediate/4.8-arc
new file mode 120000
index 0000000..4f63276
--- /dev/null
+++ b/package/gcc/gcc-intermediate/4.8-arc
@@ -0,0 +1 @@
+../4.8-arc
\ No newline at end of file
diff --git a/package/gcc/gcc-intermediate/4.8.2 b/package/gcc/gcc-intermediate/4.8.2
new file mode 120000
index 0000000..27736e8
--- /dev/null
+++ b/package/gcc/gcc-intermediate/4.8.2
@@ -0,0 +1 @@
+../4.8.2
\ No newline at end of file
diff --git a/package/gcc/gcc-intermediate/gcc-intermediate.mk b/package/gcc/gcc-intermediate/gcc-intermediate.mk
index f47e4be..c0bf6fc 100644
--- a/package/gcc/gcc-intermediate/gcc-intermediate.mk
+++ b/package/gcc/gcc-intermediate/gcc-intermediate.mk
@@ -18,7 +18,7 @@ ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),)
 HOST_GCC_INTERMEDIATE_POST_EXTRACT_CMDS += HOST_GCC_XTENSA_OVERLAY_EXTRACT
 endif
 
-HOST_GCC_INTERMEDIATE_POST_PATCH_HOOKS += HOST_GCC_APPLY_PATCHES
+HOST_GCC_INTERMEDIATE_POST_PATCH_HOOKS += HOST_GCC_APPLY_POWERPC_PATCH
 
 # gcc doesn't support in-tree build, so we create a 'build'
 # subdirectory in the gcc sources, and build from there.
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 0c0cc99..bddceba 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -43,16 +43,13 @@ endef
 ifeq ($(ARCH),powerpc)
 ifneq ($(BR2_SOFT_FLOAT),)
 define HOST_GCC_APPLY_POWERPC_PATCH
-	support/scripts/apply-patches.sh $(@D) package/gcc/$(GCC_VERSION) powerpc-link-with-math-lib.patch.conditional
+	if [ -e package/gcc/$(GCC_VERSION)/powerpc-link-with-math-lib.patch.conditional ]; then \
+		support/scripts/apply-patches.sh $(@D) package/gcc/$(GCC_VERSION) powerpc-link-with-math-lib.patch.conditional; \
+	fi
 endef
 endif
 endif
 
-define HOST_GCC_APPLY_PATCHES
-	support/scripts/apply-patches.sh $(@D) package/gcc/$(GCC_VERSION) \*.patch
-	$(HOST_GCC_APPLY_POWERPC_PATCH)
-endef
-
 #
 # Custom extract command to save disk space
 #
-- 
1.8.4.rc3

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

* [Buildroot] [PATCH] gcc: use generic infrastructure for patches
  2013-11-06 22:59       ` [Buildroot] [PATCH] gcc: use generic infrastructure for patches Arnout Vandecappelle
@ 2013-11-06 23:13         ` Thomas Petazzoni
  2013-11-06 23:17           ` Peter Korsgaard
  2013-11-06 23:20           ` Arnout Vandecappelle
  2013-11-07  1:19         ` Andi Shyti
  1 sibling, 2 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2013-11-06 23:13 UTC (permalink / raw)
  To: buildroot

Dear Arnout Vandecappelle (Essensium/Mind),

On Wed,  6 Nov 2013 23:59:55 +0100, Arnout Vandecappelle
(Essensium/Mind) wrote:

>  package/gcc/gcc-final/4.2.2-avr32-2.1.5          | 1 +
>  package/gcc/gcc-final/4.3.6                      | 1 +
>  package/gcc/gcc-final/4.4.7                      | 1 +
>  package/gcc/gcc-final/4.5.4                      | 1 +
>  package/gcc/gcc-final/4.6.4                      | 1 +
>  package/gcc/gcc-final/4.7.3                      | 1 +
>  package/gcc/gcc-final/4.8-arc                    | 1 +
>  package/gcc/gcc-final/4.8.2                      | 1 +

The only problem that I see with this symbolic link based solution is
that we will have to remember to add/update the three symbolic each
time we do a gcc version bump. If we forget to do so, then the build
will go on silently, but without having applied the patches.

I don't say this problem is a show-stopper, but it's a drawback of this
symbolic link solution, IMO.

>  define HOST_GCC_APPLY_POWERPC_PATCH
> -	support/scripts/apply-patches.sh $(@D) package/gcc/$(GCC_VERSION) powerpc-link-with-math-lib.patch.conditional
> +	if [ -e package/gcc/$(GCC_VERSION)/powerpc-link-with-math-lib.patch.conditional ]; then \
> +		support/scripts/apply-patches.sh $(@D) package/gcc/$(GCC_VERSION) powerpc-link-with-math-lib.patch.conditional; \
> +	fi

Why was adding the condition necessary?

Thanks!

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

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

* [Buildroot] [PATCH] gcc: use generic infrastructure for patches
  2013-11-06 23:13         ` Thomas Petazzoni
@ 2013-11-06 23:17           ` Peter Korsgaard
  2013-11-06 23:20           ` Arnout Vandecappelle
  1 sibling, 0 replies; 12+ messages in thread
From: Peter Korsgaard @ 2013-11-06 23:17 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Dear Arnout Vandecappelle (Essensium/Mind),
 > On Wed,  6 Nov 2013 23:59:55 +0100, Arnout Vandecappelle
 > (Essensium/Mind) wrote:

 >> package/gcc/gcc-final/4.2.2-avr32-2.1.5          | 1 +
 >> package/gcc/gcc-final/4.3.6                      | 1 +
 >> package/gcc/gcc-final/4.4.7                      | 1 +
 >> package/gcc/gcc-final/4.5.4                      | 1 +
 >> package/gcc/gcc-final/4.6.4                      | 1 +
 >> package/gcc/gcc-final/4.7.3                      | 1 +
 >> package/gcc/gcc-final/4.8-arc                    | 1 +
 >> package/gcc/gcc-final/4.8.2                      | 1 +

 > The only problem that I see with this symbolic link based solution is
 > that we will have to remember to add/update the three symbolic each
 > time we do a gcc version bump. If we forget to do so, then the build
 > will go on silently, but without having applied the patches.

 > I don't say this problem is a show-stopper, but it's a drawback of this
 > symbolic link solution, IMO.

That was the exact same thought I had. Perhaps it is the best we can
come up with, but it isn't really nice.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] gcc: use generic infrastructure for patches
  2013-11-06 23:13         ` Thomas Petazzoni
  2013-11-06 23:17           ` Peter Korsgaard
@ 2013-11-06 23:20           ` Arnout Vandecappelle
  2013-11-06 23:23             ` Arnout Vandecappelle
  1 sibling, 1 reply; 12+ messages in thread
From: Arnout Vandecappelle @ 2013-11-06 23:20 UTC (permalink / raw)
  To: buildroot

On 07/11/13 00:13, Thomas Petazzoni wrote:
> Dear Arnout Vandecappelle (Essensium/Mind),
>
> On Wed,  6 Nov 2013 23:59:55 +0100, Arnout Vandecappelle
> (Essensium/Mind) wrote:
>
>>   package/gcc/gcc-final/4.2.2-avr32-2.1.5          | 1 +
>>   package/gcc/gcc-final/4.3.6                      | 1 +
>>   package/gcc/gcc-final/4.4.7                      | 1 +
>>   package/gcc/gcc-final/4.5.4                      | 1 +
>>   package/gcc/gcc-final/4.6.4                      | 1 +
>>   package/gcc/gcc-final/4.7.3                      | 1 +
>>   package/gcc/gcc-final/4.8-arc                    | 1 +
>>   package/gcc/gcc-final/4.8.2                      | 1 +
>
> The only problem that I see with this symbolic link based solution is
> that we will have to remember to add/update the three symbolic each
> time we do a gcc version bump. If we forget to do so, then the build
> will go on silently, but without having applied the patches.
>
> I don't say this problem is a show-stopper, but it's a drawback of this
> symbolic link solution, IMO.

  I'm hoping that the separate source/build directories will be merged 
soon, so that this won't be necessary anymore :-)

>
>>   define HOST_GCC_APPLY_POWERPC_PATCH
>> -	support/scripts/apply-patches.sh $(@D) package/gcc/$(GCC_VERSION) powerpc-link-with-math-lib.patch.conditional
>> +	if [ -e package/gcc/$(GCC_VERSION)/powerpc-link-with-math-lib.patch.conditional ]; then \
>> +		support/scripts/apply-patches.sh $(@D) package/gcc/$(GCC_VERSION) powerpc-link-with-math-lib.patch.conditional; \
>> +	fi
>
> Why was adding the condition necessary?

  Read the rest of the thread: otherwise, apply-patches.sh will error out 
because package/gcc/some-snapshot-directory doesn't exist.

  Granted, I could have tested for the directory instead of the patch 
existence.


  Regards,
  Arnout
-- 
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH] gcc: use generic infrastructure for patches
  2013-11-06 23:20           ` Arnout Vandecappelle
@ 2013-11-06 23:23             ` Arnout Vandecappelle
  0 siblings, 0 replies; 12+ messages in thread
From: Arnout Vandecappelle @ 2013-11-06 23:23 UTC (permalink / raw)
  To: buildroot

On 07/11/13 00:20, Arnout Vandecappelle wrote:
> On 07/11/13 00:13, Thomas Petazzoni wrote:
>> Dear Arnout Vandecappelle (Essensium/Mind),
>>
>> On Wed,  6 Nov 2013 23:59:55 +0100, Arnout Vandecappelle
>> (Essensium/Mind) wrote:
>>
>>>   package/gcc/gcc-final/4.2.2-avr32-2.1.5          | 1 +
>>>   package/gcc/gcc-final/4.3.6                      | 1 +
>>>   package/gcc/gcc-final/4.4.7                      | 1 +
>>>   package/gcc/gcc-final/4.5.4                      | 1 +
>>>   package/gcc/gcc-final/4.6.4                      | 1 +
>>>   package/gcc/gcc-final/4.7.3                      | 1 +
>>>   package/gcc/gcc-final/4.8-arc                    | 1 +
>>>   package/gcc/gcc-final/4.8.2                      | 1 +
>>
>> The only problem that I see with this symbolic link based solution is
>> that we will have to remember to add/update the three symbolic each
>> time we do a gcc version bump. If we forget to do so, then the build
>> will go on silently, but without having applied the patches.
>>
>> I don't say this problem is a show-stopper, but it's a drawback of this
>> symbolic link solution, IMO.
>
>   I'm hoping that the separate source/build directories will be merged
> soon, so that this won't be necessary anymore :-)

  Let me clarify that:

  Once the separate source/build directories exist, I would like to 
introduce infrastructure to build several packages from the same source. 
So gcc would be extracted and patched only once, and built several times. 
Same for kernel-headers vs. linux, or uboot vs. uboot-tools. That will 
really make me happy :-)

  Regards,
  Arnout


-- 
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH] scripts: apply-patches: don't stop if no patch is found for a package
  2013-11-06 21:32     ` Arnout Vandecappelle
  2013-11-06 22:16       ` Thomas Petazzoni
  2013-11-06 22:59       ` [Buildroot] [PATCH] gcc: use generic infrastructure for patches Arnout Vandecappelle
@ 2013-11-06 23:40       ` Andi Shyti
  2 siblings, 0 replies; 12+ messages in thread
From: Andi Shyti @ 2013-11-06 23:40 UTC (permalink / raw)
  To: buildroot

> >this happens when for example you want to get as cross compiler
> >the daily snapshot instead of a specific version.
> >
> >The build stops with an error because of that 'exit 1' since it
> >doesn't find any gcc-20131105 patch directory (i think the
> >snapshot is called so).
> 
>  That's a bug in the gcc package then :-)
> 
>  It should actually be converted to using the default patch strategy
> instead of post-patch hooks. Let me look into it...

Thanks for looking into it, please add me in CC when you come to
a solution.

Anyway one solution could be to check whether the gcc chosen is a
snapshot or not, something similar:

diff --git a/support/scripts/apply-patches.sh
b/support/scripts/apply-patches.sh
index ff72b45..12f384c 100755
--- a/support/scripts/apply-patches.sh
+++ b/support/scripts/apply-patches.sh
@@ -42,6 +42,11 @@ if [ ! -d "${builddir}" ] ; then
     exit 1
 fi
 if [ ! -d "${patchdir}" ] ; then
+    if grep -q BR2_GCC_VERSION_SNAP=y .config; then
+       echo "Warning: no patch can be applied to the daily snapshot."
+        exit
+    fi
+
     echo "Aborting.  '${patchdir}' is not a directory."
     exit 1
 fi

looks like a hack, but it's the fastest thing that comes to my
mind :)

Andi

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

* [Buildroot] [PATCH] gcc: use generic infrastructure for patches
  2013-11-06 22:59       ` [Buildroot] [PATCH] gcc: use generic infrastructure for patches Arnout Vandecappelle
  2013-11-06 23:13         ` Thomas Petazzoni
@ 2013-11-07  1:19         ` Andi Shyti
  1 sibling, 0 replies; 12+ messages in thread
From: Andi Shyti @ 2013-11-07  1:19 UTC (permalink / raw)
  To: buildroot

> This solves the patch error for gcc snapshots.
> 
> Also sneak in an extra condition when applying the powerpc softfloat patch,
> so that the error is really fixed.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

works fine, just tested it.
If this is going to be applied, please feel free to add:

Tested-by: Andi Shyti <andi@etezian.org>

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

end of thread, other threads:[~2013-11-07  1:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-05 13:00 [Buildroot] [PATCH] scripts: apply-patches: don't stop if no patch is found for a package Andi Shyti
2013-11-05 18:51 ` Arnout Vandecappelle
2013-11-05 20:17   ` Andi Shyti
2013-11-06 21:32     ` Arnout Vandecappelle
2013-11-06 22:16       ` Thomas Petazzoni
2013-11-06 22:59       ` [Buildroot] [PATCH] gcc: use generic infrastructure for patches Arnout Vandecappelle
2013-11-06 23:13         ` Thomas Petazzoni
2013-11-06 23:17           ` Peter Korsgaard
2013-11-06 23:20           ` Arnout Vandecappelle
2013-11-06 23:23             ` Arnout Vandecappelle
2013-11-07  1:19         ` Andi Shyti
2013-11-06 23:40       ` [Buildroot] [PATCH] scripts: apply-patches: don't stop if no patch is found for a package Andi Shyti

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.