Skip to contentSkip to conversation

edgerouter: libffi: fix build with soft-float tune

PATCH Khem Raj 2 participants 3 messages May 10, 2016 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Khem Raj

author
#2 lore raw

Ruslan

Send this patch to OE-Core ml.

Quoted 15 lines · Ruslan Babayev

---
.../recipes-support/libffi/libffi/mips-n32-soft-float.patch | 13 +++++++++++++
meta/recipes-support/libffi/libffi_3.2.1.bb | 1 +

2 files changed, 14 insertions(+)

create mode 100644 meta/recipes-support/libffi/libffi/mips-n32-soft-float.patch

meta/recipes-support/libffi/libffi/mips-n32-soft-float.patch new file +0 -0
new file mode 100644
index 0000000..c901614

meta/recipes-support/libffi/libffi/mips-n32-soft-float.patch line 7

Quoted 7 lines
meta/recipes-support/libffi/libffi/mips-n32-soft-float.patch new file +7 -0
@@ -0,0 +1,13 @@
+Index: libffi-3.2.1/src/mips/n32.S
+===================================================================
+--- libffi-3.2.1.orig/src/mips/n32.S
++++ libffi-3.2.1/src/mips/n32.S
+@@ -30,7 +30,7 @@
+
+ /* Only build this code if we are compiling for n32 */

Please change the comment to reflect this change n32-sf or something.

Quoted 22 lines
meta/recipes-support/libffi/libffi/mips-n32-soft-float.patch new file +6 -0
+
+-#if defined(FFI_MIPS_N32)
++#if defined(FFI_MIPS_N32) && !defined(__mips_soft_float)
+
+ #define callback a0
+ #define bytes	 a2
meta/recipes-support/libffi/libffi_3.2.1.bb +1 -0
index 72e25fb..5b57e79 100644
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3610bb17683a0089ed64055416b2ae1b"
 SRC_URI = "ftp://sourceware.org/pub/libffi/${BP}.tar.gz \
           file://not-win32.patch \
 	   file://0001-mips-Use-compiler-internal-define-for-linux.patch \
+           file://mips-n32-soft-float.patch \
 	   "
 

SRC_URI[md5sum] = "83b89587607e3eb65c70d361f13bab43" --
2.7.4

author
#3 lore raw
In reply to a message not in the archive

secondly, we default to n64 on mips64 so how did you end up with this error, I wonder.

Quoted 43 lines · Ruslan Babayev

---
.../recipes-support/libffi/libffi/mips-n32-soft-float.patch | 13 +++++++++++++
meta/recipes-support/libffi/libffi_3.2.1.bb | 1 +

2 files changed, 14 insertions(+)

create mode 100644 meta/recipes-support/libffi/libffi/mips-n32-soft-float.patch

meta/recipes-support/libffi/libffi/mips-n32-soft-float.patch new file +13 -0
new file mode 100644
index 0000000..c901614
@@ -0,0 +1,13 @@
+Index: libffi-3.2.1/src/mips/n32.S
+===================================================================
+--- libffi-3.2.1.orig/src/mips/n32.S
++++ libffi-3.2.1/src/mips/n32.S
+@@ -30,7 +30,7 @@
+
+ /* Only build this code if we are compiling for n32 */
+
+-#if defined(FFI_MIPS_N32)
++#if defined(FFI_MIPS_N32) && !defined(__mips_soft_float)
+
+ #define callback a0
+ #define bytes	 a2
meta/recipes-support/libffi/libffi_3.2.1.bb +1 -0
index 72e25fb..5b57e79 100644
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3610bb17683a0089ed64055416b2ae1b"
 SRC_URI = "ftp://sourceware.org/pub/libffi/${BP}.tar.gz \
           file://not-win32.patch \
 	   file://0001-mips-Use-compiler-internal-define-for-linux.patch \
+           file://mips-n32-soft-float.patch \
 	   "
 

SRC_URI[md5sum] = "83b89587607e3eb65c70d361f13bab43" --
2.7.4

#4 lore raw
In reply to a message not in the archive
Quoted 6 lines · Ruslan Babayev
---
 .../recipes-support/libffi/libffi/mips-n32-soft-float.patch | 13 +++++++++++++
 meta/recipes-support/libffi/libffi_3.2.1.bb                 |  1 +
 2 files changed, 14 insertions(+)
 create mode 100644 meta/recipes-support/libffi/libffi/mips-n32-soft-float.patch

I am still getting the following build errors with or without musl after
applying this patch. Did I miss something?
/buildarea/raid0/khao/build-yocto-musl/tmp/sysroots/edgerouter/usr/lib/libffi.so: undefined reference to ffi_closure_N32' /buildarea/raid0/khao/build-yocto-musl/tmp/sysroots/edgerouter/usr/lib/libffi.so: undefined reference to ffi_call_N32'

Thanks,
Kevin

Quoted 35 lines
meta/recipes-support/libffi/libffi/mips-n32-soft-float.patch new file +13 -0
new file mode 100644
index 0000000..c901614
@@ -0,0 +1,13 @@
+Index: libffi-3.2.1/src/mips/n32.S
+===================================================================
+--- libffi-3.2.1.orig/src/mips/n32.S
++++ libffi-3.2.1/src/mips/n32.S
+@@ -30,7 +30,7 @@
+ 
+ /* Only build this code if we are compiling for n32 */	
+ 
+-#if defined(FFI_MIPS_N32)
++#if defined(FFI_MIPS_N32) && !defined(__mips_soft_float)
+ 
+ #define callback a0
+ #define bytes	 a2
meta/recipes-support/libffi/libffi_3.2.1.bb +1 -0
index 72e25fb..5b57e79 100644
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3610bb17683a0089ed64055416b2ae1b"
 SRC_URI = "ftp://sourceware.org/pub/libffi/${BP}.tar.gz \
            file://not-win32.patch \
 	   file://0001-mips-Use-compiler-internal-define-for-linux.patch \
+           file://mips-n32-soft-float.patch \
 	   "
 
 SRC_URI[md5sum] = "83b89587607e3eb65c70d361f13bab43"
Signature · 1 line
2.7.4