www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - no panic: redundant ld parameters on Linux

This does not need to be addressed right now, it is for information, 
mainly to Walter, I guess.

On Linux (tested on DMD .139 and Fedora Core 4), the parameters to ld 
linker contain some lines that seem (to me, at least) redundant.

If this is a surprise, then you might want to look at it, otherwise just 
forget it.


Upon compiling the following program (called libtest1.d):

import std.c.stdio;
void main()

The linker receives the following arguments (split at space, for 

## -L/usr/lib/gcc/i386-redhat-linux/4.0.0
## -lgcc
## --as-needed
## -lgcc_s
## --no-as-needed

In the above listing, I have marked with "## " the lines that seemed 
redundant, and which I could remove, without changing the compilation 
Nov 22 2005