docs icon indicating copy to clipboard operation
docs copied to clipboard

Improve documentation regarding cross-build

Open SpaceIm opened this issue 2 years ago • 0 comments

Current documentation regarding cross-build could be improved:

  • how to use current cross-compilers recipes packaged in conancenter: android-ndk & emsdk for example.
  • how to write a recipe for a cross-compiler so that it can be used in a host profile and be robust to all build systems.
  • how to write a custom host profile for a system installed cross-compiler without depending on a cross-compiler recipe, but something more complex that raspberry example which is too simple with its 3 env vars:
    • Explain which common builldenv vars may have to be defined (CC, CXX, AR, AS, LD, RANLIB, NM, STRIP, OBJCOPY, OBJDUMP, READELF, ADDR2LINE, ELFEDIT, CHOST, SYSROOT etc) and conf (tools.build:compiler_executables, tools.cmake.cmaketoolchain:user_toolchain, tools.build:sysroot).
    • Avoid mixing compiler path/name with flags in CC and CXX, prefer to define these flags in tools.build:cflags/tools.build:cxxflags, because conan may not be robust to spaces in CC/CXX/tools.build:compiler_executables

SpaceIm avatar Aug 29 '23 11:08 SpaceIm