fix erlang Makefile und MyBuild

master
serkus01 2 years ago
parent d3f84333a3
commit e5124f4b13

@ -5,38 +5,38 @@ HOMEPAGE="https://www.erlang.org/"
PKG_SOURCES := https://github.com/erlang/otp/releases/download/OTP-25.0/otp_src_25.0.tar.gz
PKG_MD5 := 3c4c9da083f2a6b89aa1766415339d0c
#PKG_PATCHES := pkg_patch.txt
include $(EXTBLD_LIB)
ERLANG_CPPFLAGS = ${EMBOX_CPPFLAGS}
ERLANG_CPPFLAGS += -I$(abspath .)/include
ERLANG_CPPFLAGS += -include $(abspath .)/include/embox_erlang_compat.h
$(CONFIGURE) :
export EMBOX_GCC_LINK=full; \
cd $(PKG_SOURCE_DIR) && ( \
./configure \
--host=$(AUTOCONF_TARGET_TRIPLET) \
--target=$(AUTOCONF_TARGET_TRIPLET) \
--xcomp-conf \
CC=$(EMBOX_GCC) \
)
touch $@
#./configure --host=$(AUTOCONF_TARGET_TRIPLET) \
./configure --prefix=$(PKG_INSTALL_DIR) \
--host=$(AUTOCONF_TARGET_TRIPLET) \
--target=$(AUTOCONF_TARGET_TRIPLET) \
CPPFLAGS="$(ERLANG_CPPFLAGS)" \
-with-termcap=no \
-with-javac=no \
CC=$(EMBOX_GCC) \
)
touch $@
$(BUILD) :
cd $(PKG_SOURCE_DIR) && ( \
make \
$(MAKE) ERL_XCOMP_FORCE_DIFFERENT_OTP=yes MAKEFLAGS='$(EMBOX_IMPORTED_MAKEFLAGS)'; \
)
touch $@
#MAKEFLAGS='$(EMBOX_IMPORTED_MAKEFLAGS)';
$(INSTALL) :
cd $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VER) && ( \
$(MAKE) DESTDIR=$(PKG_INSTALL_DIR) install; \
mv $(PKG_INSTALL_DIR)/usr/local/bin/erl $(PKG_INSTALL_DIR)/erl; \
)
touch $@

@ -6,12 +6,13 @@ package third_party.cmd
@BuildArtifactPath(cppflags="-I$(abspath $(EXTERNAL_BUILD_DIR))/third_party/cmd/erlang/install/include")
@Cmd(name = "erl",
help = "erlang BEAM VM",
homepage = "https://www.erlang.org/",
man = '''
NAME
Erlang programming language runtime environment and libraries (OTP)
''')
module erl{
depends embox.compat.posix.proc.sigwait_stub
depends embox.compat.posix.pthread_stack_stub
depends embox.compat.posix.pthread_scope_stub
}

@ -0,0 +1,24 @@
/**
* @file
*
* @date Jul 18, 2022
* @author Anton Bondarev
*/
#ifndef EXT_PROJECT_ERLANG_INCLUDE_EMBOX_ERLANG_COMPAT_H_
#define EXT_PROJECT_ERLANG_INCLUDE_EMBOX_ERLANG_COMPAT_H_
#define THREAD_SCOPE_PROCESS 1
#define THREAD_SCOPE_SYSTEM 2
#include <pthread.h>
extern
int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize);
extern
int pthread_attr_setscope(pthread_attr_t *, int);
#endif /* EXT_PROJECT_ERLANG_INCLUDE_EMBOX_ERLANG_COMPAT_H_ */
Loading…
Cancel
Save