1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #8286 from smlng/enh/pkg/jerryscript

pkg: fix build jerryscript on macOS
This commit is contained in:
Francisco Acosta 2018-01-09 15:00:11 +01:00 committed by GitHub
commit 1bf222e07f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 10 deletions

View File

@ -21,8 +21,10 @@ BOARD_BLACKLIST := arduino-duemilanove arduino-mega2560 arduino-uno chronos \
# development process:
DEVELHELP ?= 1
ifneq ($(BOARD),native)
# Set stack size to something (conservatively) enormous
CFLAGS += -DTHREAD_STACKSIZE_MAIN=9092
endif
# Add the package for Jerryscript
USEPKG += jerryscript

View File

@ -1,12 +1,17 @@
PKG_NAME=jerryscript
PKG_URL=https://github.com/jerryscript-project/jerryscript.git
PKG_VERSION=e62b5b601bc1caa3e4d8172824988536ed6138f3
PKG_VERSION=bd574956e3702bc5b0512ad835b1df896cf00626
PKG_LICENSE=Apache-2.0
.PHONY: all
CFLAGS += -Wno-implicit-fallthrough
# disable warnings when compiling with LLVM for board native
ifeq ($(TOOLCHAIN)_$(BOARD),llvm_native)
export CFLAGS += -Wno-macro-redefined -Wno-gnu-folding-constant
endif
all: git-download
@cp Makefile.jerryscript $(PKG_BUILDDIR)/Makefile
"$(MAKE)" -C $(PKG_BUILDDIR)

View File

@ -2,9 +2,9 @@ BUILD_DIR ?= $(CURDIR)/riot
JERRYHEAP ?= 16
EXT_CFLAGS :=-D__TARGET_RIOT
EXT_CFLAGS :=-D__TARGET_RIOT
EXT_CFLAGS += $(CFLAGS)
EXT_CFLAGS += $(CFLAGS)
.PHONY: libjerry riot-jerry flash clean
@ -13,16 +13,16 @@ JERRYHEAP ?= 16
libjerry:
mkdir -p $(BUILD_DIR)
cmake -B$(BUILD_DIR) -H./ \
-DCMAKE_SYSTEM_NAME=RIOT \
-DCMAKE_SYSTEM_PROCESSOR="$(MCPU)" \
-DCMAKE_C_COMPILER=$(CC) \
-DCMAKE_C_COMPILER_WORKS=TRUE \
-DENABLE_LTO=OFF \
-DFEATURE_VALGRIND=OFF \
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain_external.cmake \
-DJERRY_LIBC=OFF \
-DJERRY_CMDLINE=OFF \
-DJERRY_LIBM=OFF \
-DENABLE_ALL_IN_ONE=OFF \
-DEXTERNAL_CMAKE_SYSTEM_PROCESSOR="$(MCPU)" \
-DEXTERNAL_CMAKE_C_COMPILER=$(CC) \
-DEXTERNAL_CMAKE_C_COMPILER_ID=GNU \
-DJERRY_LIBC=OFF \
-DJERRY_LIBM=OFF \
-DJERRY_CMDLINE=OFF \
-DEXTERNAL_COMPILE_FLAGS="$(EXT_CFLAGS)" \
-DMEM_HEAP_SIZE_KB=$(JERRYHEAP)