Let the build script use a default for toolchain
The `cmake` directory already contains several toolchain files for various platforms (operating system + architecture). However, `tools/build.py` does not define a toolchain file for cmake unless explicitly specified. This patch changes the script to look into the `cmake` directory for a file named `toolchain_$(os)_$(arch).cmake` and, if found, pass that to cmake by default. OS and arch are determined by `os.uname()`. As Linux on Raspberry Pi identifies itself as "armv7l", the legacy "armv7l-hf" arch name is shortened to "armv7l". This way, building jerry on RPi (natively, not cross) becomes possible by simply running `tools/build.py` without any extra options. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
@@ -40,7 +40,7 @@ all:
|
||||
-DENABLE_LTO=OFF \
|
||||
-DENABLE_VALGRIND=OFF \
|
||||
-DCMAKE_TOOLCHAIN_FILE=build/configs/toolchain_external.cmake \
|
||||
-DEXTERNAL_CMAKE_SYSTEM_PROCESSOR=armv7l-hf \
|
||||
-DEXTERNAL_CMAKE_SYSTEM_PROCESSOR=armv7l \
|
||||
-DEXTERNAL_CMAKE_C_COMPILER=arm-none-eabi-gcc \
|
||||
-DEXTERNAL_CMAKE_C_COMPILER_ID=GNU \
|
||||
-DEXTERNAL_BUILD_ENTRY_FILE=./targets/nuttx-stm32f4/main-nuttx.c \
|
||||
|
||||
@@ -37,7 +37,7 @@ libjerry:
|
||||
-DJERRY_CMDLINE=OFF \
|
||||
-DCOMPILER_DEFAULT_LIBC=ON \
|
||||
-DENABLE_ALL_IN_ONE=OFF \
|
||||
-DEXTERNAL_CMAKE_SYSTEM_PROCESSOR=armv7l-hf \
|
||||
-DEXTERNAL_CMAKE_SYSTEM_PROCESSOR=armv7l \
|
||||
-DEXTERNAL_CMAKE_C_COMPILER=arm-none-eabi-gcc \
|
||||
-DEXTERNAL_CMAKE_C_COMPILER_ID=GNU \
|
||||
-DEXTERNAL_COMPILE_FLAGS="$(EXT_CFLAGS)" \
|
||||
|
||||
Reference in New Issue
Block a user