Skip to contentSkip to conversation

gcc: apply PowerPC patch when needed

PATCH New Thomas Petazzoni 3 participants 5 messages Jul 5, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gcc: apply PowerPC patch when needed

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'

---
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(+)
package/gcc/gcc.mk +9 -0
index 790762d..968354b 100644
@@ -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
 
 #
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/1 gcc: apply PowerPC patch when needed

Quoted 8 lines · Thomas Petazzoni

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'

Quoted 3 lines

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.

#2 lore raw

PATCH 1/1 gcc: apply PowerPC patch when needed

Dear Gustavo Zacarias,

Quoted 7 lines · Gustavo Zacarias
Quoted 5 lines · Thomas Petazzoni

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:

Quoted 6 lines
Quoted 3 lines

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

Thanks :)

Quoted 6 lines
Quoted 3 lines

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? :-)

Quoted 2 lines

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

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH 1/1 gcc: apply PowerPC patch when needed

Quoted 2 lines · Thomas Petazzoni

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.

#4 lore raw

PATCH 1/1 gcc: apply PowerPC patch when needed

In reply to Thomas Petazzoni
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> 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 <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard