[Gluster-devel] [PATCH 10/15] build: remove -nostartfiles flag

Jan Engelhardt jengelh at inai.de
Tue Oct 2 21:07:48 UTC 2012


On Tuesday 2012-10-02 21:15, Anand Avati wrote:
>On Tue, Sep 25, 2012 at 9:41 AM, Jan Engelhardt <jengelh at inai.de> wrote:
>      The "-nostartfiles" is a discouraged option and is documented to
>      potentially result in undesired behavior.
>
>
>Can you provide some reference why it is discouraged? In "man gcc" I see the
>-nostartfiles option without any such discouragement (gcc version 4.4.6
>20120305). Also "man dlopen" uses -nostartfiles in the example command line.

Ok so it was not the gcc manpage that spoke about the "discouraged" 
status, but it was dlopen.3 as of man-pages-3.41:

"""In case you need to avoid linking against the system startup files, 
this can be done by using the gcc(1) -nostartfiles command-line option. 
Using these routines, or the gcc -nostartfiles or -nostdlib options, is 
not recommended. Their use may result in undesired behavior, since the 
constructor/destructor routines will not be executed (unless special 
measures are taken)."""

But gluster has not provided any reason to me to avoid linking against 
crt (the C standard library runtime), nor does the project have a reason 
to avoid linking against crt either.




More information about the Gluster-devel mailing list