From 197006a41c1a0450bf6350d5742e186b5b0c69de Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 5 Jul 2013 10:40:52 +0200 Subject: [PATCH] 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: : undefined reference to `copysignl' Signed-off-by: Thomas Petazzoni Acked-by: Gustavo Zacarias Tested-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- package/gcc/gcc.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk index 790762da72..968354b418 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 #