On Wed, Apr 12, 2006 at 10:31:58AM +0200, Abdelrazak Younes wrote:
> Enrico Forestieri a écrit :
> >On Tue, Apr 11, 2006 at 08:08:32PM +0200, Abdelrazak Younes wrote:
> >>Now that -Wl is passed to g++ (shouldn't it be -Wall by the way?) I have 
> >>an awful lot of warnings. As I don't want Marchall Lastgouttes to catch 
> >>me on that, here is my first report :-), Most of them are:
> >>
> >>d:/mingw/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/bits/stl_uninitialized
> >>.h:82: warning: '__cur' might be used uninitialized in this function
> >>
> >>idea?
> >
> >That's -Wl,--export-all-symbols and simply passes --export-all-symbols
> >to the linker. It does no good and simply will increase your linking
> >time. I suggest that you get rid of it.
> 
> I don't understand. A typical compil command in src/ would be:
> 
> $ g++ -DHAVE_CONFIG_H -I. -I. -I.   -I../boost -Wall -Wextra 
> -I/cygdrive/d/program/Aspell-0.60.4/include   -O3 -c -o MenuBackend.o 
> MenuBackend.C
> 
> These warnings disappear only if I remove "-Wall" _and_ "-Wextra".
> 
> If you are sure of what you say about "-Wl,--export-all-symbols", we 
> should get rid of these option. Could you give a patch? Sorry, I am not 
> proficient at all with autotools.

I was not talking about the warnings, sorry for the confusion.
What I said only applies to the final link step. I observed that
with -Wl,--export-all-symbols, the linking time noticeably increases.
Removing that option shortens the linking time for me without any
side effect.

This is a sed command you can use to modify configure in order to
avoid "-Wl,--export-all-symbols" in LDFLAGS:

sed ' 
# Omit -Wl,--export-all-symbols in LDFLAGS
/LDFLAGS=\"\$LDFLAGS 
\$WIN32_LD_EXPORT_ALL_SYMBOLS\"/s/LDFLAGS/true\t\#LDFLAGS/' \
        ./configure > ./configure-new


-- 
Enrico

Reply via email to