From 13014e3633c614a660bdc516d896c0a89be1f4e0 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Wed, 17 Aug 2016 09:52:58 +0800 Subject: [PATCH] libffi: patch n32.S to fix mips64 soft-float build This should fix openwrt/packages#2511 Signed-off-by: Yousong Zhou --- .../patches/100-fix_mips_softfloat.patch | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/libs/libffi/patches/100-fix_mips_softfloat.patch b/libs/libffi/patches/100-fix_mips_softfloat.patch index bdd5a9a43..09b91eff5 100644 --- a/libs/libffi/patches/100-fix_mips_softfloat.patch +++ b/libs/libffi/patches/100-fix_mips_softfloat.patch @@ -1,3 +1,97 @@ +From bfeac1b2d18b12c1c3c64a41a09c90f93d0ed4ca Mon Sep 17 00:00:00 2001 +From: Yousong Zhou +Date: Mon, 15 Aug 2016 15:00:13 +0800 +Subject: [PATCH] mips: fix MIPS softfloat build issue + +The patch for o32.S is taken from OpenWrt packages repo 3a7a4bf "libffi: +fix MIPS softfloat build issue with current binutils" + +Signed-off-by: Felix Fietkau +Signed-off-by: Yousong Zhou +--- + src/mips/n32.S | 17 +++++++++++++++++ + src/mips/o32.S | 17 +++++++++++++++++ + 2 files changed, 34 insertions(+) + +diff --git a/src/mips/n32.S b/src/mips/n32.S +index c6985d3..8f25994 100644 +--- a/src/mips/n32.S ++++ b/src/mips/n32.S +@@ -107,6 +107,16 @@ loadregs: + + REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. + ++#ifdef __mips_soft_float ++ REG_L a0, 0*FFI_SIZEOF_ARG(t9) ++ REG_L a1, 1*FFI_SIZEOF_ARG(t9) ++ REG_L a2, 2*FFI_SIZEOF_ARG(t9) ++ REG_L a3, 3*FFI_SIZEOF_ARG(t9) ++ REG_L a4, 4*FFI_SIZEOF_ARG(t9) ++ REG_L a5, 5*FFI_SIZEOF_ARG(t9) ++ REG_L a6, 6*FFI_SIZEOF_ARG(t9) ++ REG_L a7, 7*FFI_SIZEOF_ARG(t9) ++#else + and t4, t6, ((1<