[PATCH] D125783: [llvm-debuginfo-analyzer] 08 - ELF Reader

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 31 07:15:23 PDT 2022


mgorny added a comment.

> As you are building on i386, can I have the CMake configuration?

Just to be clear, I'm building 32-bit multilib on amd64. The full config we're using is:

  cmake -C /var/tmp/portage/sys-devel/llvm-16.0.0_pre20221029/work/llvm_build-abi_x86_32.x86/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DLLVM_APPEND_VC_REV=OFF -DCMAKE_INSTALL_PREFIX=/usr/lib/llvm/16 -DLLVM_LIBDIR_SUFFIX= -DBUILD_SHARED_LIBS=OFF -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_DISTRIBUTION_COMPONENTS=LLVM;LTO;Remarks;llvm-config;cmake-exports;llvm-headers;LLVMDemangle;LLVMSupport;LLVMTableGen; -DLLVM_TARGETS_TO_BUILD= -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV;X86;ARM;MSP430;SystemZ;Mips;AMDGPU;PowerPC;Sparc;M68k;CSKY;BPF;Hexagon;XCore;AVR;VE;WebAssembly;NVPTX;DirectX;Lanai;ARC;LoongArch;RISCV;AArch64 -DLLVM_BUILD_TESTS=yes -DLLVM_ENABLE_FFI=yes -DLLVM_ENABLE_LIBEDIT=yes -DLLVM_ENABLE_TERMINFO=yes -DLLVM_ENABLE_LIBXML2=yes -DLLVM_ENABLE_ASSERTIONS=no -DLLVM_ENABLE_LIBPFM=yes -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_Z3_SOLVER=yes -DLLVM_ENABLE_ZSTD=yes -DLLVM_HOST_TRIPLE=i686-pc-linux-gnu -DFFI_INCLUDE_DIR=/usr/lib/libffi/include  -DFFI_LIBRARY_DIR= -DLLVM_HAVE_LIBXAR=0 -DPython3_EXECUTABLE=/usr/bin/python3.11 -DOCAMLFIND=NO -DLLVM_VERSION_SUFFIX=gitc4a8f9ab -DLLVM_LIT_ARGS=-vv;-j;12 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/sys-devel/llvm-16.0.0_pre20221029/work/llvm_build-abi_x86_32.x86/gentoo_toolchain.cmake /var/tmp/portage/sys-devel/llvm-16.0.0_pre20221029/work/llvm

`gentoo_common_config` is:

  set(CMAKE_GENTOO_BUILD ON CACHE BOOL "Indicate Gentoo package build")
  set(LIB_SUFFIX  CACHE STRING "library path suffix" FORCE)
  set(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries")
  set(CMAKE_INSTALL_INFODIR "/usr/share/info" CACHE PATH "")
  set(CMAKE_INSTALL_MANDIR "/usr/share/man" CACHE PATH "")
  set(CMAKE_USER_MAKE_RULES_OVERRIDE "/var/tmp/portage/sys-devel/llvm-16.0.0_pre20221023/work/llvm_build-abi_x86_32.x86/gentoo_rules.cmake" CACHE FILEPATH "Gentoo override rules")
  set(CMAKE_INSTALL_DOCDIR "/usr/share/doc/llvm-16.0.0_pre20221023" CACHE PATH "")
  set(BUILD_SHARED_LIBS ON CACHE BOOL "")
  set(CMAKE_INSTALL_ALWAYS 1)
  set(CMAKE_ASM_FLAGS_RELWITHDEBINFO "" CACHE STRING "")
  set(CMAKE_ASM-ATT_FLAGS_RELWITHDEBINFO "" CACHE STRING "")
  set(CMAKE_C_FLAGS_RELWITHDEBINFO "" CACHE STRING "")
  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "" CACHE STRING "")
  set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "" CACHE STRING "")
  set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "" CACHE STRING "")
  set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "" CACHE STRING "")
  set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "" CACHE STRING "")
  set(CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO "" CACHE STRING "")

`gentoo_toolchain.cmake` is:

  set(CMAKE_ASM_COMPILER "x86_64-pc-linux-gnu-gcc;-m32 -mfpmath=sse")
  set(CMAKE_ASM-ATT_COMPILER "x86_64-pc-linux-gnu-gcc;-m32 -mfpmath=sse")
  set(CMAKE_C_COMPILER "x86_64-pc-linux-gnu-gcc;-m32 -mfpmath=sse")
  set(CMAKE_CXX_COMPILER "x86_64-pc-linux-gnu-g++;-m32 -mfpmath=sse")
  set(CMAKE_Fortran_COMPILER "x86_64-pc-linux-gnu-gfortran;-m32 -mfpmath=sse")
  set(CMAKE_AR /usr/bin/x86_64-pc-linux-gnu-ar CACHE FILEPATH "Archive manager" FORCE)
  set(CMAKE_RANLIB /usr/bin/x86_64-pc-linux-gnu-ranlib CACHE FILEPATH "Archive index generator" FORCE)
  set(CMAKE_SYSTEM_PROCESSOR "i686")

But I can also reproduce in my working copy that's configured as:

  CC=i686-pc-linux-gnu-gcc CXX=i686-pc-linux-gnu-g++ cmake ../llvm -G Ninja -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=MinSizeRel -DLLVM_TARGETS_TO_BUILD=X86 -DCLANG_ENABLE_ARCMT=OFF -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_CCACHE_BUILD=ON -DLLVM_ENABLE_PROJECTS='llvm' -DLLVM_BUILD_TESTS=OFF -DLLVM_HOST_TRIPLE=i686-pc-linux-gnu

where `i686-pc-linux-gnu-*` wrappers simply call the respective GCC executables with `-m32`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125783/new/

https://reviews.llvm.org/D125783



More information about the llvm-commits mailing list