|
From: | Paolo Bonzini |
Subject: | Re: [PATCH v6 01/19] configure, meson: override C compiler for cmake |
Date: | Sun, 20 Feb 2022 14:27:12 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
On 2/20/22 09:27, Paolo Bonzini wrote:
On 2/18/22 15:49, Jag Raman wrote:Concerning the generated files, I see the following in CMakeMesonToolchainFile.cmake: Without patch: set(CMAKE_C_COMPILER "/opt/rh/devtoolset-9/root/usr/bin/cc" "-m64" "-mcx16”)With patch: set(CMAKE_C_COMPILER "cc" "-m64" "-mcx16")I don't understand why it works at all with the latter, but the right solutioncould be set(CMAKE_C_COMPILER "/opt/rh/devtoolset-9/root/usr/bin/cc") set(CMAKE_C_COMPILER_ARG1 "-m64") set(CMAKE_C_COMPILER_ARG2 "-mcx16")
Anyhow it seems to be a cmake bug, because what QEMU/Meson are doing is exactly what is in the manual at https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER.html#variable:CMAKE_%3CLANG%3E_COMPILER:
Note: Options that are required to make the compiler work correctly can be included as items in a list; they can not be changed. #set within user supplied toolchain file set(CMAKE_C_COMPILER /full/path/to/qcc --arg1 --arg2) Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |