From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S9gEx-0003h5-2F for garchives@archives.gentoo.org; Mon, 19 Mar 2012 17:19:27 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C8A32E0D6E; Mon, 19 Mar 2012 17:19:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 4FCA6E0D62 for ; Mon, 19 Mar 2012 17:18:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id D7CB61B4033 for ; Mon, 19 Mar 2012 17:18:08 +0000 (UTC) X-Virus-Scanned: by amavisd-new using ClamAV at gentoo.org X-Spam-Flag: NO X-Spam-Score: -1.574 X-Spam-Level: X-Spam-Status: No, score=-1.574 tagged_above=-999 required=5.5 tests=[AWL=-0.564, BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=no Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xtBoDgj2zlWi for ; Mon, 19 Mar 2012 17:18:03 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 11FF91B400D for ; Mon, 19 Mar 2012 17:18:01 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S9gDX-0002Pu-Ag for gentoo-user@gentoo.org; Mon, 19 Mar 2012 18:17:59 +0100 Received: from athedsl-357415.home.otenet.gr ([85.72.251.197]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Mar 2012 18:17:59 +0100 Received: from realnc by athedsl-357415.home.otenet.gr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Mar 2012 18:17:59 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Nikos Chantziaras Subject: [gentoo-user] Re: Changing compilers Date: Mon, 19 Mar 2012 19:17:39 +0200 Organization: Lucas Barks Message-ID: References: <20120319132643.Horde.NzbZHrtUV7tPZsOT40nUZ2A@webmail.wht.com.au> <4F673E98.4070907@wht.com.au> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: athedsl-357415.home.otenet.gr User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120316 Thunderbird/11.0 In-Reply-To: <4F673E98.4070907@wht.com.au> X-Archives-Salt: 1becc5e7-20af-4fa6-a23a-74cfa9672347 X-Archives-Hash: 011eb1a279e3adf99ea58583a35b2a96 On 19/03/12 16:11, Andrew Lowe wrote: > On 03/19/12 17:39, Nikos Chantziaras wrote: >> On 19/03/12 07:26, Andrew Lowe wrote: >>> Hi all, >>> Has anyone played around with the various "better known" compilers on > [snip] > ... > ... > [snip] >> >> You don't need to "change" compilers. You can use whatever one you like >> to build your program. The compiler portage uses to build its packages >> does not affect your own usage of the others. >> >> As for the fastest one, I can only speak for Intel CPUs where Intel C++ >> gives me the fastest binaries. >> >> >> > Nikos, > Your experience with Intel is what I'm after. Aster, the FEA code I'm > going to use is not in Portage hence I will be using it's own build > system. When you've used Intel, have you just exported "CC="icc" or > something similar, as make.conf won't be used? Also, I've read somewhere > that there are libraries that you have to link against that are specific > to the Intel compiler as it does not create libraries that are > comparable with the gcc produced ones - is this true or does the > compiler now "play well" with the gcc world? No special libs required. The binaries I get (both C and C++) don't use anything extra. I checked both with "ldd" as well as with lsof at runtime (in case it dlopens anything). For building, you use "CC=icc" and "CXX=icpc" for regular makefiles or autoconf scripts. I mostly use qmake though (I use Qt for my GUIs). In that case, you call qmake like this: qmake -spec linux-icc and it creates a makefile that will use ICC. This is also an example of ICC using C and C++ libs (Qt is C++) that were built by GCC without issues; its ABI is fully GCC compatible. There are way to use ICC for portage too. I tried that once. It worked quite well. But I didn't went with it since too much of a bother. Note that the link Florian posted is a bit outdated. For example the sections that tells you that "binaries compiled with icc won't work after icc is uninstalled" is not true. They will work just fine. The exception of course if when you specifically use an ICC library, like the Intel math kernel library.