!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

565 Members
118 Servers

Load older messages


SenderMessageTime
26 Feb 2026
@emilazy:matrix.orgemilywanted to run the GNU toolchain on a Microsoft platform anyway for a laugh? we had a tool for that: it was called DJGPP20:16:19
@rosssmyth:matrix.orgrosssmythRustc itself doesn't need to know where it is 20:16:21
@dramforever:matrix.orgdramforeveri didn't have to tell where the linker should be looking20:16:43
@rosssmyth:matrix.orgrosssmythok20:16:48
@rosssmyth:matrix.orgrosssmythThat is nice20:16:52
@emilazy:matrix.orgemily my guess is that it's using unprefixed gcc or something 20:16:58
@emilazy:matrix.orgemilyRust loves to do that kind of thing20:17:01
@emilazy:matrix.orgemily like when they shipped x86 Linux .o files in the official rustup WASM toolchain distribution 20:17:13
@dramforever:matrix.orgdramforeverbut how could unprefixed gcc be linking real windows programs20:17:19
@emilazy:matrix.orgemily because the compiler-builtins build would just shrug and use any old GCC if it couldn't find a Clang to pass --target to 20:17:29
@emilazy:matrix.orgemilyC compilers is the same20:17:36
@emilazy:matrix.orgemilyyeah I don't know. creatively20:17:49
@emilazy:matrix.orgemilyoh20:17:53
@emilazy:matrix.orgemilythere's the thing where we fail to wrap some compilers right20:17:57
@emilazy:matrix.orgemilylike some prefixed binutils don't get wrappers or something20:18:05
@dramforever:matrix.orgdramforeverthat would be hilarious20:18:14
@emilazy:matrix.orgemilyI remember there's something awful like that and it causes headaches20:18:15
@emilazy:matrix.orgemilyI think Artturin exposed me to that particular horror20:18:24
@rosssmyth:matrix.orgrosssmythYes, rustup ships a full mingw toolchain in the distribution bundle (including libpthread)20:18:25
@emilazy:matrix.orgemily (why does Rust even use libpthread on MinGW if it can use native threads on the MSVC target; is it required to use their shim layer for interoperability or something…) 20:18:55
@rosssmyth:matrix.orgrosssmythIt is required because of mingw20:19:07
@rosssmyth:matrix.orgrosssmythBasically most application have no clue what msvc is 20:19:19
@rosssmyth:matrix.orgrosssmyth* Basically most applications have no clue what msvc is 20:19:31
@emilazy:matrix.orgemilyyeah but most Rust applications are like, written in Rust20:19:32
@emilazy:matrix.orgemilyand even most C libraries that Rust applications link to probably know what an MSVC is20:19:38
@rosssmyth:matrix.orgrosssmythSure, but if you want to interoperate with other mingw libs written in C you must play by their rules20:19:57
@emilazy:matrix.orgemilyI don't like how MinGW can't decide if it wants to be a free toolchain for Windows or half a Cygwin. eh whatever20:20:07
@rosssmyth:matrix.orgrosssmythSame way as using musl and glibs 20:20:13
@emilazy:matrix.orgemilyanyway I think someone should ask rustc what linker command it's actually calling20:20:23
@rosssmyth:matrix.orgrosssmyth* Same way as using musl and glibc20:20:27

Show newer messages


Back to Room ListRoom Version: 6