------- Comment #12 from vz-gcc at zeitlins dot org 2010-04-03 18:17 ------- Actually I don't think --enable-checking=release changes anything. I've just tried Cesar Strauss's suggestion to not use __attribute__((dllexport)) in the code at all but use --enable-auto-import linker option. And miraculously this solves all the problems:
% ..configure with LDFLAGS=-Wl,--enable-auto-import ... % time make -sj8 wxcore make -sj8 wxcore 18.02s user 34.75s system 34% cpu 2:34.81 total % du -sh lib 26M lib % du -sSh . 24M . % du -h lib/wxmsw291u_core_gcc_custom.dll 8.7M lib/wxmsw291u_core_gcc_custom.dll To summarize: the compilation time is the same as with 4.4 (7s difference is roughly the same as measurement precision anyhow) and the library size is even smaller than with 3.4.5. So it seems that dllexport attribute should simply never be used with 4.5. I was opposed to using --enable-auto-import initially because it exports too much (there are plenty of symbols which shouldn't be exported in the DLL export table now) but its advantages are such that we're clearly going to do it with 4.5. I still wish somebody could explain me why can auto import work so efficiently but dllexport had to be made unusable like this. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601