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 solution
could 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


Reply via email to