Gentoo Archives: gentoo-user

From: Andrew Lowe <agl@×××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Changing compilers
Date: Mon, 19 Mar 2012 17:25:45
Message-Id: 4F676BB6.1070804@wht.com.au
In Reply to: [gentoo-user] Re: Changing compilers by Nikos Chantziaras
1 On 03/20/12 01:17, Nikos Chantziaras wrote:
2 > On 19/03/12 16:11, Andrew Lowe wrote:
3 >> On 03/19/12 17:39, Nikos Chantziaras wrote:
4 >>> On 19/03/12 07:26, Andrew Lowe wrote:
5 >>>> Hi all,
6 >>>> Has anyone played around with the various "better known" compilers on
7 >> [snip]
8 >> ...
9 >> ...
10 >> [snip]
11 >>>
12 >>> You don't need to "change" compilers. You can use whatever one you like
13 >>> to build your program. The compiler portage uses to build its packages
14 >>> does not affect your own usage of the others.
15 >>>
16 >>> As for the fastest one, I can only speak for Intel CPUs where Intel C++
17 >>> gives me the fastest binaries.
18 >>>
19 >>>
20 >>>
21 >> Nikos,
22 >> Your experience with Intel is what I'm after. Aster, the FEA code I'm
23 >> going to use is not in Portage hence I will be using it's own build
24 >> system. When you've used Intel, have you just exported "CC="icc" or
25 >> something similar, as make.conf won't be used? Also, I've read somewhere
26 >> that there are libraries that you have to link against that are specific
27 >> to the Intel compiler as it does not create libraries that are
28 >> comparable with the gcc produced ones - is this true or does the
29 >> compiler now "play well" with the gcc world?
30 >
31 > No special libs required. The binaries I get (both C and C++) don't use
32 > anything extra. I checked both with "ldd" as well as with lsof at
33 > runtime (in case it dlopens anything).
34 >
35 > For building, you use "CC=icc" and "CXX=icpc" for regular makefiles or
36 > autoconf scripts. I mostly use qmake though (I use Qt for my GUIs). In
37 > that case, you call qmake like this:
38 >
39 > qmake -spec linux-icc
40 >
41 > and it creates a makefile that will use ICC. This is also an example of
42 > ICC using C and C++ libs (Qt is C++) that were built by GCC without
43 > issues; its ABI is fully GCC compatible.
44 >
45 > There are way to use ICC for portage too. I tried that once. It worked
46 > quite well. But I didn't went with it since too much of a bother.
47 >
48 > Note that the link Florian posted is a bit outdated. For example the
49 > sections that tells you that "binaries compiled with icc won't work
50 > after icc is uninstalled" is not true. They will work just fine. The
51 > exception of course if when you specifically use an ICC library, like
52 > the Intel math kernel library.
53 >
54 >
55 >
56 Thanks for that. The library question was the reason I didn't proceed
57 with playing around with icc ages ago. Your experience tells me it's now
58 rectified.
59
60 Andrew

Replies

Subject Author
[gentoo-user] Re: Changing compilers Nikos Chantziaras <realnc@×××××.com>