[Issue 6952] Static Linking on Linux

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 15 09:41:08 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6952


Steven Schveighoffer <schveiguy at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy at yahoo.com
         OS/Version|Windows                     |Linux


--- Comment #1 from Steven Schveighoffer <schveiguy at yahoo.com> 2011-11-15 09:40:22 PST ---
The issue is that -Lxxx passes the parameter like this:

-Xlinker xxx

Which means to gcc "pass this argument to the linker"

Whereas your gcc compile line is passing -static to the compiler.

doing this:

gcc -Xlinker -static -o hello hello.c

should result in the same failure (not tested).

It's not that dmd outputs misconfigured code, it's just that the link line is
not geared towards static linking.  I'm not sure you want to do static linking
anyways.  It's not supported by GCC IIRC.

You can fix this by doing dmd -v, then running the link line, removing the
-Xlinker arg in front of -static.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list