update buildroot to 2017.02.11
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
From ecd4eceae98cfb1c83133bdeaa9095546ca8b7c6 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Thu, 26 May 2016 15:05:48 +0200
|
||||
Subject: [PATCH] Use <fenv.h> when available instead of <fpu_control.h>
|
||||
|
||||
musl libc (http://musl-libc.org lack the non-standard <fpu_control.h>
|
||||
header, which is used in src/os/linux/{i386,x86_64}/init.c files to
|
||||
setup the floating point precision. This patch makes it use the
|
||||
standard C <fenv.h> header instead when available.
|
||||
|
||||
Original patch at Felix Janda at
|
||||
https://sourceforge.net/p/jamvm/patches/6/, adapted to still use
|
||||
<fpu_control.h> if <fenv.h> is not provided.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
src/os/linux/i386/init.c | 15 +++++++++++++++
|
||||
src/os/linux/x86_64/init.c | 15 +++++++++++++--
|
||||
3 files changed, 29 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 19f77e6..ce59a3e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -279,7 +279,7 @@ fi
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
-AC_CHECK_HEADERS(sys/time.h unistd.h endian.h sys/param.h locale.h alloca.h)
|
||||
+AC_CHECK_HEADERS(sys/time.h unistd.h endian.h sys/param.h locale.h alloca.h fenv.h)
|
||||
|
||||
if test "$enable_zip" != no; then
|
||||
AC_CHECK_HEADER(zlib.h,,AC_MSG_ERROR(zlib.h is missing))
|
||||
diff --git a/src/os/linux/i386/init.c b/src/os/linux/i386/init.c
|
||||
index d9c6648..8fefe7d 100644
|
||||
--- a/src/os/linux/i386/init.c
|
||||
+++ b/src/os/linux/i386/init.c
|
||||
@@ -19,18 +19,33 @@
|
||||
* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
+#include "config.h"
|
||||
+
|
||||
+#if defined(HAVE_FENV_H)
|
||||
+#include <fenv.h>
|
||||
+#else
|
||||
#include <fpu_control.h>
|
||||
+#endif
|
||||
|
||||
/* Change floating point precision to double (64-bit) from
|
||||
* the extended (80-bit) Linux default. */
|
||||
|
||||
void setDoublePrecision() {
|
||||
+#if defined(HAVE_FENV_H)
|
||||
+ fenv_t fenv;
|
||||
+
|
||||
+ fegetenv(&fenv);
|
||||
+ fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */
|
||||
+ fenv.__control_word |= 0x200; /* _FPU_DOUBLE */
|
||||
+ fesetenv(&fenv);
|
||||
+#else
|
||||
fpu_control_t cw;
|
||||
|
||||
_FPU_GETCW(cw);
|
||||
cw &= ~_FPU_EXTENDED;
|
||||
cw |= _FPU_DOUBLE;
|
||||
_FPU_SETCW(cw);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void initialisePlatform() {
|
||||
diff --git a/src/os/linux/x86_64/init.c b/src/os/linux/x86_64/init.c
|
||||
index 9d55229..b42b14e 100644
|
||||
--- a/src/os/linux/x86_64/init.c
|
||||
+++ b/src/os/linux/x86_64/init.c
|
||||
@@ -19,7 +19,11 @@
|
||||
* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
-#ifdef __linux__
|
||||
+#include "config.h"
|
||||
+
|
||||
+#if defined(HAVE_FENV_H)
|
||||
+#include <fenv.h>
|
||||
+#else
|
||||
#include <fpu_control.h>
|
||||
#endif
|
||||
|
||||
@@ -30,7 +34,14 @@
|
||||
*/
|
||||
|
||||
void setDoublePrecision() {
|
||||
-#ifdef __linux__
|
||||
+#if defined(HAVE_FENV_H)
|
||||
+ fenv_t fenv;
|
||||
+
|
||||
+ fegetenv(&fenv);
|
||||
+ fenv.__control_word &= ~0x300; /*_FPU_EXTENDED */
|
||||
+ fenv.__control_word |= 0x200; /*_FPU_DOUBLE */
|
||||
+ fesetenv(&fenv);
|
||||
+#else
|
||||
fpu_control_t cw;
|
||||
|
||||
_FPU_GETCW(cw);
|
||||
--
|
||||
2.7.4
|
||||
|
||||
20
bsp/buildroot-2017.02.11/package/jamvm/Config.in
Normal file
20
bsp/buildroot-2017.02.11/package/jamvm/Config.in
Normal file
@@ -0,0 +1,20 @@
|
||||
config BR2_PACKAGE_JAMVM
|
||||
bool "jamvm"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_x86_64 \
|
||||
|| BR2_mips || BR2_mipsel || BR2_powerpc
|
||||
depends on BR2_PACKAGE_CLASSPATH_ARCH_SUPPORTS
|
||||
select BR2_PACKAGE_ZLIB
|
||||
select BR2_PACKAGE_CLASSPATH
|
||||
help
|
||||
JamVM is a new Java Virtual Machine which conforms to the
|
||||
JVM specification version 2 (blue book).
|
||||
|
||||
http://jamvm.sf.net
|
||||
|
||||
comment "jamvm needs a toolchain w/ threads, dynamic library"
|
||||
depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_x86_64 \
|
||||
|| BR2_mips || BR2_mipsel || BR2_powerpc
|
||||
depends on BR2_PACKAGE_CLASSPATH_ARCH_SUPPORTS
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
|
||||
2
bsp/buildroot-2017.02.11/package/jamvm/jamvm.hash
Normal file
2
bsp/buildroot-2017.02.11/package/jamvm/jamvm.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally computed:
|
||||
sha256 76428e96df0ae9dd964c7a7c74c1e9a837e2f312c39e9a357fa8178f7eff80da jamvm-2.0.0.tar.gz
|
||||
34
bsp/buildroot-2017.02.11/package/jamvm/jamvm.mk
Normal file
34
bsp/buildroot-2017.02.11/package/jamvm/jamvm.mk
Normal file
@@ -0,0 +1,34 @@
|
||||
################################################################################
|
||||
#
|
||||
# jamvm
|
||||
#
|
||||
################################################################################
|
||||
|
||||
JAMVM_VERSION = 2.0.0
|
||||
JAMVM_SITE = http://downloads.sourceforge.net/project/jamvm/jamvm/JamVM%20$(JAMVM_VERSION)
|
||||
JAMVM_LICENSE = GPLv2+
|
||||
JAMVM_LICENSE_FILES = COPYING
|
||||
JAMVM_DEPENDENCIES = zlib classpath
|
||||
# For 0001-Use-fenv.h-when-available-instead-of-fpu_control.h.patch
|
||||
JAMVM_AUTORECONF = YES
|
||||
# int inlining seems to crash jamvm, don't build shared version of internal lib
|
||||
JAMVM_CONF_OPTS = \
|
||||
--with-classpath-install-dir=/usr \
|
||||
--disable-int-inlining \
|
||||
--disable-shared \
|
||||
--without-pic
|
||||
|
||||
# jamvm has ARM assembly code that cannot be compiled in Thumb2 mode,
|
||||
# so we must force traditional ARM mode.
|
||||
ifeq ($(BR2_arm),y)
|
||||
JAMVM_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -marm"
|
||||
endif
|
||||
|
||||
# Needed for autoreconf
|
||||
define JAMVM_CREATE_M4_DIR
|
||||
mkdir -p $(@D)/m4
|
||||
endef
|
||||
|
||||
JAMVM_POST_PATCH_HOOKS += JAMVM_CREATE_M4_DIR
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user