https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223551
--- Comment #2 from Mark Millard <mar...@dsl-only.net> --- (In reply to sid from comment #0) I'll also mention that there is a port devel/xtoolchain-llvm50 that installs files to help configure for using llvm50 as a cross-compiler. For example: # more /usr/local/share/toolchains/llvm50.mk XCC=/usr/local/bin/clang50 XCXX=/usr/local/bin/clang++50 XCPP=/usr/local/bin/clang-cpp50 XLD=/usr/local/llvm50/bin/ld.lld CROSS_BINUTILS_PREFIX=/var/empty X_COMPILER_TYPE=clang An example for a gcc compiler is: # more /usr/local/share/toolchains/aarch64-gcc.mk XCC=/usr/local/bin/aarch64-unknown-freebsd12.0-gcc XCXX=/usr/local/bin/aarch64-unknown-freebsd12.0-g++ XCPP=/usr/local/bin/aarch64-unknown-freebsd12.0-cpp CROSS_BINUTILS_PREFIX=/usr/local/aarch64-freebsd/bin/ X_COMPILER_TYPE=gcc It would take also assigning CC/CXX/CPP/. . . in order to also use llvm50 materials as the host compiler/toolchain as well during cross-builds. (Note that the limiting condition of a cross-build is a form of native build, where the target happens to match the host type. But technically the CC/CXX/CPP/. . . could be assigned but the XCC/XCXX/XCPP/. . . left unassigned for "self hosted" that avoids the system compiler.) One does have to consider what to do with (showing WITHOUT_ use): WITHOUT_CROSS_COMPILER= WITHOUT_SYSTEM_COMPILER= WITH_SYSTEM_COMPILER= would be directly indicating to use the system compiler when a cross compiler does not seem to need to be built. WITH_CROSS_COMPILE= vs. WITHOUT_CROSS_COMPILER= is less obvious and I analyzed source code to see which way had the properties that I was after in each case. In my earlier example it was using WITHOUT_ for both and I explicitly set lots of things. This makes the case structurally more similar to the case of avoiding the system compiler (and potential cross compiler variant): in part it is just replacing some paths. It is not obvious what your host-native vs. cross-build-target intents are for use of: /usr/local/bin/llvm-as50 /usr/local/bin/llvm-ar50 /usr/local/bin/lld-link50 /usr/local/bin/llvm-nm50 /usr/local/bin/llvm-objdump50 /usr/local/bin/llvm-ranlib50 /usr/local/bin/llvm-strings50 (I've had examples of the host-native vs. cross-build-toolchain using different tools.) You may have to specify more of your intent for such things in order to find out what is needed to configure things. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"