7aca9af7ed
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> |
||
---|---|---|
.. | ||
generic.cmake | ||
target.cmake |