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

Merge pull request #9821 from cladmi/pr/make/jerryscript/includes

pkg/jerryscript: fix jerryscript not using system includes
This commit is contained in:
Alexandre Abadie 2018-12-19 19:53:47 +01:00 committed by GitHub
commit d2478af223
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 8 deletions

View File

@ -1,9 +1,2 @@
INCLUDES += -I$(PKGDIRBASE)/jerryscript/jerry-core/include
INCLUDES += -I$(PKGDIRBASE)/jerryscript/jerry-ext/include
ifneq (,$(filter cortex-m%,$(CPU_ARCH)))
# jerryscript package package is not using system includes right now, so
# many newlib hearders (not even stdio.h) is found
# Fixed in #9821 (so remove when merged)
TOOLCHAINS_BLACKLIST += llvm
endif

View File

@ -6,6 +6,20 @@ EXT_CFLAGS :=-D__TARGET_RIOT
ifeq ($(TOOLCHAIN)_$(BOARD),llvm_native)
EXT_CFLAGS :=-D__TARGET_RIOT -Wno-conversion
else ifeq (esp32,$(CPU))
# The esp32 C newlib version 2.2.0 has errors when compiling with warnings
# that are enabled by jerryscript build system so disable them for this cpu:
# * -Wundef: stdio.h: `__GNU_VISIBLE` and `__BSD_VISIBLE` are not defined
EXT_CFLAGS += -Wno-undef -Wno-error=undef
else ifeq (esp8266,$(CPU))
# The esp8266 C newlib version 3.0.0 has errors when compiling with warnings
# that are enabled by jerryscript build system so disable them for this cpu:
# * -Wundef
# * -Wconversion
# * -Wsign-conversion
EXT_CFLAGS += -Wno-undef -Wno-error=undef
EXT_CFLAGS += -Wno-conversion -Wno-error=conversion
EXT_CFLAGS += -Wno-sign-conversion -Wno-error=sign-conversion
endif
.PHONY: all libjerry
@ -25,7 +39,7 @@ libjerry:
-DJERRY_LIBM=OFF \
-DJERRY_CMDLINE=OFF \
-DHAVE_TIME_H=0 \
-DEXTERNAL_COMPILE_FLAGS="$(EXT_CFLAGS)" \
-DEXTERNAL_COMPILE_FLAGS="$(INCLUDES) $(EXT_CFLAGS)" \
-DMEM_HEAP_SIZE_KB=$(JERRYHEAP)
"$(MAKE)" -C $(BUILD_DIR) jerry-core jerry-ext jerry-port-default-minimal