vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

[vcpkg scripts] toolchain/linux: Change CMAKE_SYSTEM_PROCESSOR from x86 to i686

Open WangWeiLin-MV opened this issue 4 months ago • 0 comments

Fix #41347, the output of uname -m on IA-32 Linux is i686 instead of x86, which verified with uname (GNU coreutils) 8.25 on Ubuntu.

  • Change CMAKE_SYSTEM_PROCESSOR to i686
  • Replace gcc option -m32 with setting compiler with triplet prefix
    • And let vcpkg_configure_make checks VCPKG_DETECTED_CMAKE_CROSSCOMPILING to skip native gcc with triplet prefix
  • Set CMAKE_<LANG>_COMPILER of C, CXX, ASM, ASM-ATT for x86 and x64 too

Test

Select port [sqlite3[zlib] with dependency zlib as example, installation tests pass on host x64-linux with the following triplets:

  • arm-linux
  • arm64-linux
  • x64-linux
  • x86-linux
  • riscv64-linux (Manually specify compiler)

Compiler in log checked with wildcard cat buildtrees/sqlite3/install-*-linux-dbg-out.log | grep '^\[1/3\]'

WangWeiLin-MV avatar Oct 12 '24 07:10 WangWeiLin-MV