zephyr/cmake/toolchain
Daniel Leung 7aca9af7ed cmake: need to specify m32/m64 for x86_64 toolchain
Since x86_64-zephyr-elf is a multi-lib toolchain, m32/m64
need to be specified for the compiler to return the correct
library path when queried (e.g. --print-libgcc-file-name).
This affects the compile check done by CMake. Without these
flags, the compiler returns incorrect toolchain path (e.g.
requiring 64-bit libraries but returning 32-bit library path).
This also affects compiler flag checks for "-lstdc++". Incorrect
library path results in error when checking for "-lstdc++", and
this flag will not be used for the build. This results in
undefined references when compiling C++ code.

This creates target_x86.cmake to add the necessary flags for
CMake to use. The target_x86_64.cmake is also created to
mirror the same change.

Also removing the -m32 flags for host-gcc since we are not
building x86 targets with the host-gcc compiler.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-10-29 06:19:33 +01:00
..
cross-compile cmake: Toolchain abstraction: Abstraction of binary tools, foundation. 2019-07-31 11:09:35 +02:00
espressif cmake: Toolchain abstraction: Abstraction of binary tools, foundation. 2019-07-31 11:09:35 +02:00
gnuarmemb cmake: Toolchain abstraction: Abstraction of binary tools, foundation. 2019-07-31 11:09:35 +02:00
host cmake: Toolchain abstraction: Abstraction of binary tools, foundation. 2019-07-31 11:09:35 +02:00
llvm cmake: Toolchain abstraction: Abstraction of binary tools, foundation. 2019-07-31 11:09:35 +02:00
xcc cmake: Toolchain abstraction: Abstraction of binary tools, foundation. 2019-07-31 11:09:35 +02:00
xtools cmake: need to specify m32/m64 for x86_64 toolchain 2019-10-29 06:19:33 +01:00
zephyr cmake: need to specify m32/m64 for x86_64 toolchain 2019-10-29 06:19:33 +01:00