lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Compiling takes longer with gcc-4.9.2


From: Greg Chicares
Subject: Re: [lmi] Compiling takes longer with gcc-4.9.2
Date: Mon, 18 Jan 2016 05:04:23 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

On 2015-12-30 01:10, Vadim Zeitlin wrote:
> On Tue, 22 Dec 2015 00:28:44 +0000 Greg Chicares <address@hidden> wrote:
> 
> GC> My local tree contains makefile changes to use MinGW-w64 gcc-4.9.2,
> GC> with '-std=c++11', some new warning flags, and various other
> GC> adjustments.
> 
>  Mine too and I guess they're pretty similar but, just for completeness,
> I include below[*] the patch I used to build lmi with 4.9.2.

Thanks. I just committed my current attempt; I'm testing it now. [Update:
looks pretty good as of 20160118T0419Z, after fixing a couple of things.]

> I also had to
> put "#if __cplusplus < 201103L" around the copy_if() definition in
> /opt/lmi/third_party/src/cgicc/Cgicc.cpp to make it compile in C++11 mode.

I modified 'Cgicc.cpp' and 'HTMLElements.cpp' there last month. I'm not
sure why I modified one more file than you did; perhaps it had a c++03
problem. I'll have to reexamine those files and update 'cgicc-3.1.4.patch'.

> GC> The bottom line:
> GC>   3:19 = 199s gcc-3.4.5, std=gnu++98
> GC>   7:32 = 452s gcc-4.9.2, std=c++03
> GC>   9:18 = 558s gcc-4.9.2, std=c++11

Here are my latest results, for "old" and "new" hardware that I've
already described so often that I introduce more typos for you to
correct every time I repeat the descriptions:

OLD:

make --jobs=8 -f install_wx.make > ../log 2>&1
2548.70s user 1252.41s system 457% cpu 13:51.53 total

make --jobs=8 -f install_wxpdfdoc.make > ../log 2>&1
434.27s user 154.28s system 348% cpu 2:49.09 total

make --jobs=4 install check_physical_closure > ../log 2>&1
1314.41s user 574.67s system 344% cpu 9:08.89 total

make $coefficiency system_test > ../log 2>&1
88.47s user 131.07s system 104% cpu 3:29.58 total

NEW:

make --jobs=8 -f install_wx.make > ../log 2>&1
1843.32s user 1449.36s system 389% cpu 14:05.52 total

make --jobs=8 -f install_wxpdfdoc.make > ../log 2>&1
297.77s user 335.18s system 264% cpu 3:59.64 total

make --jobs=4 install check_physical_closure > ../log 2>&1
860.32s user 798.90s system 347% cpu 7:57.31 total

make $coefficiency system_test > ../log 2>&1
89.83s user 266.02s system 200% cpu 2:57.39 total

Strangely, OLD beats NEW for building wx and wxPdfDoc, with --jobs=8.
Less strangely, NEW beats OLD for lmi makefile targets with --jobs=4;
but it's still a bit strange that the difference is so small.

But what I really want to compare is cross compiling on x86_64-linux,
where the dual E5-2630 v3 machine should shine--nothing to lose but
the chains of 32-bit msw-xp.

>  For the reference, the command used for building with Cygwin 4.9.2 was
> 
> make PATH=/opt/lmi/bin:/usr/i686-w64-mingw32/sys-root/mingw/bin:$PATH \
> PATH_GCC=i686-w64-mingw32- LDFLAGS='' \
> gcc_common_warnings='-Wall -Wno-unused-local-typedefs -Wno-parentheses 
> -Wno-unused-variable' \
> install check_physical_closure

I dislike changing $PATH, but I believe I accomplished the same thing by
specifying the full path to each binary in the toolchain, and copying
the sys-root files to /opt/lmi/local/bin, which is on my $PATH.

"LDFLAGS=''": I made "-Wl,--disable-auto-import" conditional on gcc-3.4.5,
which I believe does what you intended.

I added these warning flags:
  -Wno-conversion \
  -Wno-deprecated-declarations \
  -Wno-parentheses \
  -Wno-unused-local-typedefs \
  -Wno-unused-variable \
