kumquat-buildroot/package/jamvm/jamvm.mk
Thomas Petazzoni a1ca3dcb59 jamvm: fix build with uClibc on i386/x86_64
Commit 0b6b67f34d ("jamvm: add patch to
fix musl build") introduced a patch to fix the jamvm build with the
musl C library. While the commit log pretends that the build was still
working with uClibc, it is not correct: it no longer builds fine with
uClibc on i386/x86_64, because the Buildroot default configuration for
uClibc doesn't enable <fenv.h> support.

Therefore this commit adapts the patch to use <fenv.h> if available
(which is the case with musl), and otherwise fall back to
<fpu_control.h>, which is available in uClibc.

Thanks to Waldemar for the investigation.

Fixes:

  http://autobuild.buildroot.net/results/325a50d15e1836b31df4e84ba83b296abfb73041/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-11-06 22:21:07 +01:00

35 lines
1007 B
Makefile

################################################################################
#
# 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))