3135c6374a
Now that we're using Erlang 18, the preferred atomic ops implementation for Erlang is its own built-in implementation, so use it instead of libatomic_ops. BR2_PACKAGE_ERLANG_ARCH_SUPPORTS is added now that BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS can no longer be used for checking whether the package can be built. This fixes autobuilder failures on aarch64 and sparc_v8: http://autobuild.buildroot.net/results/0cd/0cd22eb74fa29e5a85bf897762e16ab3daf33962/ http://autobuild.buildroot.net/results/688278236e6d5bcd63b7d4413303eb115a38f3a7/ http://autobuild.buildroot.net/results/7875a7425bfe1f43d46c9a1db9f96b54f7a99b19/ Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
93 lines
2.6 KiB
Makefile
93 lines
2.6 KiB
Makefile
################################################################################
|
|
#
|
|
# erlang
|
|
#
|
|
################################################################################
|
|
|
|
# See note below when updating Erlang
|
|
ERLANG_VERSION = 18.3
|
|
ERLANG_SITE = http://www.erlang.org/download
|
|
ERLANG_SOURCE = otp_src_$(ERLANG_VERSION).tar.gz
|
|
ERLANG_DEPENDENCIES = host-erlang
|
|
|
|
ERLANG_LICENSE = Apache-2.0
|
|
ERLANG_LICENSE_FILES = LICENSE.txt
|
|
ERLANG_INSTALL_STAGING = YES
|
|
|
|
# Patched erts/aclocal.m4
|
|
ERLANG_AUTORECONF = YES
|
|
|
|
# Whenever updating Erlang, this value should be updated as well, to the
|
|
# value of EI_VSN in the file lib/erl_interface/vsn.mk
|
|
ERLANG_EI_VSN = 3.8.2
|
|
|
|
# The configure checks for these functions fail incorrectly
|
|
ERLANG_CONF_ENV = ac_cv_func_isnan=yes ac_cv_func_isinf=yes
|
|
|
|
# Set erl_xcomp variables. See xcomp/erl-xcomp.conf.template
|
|
# for documentation.
|
|
ERLANG_CONF_ENV += erl_xcomp_sysroot=$(STAGING_DIR)
|
|
|
|
ERLANG_CONF_OPTS = --without-javac
|
|
|
|
# erlang uses openssl for all things crypto. Since the host tools (such as
|
|
# rebar) uses crypto, we need to build host-erlang with support for openssl.
|
|
HOST_ERLANG_DEPENDENCIES = host-openssl
|
|
HOST_ERLANG_CONF_OPTS = --without-javac --with-ssl=$(HOST_DIR)/usr
|
|
|
|
HOST_ERLANG_CONF_OPTS += --without-termcap
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
|
|
ERLANG_CONF_OPTS += --disable-threads
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_NCURSES),y)
|
|
ERLANG_CONF_OPTS += --with-termcap
|
|
ERLANG_DEPENDENCIES += ncurses
|
|
else
|
|
ERLANG_CONF_OPTS += --without-termcap
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
|
ERLANG_CONF_OPTS += --with-ssl
|
|
ERLANG_DEPENDENCIES += openssl
|
|
else
|
|
ERLANG_CONF_OPTS += --without-ssl
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
ERLANG_CONF_OPTS += --enable-shared-zlib
|
|
ERLANG_DEPENDENCIES += zlib
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_ERLANG_SMP),)
|
|
ERLANG_CONF_OPTS += --disable-smp-support
|
|
endif
|
|
|
|
# Remove source, example, gs and wx files from staging and target.
|
|
ERLANG_REMOVE_PACKAGES = gs wx
|
|
|
|
ifneq ($(BR2_PACKAGE_ERLANG_MEGACO),y)
|
|
ERLANG_REMOVE_PACKAGES += megaco
|
|
endif
|
|
|
|
define ERLANG_REMOVE_STAGING_UNUSED
|
|
for package in $(ERLANG_REMOVE_PACKAGES); do \
|
|
rm -rf $(STAGING_DIR)/usr/lib/erlang/lib/$${package}-*; \
|
|
done
|
|
endef
|
|
|
|
define ERLANG_REMOVE_TARGET_UNUSED
|
|
find $(TARGET_DIR)/usr/lib/erlang -type d -name src -prune -exec rm -rf {} \;
|
|
find $(TARGET_DIR)/usr/lib/erlang -type d -name examples -prune -exec rm -rf {} \;
|
|
for package in $(ERLANG_REMOVE_PACKAGES); do \
|
|
rm -rf $(TARGET_DIR)/usr/lib/erlang/lib/$${package}-*; \
|
|
done
|
|
endef
|
|
|
|
ERLANG_POST_INSTALL_STAGING_HOOKS += ERLANG_REMOVE_STAGING_UNUSED
|
|
ERLANG_POST_INSTALL_TARGET_HOOKS += ERLANG_REMOVE_TARGET_UNUSED
|
|
|
|
$(eval $(autotools-package))
|
|
$(eval $(host-autotools-package))
|