Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] gcc: apply PowerPC patch when needed
@ 2013-07-05  8:40 Thomas Petazzoni
  2013-07-05 12:57 ` Gustavo Zacarias
  2013-07-05 13:31 ` Peter Korsgaard
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2013-07-05  8:40 UTC (permalink / raw)
  To: buildroot

When converting gcc to the package infrastructure, a specific thing
for PowerPC was forgotten: applying the conditional patch
powerpc-link-with-math-lib.patch.conditional. This breaks the build of
some PowerPC toolchains, with failures such as:

<http://jenkins.free-electrons.com/job/buildroot/./config=qemu_ppc_virtex_ml507_defconfig/ws/output/host/usr/lib/gcc/powerpc-buildroot-linux-uclibc/4.7.3/../../../../powerpc-buildroot-linux-uclibc/lib/libgcc_s.so.1>: undefined reference to `copysignl'

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Anyone knows why we have this conditional patch? Can't it be made a
normal patch, with the appropriate modifications? Why isn't that
upstream since all those years?
---
 package/gcc/gcc.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 790762d..968354b 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -38,8 +38,17 @@ endef
 # Apply patches
 #
 
+ifeq ($(ARCH)-$(BR2_GCC_SHARED_LIBGCC),powerpc-y)
+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
+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
 
 #
-- 
1.8.1.2

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

* [Buildroot] [PATCH] gcc: apply PowerPC patch when needed
  2013-07-05  8:40 [Buildroot] [PATCH] gcc: apply PowerPC patch when needed Thomas Petazzoni
@ 2013-07-05 12:57 ` Gustavo Zacarias
  2013-07-05 13:01   ` Thomas Petazzoni
  2013-07-05 13:31 ` Peter Korsgaard
  1 sibling, 1 reply; 5+ messages in thread
From: Gustavo Zacarias @ 2013-07-05 12:57 UTC (permalink / raw)
  To: buildroot

On 07/05/2013 05:40 AM, Thomas Petazzoni wrote:

> When converting gcc to the package infrastructure, a specific thing
> for PowerPC was forgotten: applying the conditional patch
> powerpc-link-with-math-lib.patch.conditional. This breaks the build of
> some PowerPC toolchains, with failures such as:
> 
> <http://jenkins.free-electrons.com/job/buildroot/./config=qemu_ppc_virtex_ml507_defconfig/ws/output/host/usr/lib/gcc/powerpc-buildroot-linux-uclibc/4.7.3/../../../../powerpc-buildroot-linux-uclibc/lib/libgcc_s.so.1>: undefined reference to `copysignl'
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Tested-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

> Anyone knows why we have this conditional patch? Can't it be made a
> normal patch, with the appropriate modifications? Why isn't that
> upstream since all those years?

http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00292.html for the
history/thread.
A sample failing config without the patch is
qemu_ppc_virtex_ml507_defconfig (a powerpc 440 core, soft float).
Regards.

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

* [Buildroot] [PATCH] gcc: apply PowerPC patch when needed
  2013-07-05 12:57 ` Gustavo Zacarias
@ 2013-07-05 13:01   ` Thomas Petazzoni
  2013-07-05 13:16     ` Gustavo Zacarias
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2013-07-05 13:01 UTC (permalink / raw)
  To: buildroot

Dear Gustavo Zacarias,

On Fri, 05 Jul 2013 09:57:14 -0300, Gustavo Zacarias wrote:
> On 07/05/2013 05:40 AM, Thomas Petazzoni wrote:
> 
> > When converting gcc to the package infrastructure, a specific thing
> > for PowerPC was forgotten: applying the conditional patch
> > powerpc-link-with-math-lib.patch.conditional. This breaks the build of
> > some PowerPC toolchains, with failures such as:
> > 
> > <http://jenkins.free-electrons.com/job/buildroot/./config=qemu_ppc_virtex_ml507_defconfig/ws/output/host/usr/lib/gcc/powerpc-buildroot-linux-uclibc/4.7.3/../../../../powerpc-buildroot-linux-uclibc/lib/libgcc_s.so.1>: undefined reference to `copysignl'
> > 
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> Tested-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

Thanks :)

> > Anyone knows why we have this conditional patch? Can't it be made a
> > normal patch, with the appropriate modifications? Why isn't that
> > upstream since all those years?
> 
> http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00292.html for the
> history/thread.

I remember reading this thread a long time ago. But my question is
more: why hasn't the problem been fixed since 5 years? :-)

> A sample failing config without the patch is
> qemu_ppc_virtex_ml507_defconfig (a powerpc 440 core, soft float).

Indeed, that's the one that was failing in our Jenkins builds, as can be
seen from the URL above.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH] gcc: apply PowerPC patch when needed
  2013-07-05 13:01   ` Thomas Petazzoni
@ 2013-07-05 13:16     ` Gustavo Zacarias
  0 siblings, 0 replies; 5+ messages in thread
From: Gustavo Zacarias @ 2013-07-05 13:16 UTC (permalink / raw)
  To: buildroot

On 07/05/2013 10:01 AM, Thomas Petazzoni wrote:

> I remember reading this thread a long time ago. But my question is
> more: why hasn't the problem been fixed since 5 years? :-)

Difference of opinions i suppose, with the original patch creator
thinking it's patch is right and the complaining end not creating a
"proper" patch :)
Probably the same case as the ever-lasting arm softfloat patch hehe.
Regards.

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

* [Buildroot] [PATCH] gcc: apply PowerPC patch when needed
  2013-07-05  8:40 [Buildroot] [PATCH] gcc: apply PowerPC patch when needed Thomas Petazzoni
  2013-07-05 12:57 ` Gustavo Zacarias
@ 2013-07-05 13:31 ` Peter Korsgaard
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2013-07-05 13:31 UTC (permalink / raw)
  To: buildroot

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

 Thomas> When converting gcc to the package infrastructure, a specific thing
 Thomas> for PowerPC was forgotten: applying the conditional patch
 Thomas> powerpc-link-with-math-lib.patch.conditional. This breaks the build of
 Thomas> some PowerPC toolchains, with failures such as:

 Thomas> <http://jenkins.free-electrons.com/job/buildroot/./config=qemu_ppc_virtex_ml507_defconfig/ws/output/host/usr/lib/gcc/powerpc-buildroot-linux-uclibc/4.7.3/../../../../powerpc-buildroot-linux-uclibc/lib/libgcc_s.so.1>: undefined reference to `copysignl'

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2013-07-05 13:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-05  8:40 [Buildroot] [PATCH] gcc: apply PowerPC patch when needed Thomas Petazzoni
2013-07-05 12:57 ` Gustavo Zacarias
2013-07-05 13:01   ` Thomas Petazzoni
2013-07-05 13:16     ` Gustavo Zacarias
2013-07-05 13:31 ` Peter Korsgaard

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