←back to thread

213 points cnst | 2 comments | | HN request time: 0.424s | source
Show context
wslh ◴[] No.42151625[source]
I always ask about battery consumption... Apple seems to be on another galaxy right now. I decided to stop waiting and installed Parallels to run Ubuntu there... I really wish the best for Asahi Linux.
replies(6): >>42151659 #>>42151727 #>>42151870 #>>42151994 #>>42153449 #>>42155551 #
winocm ◴[] No.42151659[source]
The M3 Max laptops can cross-build FreeBSD at a fraction of the time of the ThinkPad, being at around 791 seconds for `make -j17` versus the T14s being at 3210 seconds (with `make -j12`) according to the post above.

No idea about power consumptions.

It still scares me.

replies(2): >>42151726 #>>42151797 #
redundantly ◴[] No.42151726[source]
Do you have more details or a source on this? I'd like to learn more about the build process and timings.
replies(1): >>42151761 #
1. winocm ◴[] No.42151761[source]
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.

replies(1): >>42152052 #
2. winocm ◴[] No.42152052[source]
Word 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.