3 ms·
Sure. I basically did the following on trunk: $ CPP=/usr/bin/clang MAKEOBJDIRPREFIX=/private/var/tmp/obj ./tools/build/make.py TARGET=arm64 TARGET_ARCH=aar
by winocm 2y ago
Sure.
I basically did the following on trunk:
$ CPP=/usr/bin/clang MAKEOBJDIRPREFIX=/private/var/tmp/obj ./tools/build/make.py TARGET=arm64 TARGET_ARCH=aarch64 --host-compiler-type clang --debug -j17 --clean buildworld
You probably can follow build(5) from FreeBSD hosts instead.
NetBSD is similar, but you need to edit `tools/llvm/Makefile` and make sure that you use the following target for `support-modules` instead:
support-modules: module-test.cpp Makefile
- if ${HOST_CXX} -stdlib=libc++ -c -fmodules -fcxx-modules -fmodules-cache-path=./module.cache \
- ${.CURDIR}/module-test.cpp 3> /dev/null 2>&1; then \
- echo HOST_SUPPORTS_MODULES=yes > ${.TARGET}; \
- else \
- echo HOST_SUPPORTS_MODULES=no > ${.TARGET}; \
- fi
+ # Just don't use modules pre for C++20 targets. Some compilers cannot support them.
+ echo HOST_SUPPORTS_MODULES=no > ${.TARGET};
You can further speed up NetBSD builds by editing `share/mk/bsd.sys.mk` and removing the workaround for SunPro's cc. The repeated invocation of /bin/mv for each object file really does add up.
I have not tried cross builds of OpenBSD from other operating systems.
- winocm 2y agoWord of warning, I ended up getting a lot of strange compiler segfaults within xgcc when using when using `MKGCC=yes` instead `MKLLVM=yes` with NetBSD, specifically with floating point heavy code. I never did end up finding out why that happens.