http://d.puremagic.com/issues/show_bug.cgi?id=6952
Summary: Static Linking on Linux Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: dsim...@yahoo.com --- Comment #0 from David Simcha <dsim...@yahoo.com> 2011-11-15 09:08:02 PST --- It seems that the stuff that DMD outputs to GCC on Linux is misconfigured for static linking. I've observed this on several machines with various Linux distros, all of which can statically link a C hello world program successfully with the machine's GCC install. hello.d: import std.stdio; void main() { write("Hello, world\n"); } $ dmd -L-static hello.d /usr/bin/ld: cannot find -lgcc_s collect2: ld returned 1 exit status --- errorlevel 1 Yet somehow when I compile/link a C hello world on the same machine it Just Works: hello.c: #include <stdio.h> int main() { printf("Hello, world.\n"); return 0; } $ gcc -o hello -static hello.c $ ./hello Hello, world. $ file hello hello: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.15, not stripped -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------