From: Oleksij Rempel <o.rempel@pengutronix.de>
To: pmamonov@gmail.com, antonynpavlov@gmail.com,
distrokit@pengutronix.de, rsh@pengutronix.de, mol@pengutronix.de
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Subject: [DistroKit] [PATCH v1 2/3] platform-mips: libffi version 3.3
Date: Wed, 5 Feb 2020 08:14:52 +0100 [thread overview]
Message-ID: <20200205071453.24804-3-o.rempel@pengutronix.de> (raw)
In-Reply-To: <20200205071453.24804-1-o.rempel@pengutronix.de>
This version is needed to build libffi with mips soft float toolchain
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
...sed-ifndef-for-__mips_soft_float-442.patch | 25 ++++++++
.../platform-mips/patches/libffi-3.3/series | 4 ++
configs/platform-mips/rules/libffi.make | 64 +++++++++++++++++++
3 files changed, 93 insertions(+)
create mode 100644 configs/platform-mips/patches/libffi-3.3/0001-Fixed-missed-ifndef-for-__mips_soft_float-442.patch
create mode 100644 configs/platform-mips/patches/libffi-3.3/series
create mode 100644 configs/platform-mips/rules/libffi.make
diff --git a/configs/platform-mips/patches/libffi-3.3/0001-Fixed-missed-ifndef-for-__mips_soft_float-442.patch b/configs/platform-mips/patches/libffi-3.3/0001-Fixed-missed-ifndef-for-__mips_soft_float-442.patch
new file mode 100644
index 0000000..fae0a0e
--- /dev/null
+++ b/configs/platform-mips/patches/libffi-3.3/0001-Fixed-missed-ifndef-for-__mips_soft_float-442.patch
@@ -0,0 +1,25 @@
+From: Carl Hurd <carl.m.hurd@gmail.com>
+Date: Fri, 29 Nov 2019 14:46:11 -0500
+Subject: [PATCH] Fixed missed #ifndef for __mips_soft_float (#442)
+
+Thank you!
+---
+ src/mips/o32.S | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/mips/o32.S b/src/mips/o32.S
+index 44e74cb91a21..799139b2968b 100644
+--- a/src/mips/o32.S
++++ b/src/mips/o32.S
+@@ -282,9 +282,11 @@ $LCFI12:
+ li $13, 1 # FFI_O32
+ bne $16, $13, 1f # Skip fp save if FFI_O32_SOFT_FLOAT
+
++#ifndef __mips_soft_float
+ # Store all possible float/double registers.
+ s.d $f12, FA_0_0_OFF2($fp)
+ s.d $f14, FA_1_0_OFF2($fp)
++#endif
+ 1:
+ # prepare arguments for ffi_closure_mips_inner_O32
+ REG_L a0, 4($15) # cif
diff --git a/configs/platform-mips/patches/libffi-3.3/series b/configs/platform-mips/patches/libffi-3.3/series
new file mode 100644
index 0000000..c778250
--- /dev/null
+++ b/configs/platform-mips/patches/libffi-3.3/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Fixed-missed-ifndef-for-__mips_soft_float-442.patch
+# 3bcc9eb6287e614be7370f49463a53e9 - git-ptx-patches magic
diff --git a/configs/platform-mips/rules/libffi.make b/configs/platform-mips/rules/libffi.make
new file mode 100644
index 0000000..1feab4b
--- /dev/null
+++ b/configs/platform-mips/rules/libffi.make
@@ -0,0 +1,64 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2008 by Robert Schwebel <r.schwebel@pengutronix.de>
+# 2009 by Marc Kleine-Budde <mkl@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBFFI) += libffi
+
+#
+# Paths and names
+#
+LIBFFI_VERSION := 3.3
+LIBFFI_MD5 := 6313289e32f1d38a9df4770b014a2ca7
+LIBFFI := libffi-$(LIBFFI_VERSION)
+LIBFFI_SUFFIX := tar.gz
+LIBFFI_SOURCE := $(SRCDIR)/$(LIBFFI).$(LIBFFI_SUFFIX)
+LIBFFI_DIR := $(BUILDDIR)/$(LIBFFI)
+LIBFFI_URL := \
+ http://ftp.gwdg.de/pub/linux/sources.redhat.com/libffi/$(LIBFFI).$(LIBFFI_SUFFIX) \
+ ftp://sourceware.org/pub/libffi/$(LIBFFI).$(LIBFFI_SUFFIX)
+LIBFFI_LICENSE := MIT
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LIBFFI_CONF_TOOL := autoconf
+LIBFFI_CONF_OPT := \
+ $(CROSS_AUTOCONF_USR) \
+ --disable-static \
+ --enable-portable-binary \
+ --disable-pax_emutramp \
+ --disable-debug \
+ --enable-structs \
+ --enable-raw-api \
+ --disable-purify-safety \
+ --without-gcc-arch
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libffi.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, libffi)
+ @$(call install_fixup, libffi,PRIORITY,optional)
+ @$(call install_fixup, libffi,SECTION,base)
+ @$(call install_fixup, libffi,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
+ @$(call install_fixup, libffi,DESCRIPTION,missing)
+
+ @$(call install_lib, libffi, 0, 0, 0644, libffi)
+
+ @$(call install_finish, libffi)
+
+ @$(call touch)
+
+# vim: syntax=make
--
2.25.0
_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de
next prev parent reply other threads:[~2020-02-05 7:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-05 7:14 [DistroKit] [PATCH v1 0/3] add MIPS platform support Oleksij Rempel
2020-02-05 7:14 ` [DistroKit] [PATCH v1 1/3] platform-mips: add basic qemu malta support Oleksij Rempel
2020-02-05 9:58 ` Roland Hieber
2020-02-05 7:14 ` Oleksij Rempel [this message]
2020-02-05 8:49 ` [DistroKit] [PATCH v1 2/3] platform-mips: libffi version 3.3 Michael Olbrich
2020-02-05 7:14 ` [DistroKit] [PATCH v1 3/3] platform-mips: add qemu support for malta Oleksij Rempel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200205071453.24804-3-o.rempel@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=antonynpavlov@gmail.com \
--cc=distrokit@pengutronix.de \
--cc=mol@pengutronix.de \
--cc=pmamonov@gmail.com \
--cc=rsh@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox