!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

574 Members
123 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
30 Nov 2025
@bake.monorail:matrix.orgbake.monorail I just managed to get ld64 from cctools-port to build. What's wrong with that? 22:23:03
@bake.monorail:matrix.orgbake.monorail libtapi doesn't look like great code either, but I'd avoid frontloading rewriting code in order to be able to cross-compile for macOS. 22:26:56
1 Dec 2025
@matthewcroughan:defenestrate.itmatthewcroughan changed their profile picture.14:57:37
@reckenrode:matrix.orgRandy Eckenrode

LTO doesn’t work, and it uses sigtool for signing. sigtool doesn’t set the linker-signed flag, which causes tools like strip to break binaries because their aren’t updated. That flag makes them update automatically.

It also historically lagged behind Apple’s releases, but I think they got better about that.

15:56:23
@reckenrode:matrix.orgRandy EckenrodeDarwin used to use cctools-port, but it moved away from it due to the LTO and update issue. The code-signing problem was discovered later.15:57:18
@reckenrode:matrix.orgRandy EckenrodeDarwin also mostly doesn’t use cctools anymore. For 26.06, I plan to drop it completely from the Darwin bintools. It will just be LLVM bintools.15:58:10
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/reckenrode/ld64 is the fork of ld64 that nixpkgs uses. https://github.com/reckenrode/ld64/tree/ld64-954.16-nixpkgs is the source of the patches.15:58:56
@reckenrode:matrix.orgRandy EckenrodeNote that libtapi is still packaged even though ld64 vendors a reduced version.16:00:13
@reckenrode:matrix.orgRandy EckenrodeMy recommendation though would be to use LLVM’s bintools and LLD.16:00:33
@bake.monorail:matrix.orgbake.monorail

LTO doesn’t work, and it uses sigtool for signing. sigtool doesn’t set the linker-signed flag, which causes tools like strip to break binaries because their aren’t updated. That flag makes them update automatically.

I see, these don't seem to be dealbreaker to start getting some stuff to cross-compile though. If you intend to have a drop-in replacement, it can be adopted.

For 26.06, I plan to drop it completely from the Darwin bintools. It will just be LLVM bintools.

Does this mean adopting lld as a linker? That would be the best option for cross-compiling as well, but it's unclear to me if there's something that requires ld64 🤔.

16:01:16
@bake.monorail:matrix.orgbake.monorail *

LTO doesn’t work, and it uses sigtool for signing. sigtool doesn’t set the linker-signed flag, which causes tools like strip to break binaries because their aren’t updated. That flag makes them update automatically.

I see, these don't seem to be dealbreaker to start getting some stuff to cross-compile though. If you intend to have a drop-in replacement, it can be adopted later on.

For 26.06, I plan to drop it completely from the Darwin bintools. It will just be LLVM bintools.

Does this mean adopting lld as a linker? That would be the best option for cross-compiling as well, but it's unclear to me if there's something that requires ld64 🤔.

16:02:29
@reckenrode:matrix.orgRandy Eckenrode Anything that uses strip or install_name_tool will break the signature. 16:03:36
@reckenrode:matrix.orgRandy EckenrodeThere used to be wrappers to work around cctools’s limitations, but those were removed.16:04:24
@reckenrode:matrix.orgRandy Eckenrode * 16:04:46
@reckenrode:matrix.orgRandy EckenrodeThe issue with LLD is that it doesn’t support some flags required for compatibility with Xcode projects. It also was missing some features, but I haven’t checked on it in a while.16:07:34

Show newer messages


Back to Room ListRoom Version: 6