Remove the 'external' toolchain file (#2089)

The 'external' toolchain file does nothing but transitively sets
some cmake system variables from values received on the command
line, and forcibly sets the C compiler. However, the same cmake
system variables can be directly set via the command line, together
with the C compiler, and specifying a toolchain is not a must.
Thus, this patch drops the superfluous 'external' toolchain file
and updates cmake-based targets to invoke cmake in a simpler form.

Related changes in this commit:
- While updating the cmake invocations, all the command line
  arguments have been reviewed and simplified (removed those, which
  did not change the defaults).
- Removed unnecessary forced C compiler settings from some
  toolchain files (and/or changed them to setting the "compiler
  works" flag to true, thus keeping cmake's compiler identification
  logic but disabling some of its overzealous compiler sanity
  checks).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
Akos Kiss
2017-11-16 16:19:00 +01:00
committed by GitHub
parent da24727824
commit 36479ddc1a
9 changed files with 40 additions and 81 deletions
+6 -8
View File
@@ -44,16 +44,14 @@ jerry:
mkdir -p $(BUILD_DIR)
mkdir -p $(COPYTARGET)
cmake -B$(BUILD_DIR) -H./ \
-DCMAKE_SYSTEM_NAME=MCU \
-DCMAKE_SYSTEM_PROCESSOR=xtensia-lx106 \
-DCMAKE_C_COMPILER=xtensa-lx106-elf-gcc \
-DCMAKE_C_COMPILER_WORKS=TRUE \
-DENABLE_LTO=OFF \
-DFEATURE_VALGRIND=OFF \
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain_external.cmake \
-DEXTERNAL_CMAKE_SYSTEM_PROCESSOR=xtensia-lx106 \
-DEXTERNAL_CMAKE_C_COMPILER=xtensa-lx106-elf-gcc \
-DEXTERNAL_CMAKE_C_COMPILER_ID=GNU \
-DJERRY_LIBC=OFF \
-DJERRY_LIBM=ON \
-DJERRY_CMDLINE=OFF \
-DENABLE_ALL_IN_ONE=ON \
-DJERRY_LIBC=OFF \
-DJERRY_CMDLINE=OFF \
-DEXTERNAL_COMPILE_FLAGS="$(ESP_CFLAGS)" \
-DMEM_HEAP_SIZE_KB=$(JERRYHEAP)