I found '-Wno-deprecated-declarations' necessary for auto_ptr in xmlwrapp.
I'm not sure why you didn't need '-Wno-conversion' as explained here:
  http://lists.nongnu.org/archive/html/lmi/2015-12/msg00028.html

It doesn't look like I'm missing any of the changes you made above.

> with the appropriate "optimization_flag=-ON" and "cxx_standard=-std=c++NN"
> options appended to it.

I'm using '-std=c++11' everywhere. I didn't touch "optimization_flag".

> Notice that I had to reset LDFLAGS to avoid using
> -Wl,--disable-auto-import option as the build failed with tons of linker
> errors without this.

Okay, that's what I guessed above. BTW, do you happen to know why
MinGW-w64 seems to need this? IIRC, years ago libstdc++ didn't have
the necessary decorations, but I should think they'd have had enough
time to fix that by now.

>  For the native compiler I used a very similar command

I haven't tried that yet. One thing at a time; I just happen to have
started with the cygwin cross compiler.

> [*] The patch:
> 
> ---------------------------------- >8 --------------------------------------
> diff --git a/install_wx.make b/install_wx.make
> index 5b4cd0b..d359dc0 100644
> --- a/install_wx.make
> +++ b/install_wx.make
> @@ -97,7 +97,7 @@ ggc_flags := --param ggc-min-expand=25 --param 
> ggc-min-heapsize=32768
>  config_options = \
>    --prefix=$(prefix) \
>    --build=i686-pc-cygwin \
> -  --host=i686-pc-mingw32 \
> +  --host=i686-w64-mingw32 \

I had missed that. Got it now.

>    --disable-apple_ieee \
>    --disable-compat24 \
>    --disable-fswatcher \
> @@ -118,6 +118,8 @@ config_options = \
>    --without-libjpeg \
>    --without-libtiff \
>    --without-subdirs \
> +
> +unused := FIXME-VZ \
>         AR='$(mingw_bin_dir)/ar' \
>         AS='$(mingw_bin_dir)/as' \
>         CC='$(mingw_bin_dir)/gcc $(ggc_flags)' \

I'm disinclined to remove those. They're correct AFAICS, they're harmless,
and they might be wanted someday.

> diff --git a/install_wxpdfdoc.make b/install_wxpdfdoc.make
> index 95f459a..c106814 100644
> --- a/install_wxpdfdoc.make
> +++ b/install_wxpdfdoc.make
> @@ -56,9 +56,11 @@ compiler      := gcc-$(shell $(mingw_bin_dir)/gcc 
> -dumpversion)
>  config_options = \
>    --prefix=$(prefix) \
>    --build=i686-pc-cygwin \
> -  --host=i686-pc-mingw32 \
> +  --host=i686-w64-mingw32 \

I had missed that. Got it now.

>    --disable-dependency-tracking \
>    --with-wx-config=$(prefix)/bin/wx-config-portable \
> +
> +unused := FIXME-VZ \
>         AR='$(mingw_bin_dir)/ar' \
>         AS='$(mingw_bin_dir)/as' \
>         CC='$(mingw_bin_dir)/gcc' \
> diff --git a/workhorse.make b/workhorse.make

As above, I'm disinclined to remove this.

> index aa4d62d..fe15ec8 100644
> --- a/workhorse.make
> +++ b/workhorse.make
> @@ -141,12 +141,14 @@ gnu_cxx_version := $(shell $(GNU_CXX) -dumpversion)
>  
>  ifeq      (3.4.4,$(gnu_cpp_version))
>  else ifeq (3.4.5,$(gnu_cpp_version))
> +else ifeq (4.9.2,$(gnu_cpp_version))
>  else
>    $(error Untested $(GNU_CPP) version '$(gnu_cpp_version)')
>  endif
>  
>  ifeq      (3.4.4,$(gnu_cxx_version))
>  else ifeq (3.4.5,$(gnu_cxx_version))
> +else ifeq (4.9.2,$(gnu_cxx_version))
>  else
>    $(error Untested $(GNU_CXX) version '$(gnu_cxx_version)')
>  endif

I got those. I anticipate adding 4.9.1 for native MinGW-w64,
because that's the version debian provides IIRC.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]