!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

565 Members
118 Servers

Load older messages


SenderMessageTime
26 Feb 2026
@rosssmyth:matrix.orgrosssmyth* Which I never use (on Windows) cause mingw mostly sucks 20:12:18
@rosssmyth:matrix.orgrosssmythI will give it a look though20:12:38
@dramforever:matrix.orgdramforever
[nix-shell:~]$ x86_64-w64-mingw32-gcc -l:libpthread.a -o test x.c

[nix-shell:~]$ file test.exe 
test.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows, 10 sections
20:13:14
@dramforever:matrix.orgdramforeverit sure looks like it should work20:13:23
@dramforever:matrix.orgdramforeverwithout additional arguments to the linker20:13:31
@rosssmyth:matrix.orgrosssmythDo we use gcc as the linker driver with rustc, or ld directly? 20:14:08
@emilazy:matrix.orgemilytbf I assume the MSVC target doesn't use a pthreads emulation library.20:14:35
@emilazy:matrix.orgemilyI hope?20:14:36
@dramforever:matrix.orgdramforeverboth work20:14:40
@dramforever:matrix.orgdramforever* both ld and gcc work20:14:49
@dramforever:matrix.orgdramforeveri think we should be using gcc20:14:52
@rosssmyth:matrix.orgrosssmythYes20:15:03
@dramforever:matrix.orgdramforeverso like obviously my worry is not that it's not sending pthreads into rustc20:15:32
@dramforever:matrix.orgdramforeverbut that we've managed to have it use the wrong linker20:15:44
@emilazy:matrix.orgemilystop doing MinGW / Windows was not supposed to be given GCC / etc.20:15:54
@rosssmyth:matrix.orgrosssmythrustc just tells the linker to use it 20:15:54
@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

There are no newer messages yet.


Back to Room ListRoom Version: 6