From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5894 invoked from network); 25 Aug 2004 20:07:22 +0000 Received: from smtp.gentoo.org (156.56.111.197) by lists.gentoo.org with AES256-SHA encrypted SMTP; 25 Aug 2004 20:07:22 +0000 Received: from lists.gentoo.org ([156.56.111.196] helo=parrot.gentoo.org) by smtp.gentoo.org with esmtp (Exim 4.34) id 1C043E-0005HN-7y for arch-gentoo-dev@lists.gentoo.org; Wed, 25 Aug 2004 20:07:21 +0000 Received: (qmail 23255 invoked by uid 89); 25 Aug 2004 20:06:46 +0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 28717 invoked from network); 25 Aug 2004 20:06:46 +0000 Message-ID: <412CF14E.7040106@ifm.liu.se> Date: Wed, 25 Aug 2004 22:06:38 +0200 From: Anton Starikov User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040824) X-Accept-Language: en-us, en MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org, gentoo-science@lists.gentoo.org X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-eltn-site-MailScanner-Information: Please contact the administrator, tel. 2826, for more information X-eltn-site-MailScanner: Found to be clean Subject: [gentoo-dev] ifc USE flag, fortran support and some general notes about multi-compiler support X-Archives-Salt: b1e8449e-20a1-4ecb-9cf8-07044fc0ff4d X-Archives-Hash: b493dcac27f45ba4a3007d13ba1ff3fb Hi! Recently there was added "ifc" flag to support Intel Fortran Compiler. And few ebuilds already take it into account. But... 1) Mainly it corresponds to some scientific libraries and programs. And I guess that not 99% of such users use ifc. What about ones who use Absoft, Lahey Fujitsu, Portland Group and so on? I guess IFC didn't take 99% of market yet. Because other companies still alive. :) Moreover, AFAIK a lot of people prefer different compilers because IFC still has some compatibility problems with complicated codes. Which can be compiled without problems with Absoft or Lahey, for example. 2) Optimization flags. I've take a short look at some ebuilds which use IFC and ICC flags. Mostly they have hard-encoded into ebuilds optimization flags. Which also doesn't seems to be really brilliant idea. Of course, some of them check IFCFLAGS and ICCFLAGS environment variables...but it is not common, and it is less portable from pint of view of different compilers. OK, partly you can solve such problems with setting some environment variables, like F77 and so on. But...it not looks like a really gentoo solution, it is not really reliable solution (for example blas-atlas will just ignore it, AFIR) and so on. So, probably there is some need to make some kind of redesign of the idea. OK, for C and C++ it is not so important probably, because there is not such big choice and anyway mostly you would prefer GCC, and if you want, support for icc and tiny-cc here already. Situation with Fortran just looks a bit more complicated. And different from C world. So, has it sense to think about implementing some abstract multi-compiler support? at least for Fortran guys. But generally, probably, it could be just let say "minor compiler support", which means, for C and F you still have gcc and g77 (gfortran in future) as a main compiler of the system, but you can also choose some kind of minor compiler. Now it almost work in such way with ICC. ICC behaves just as some kind of minor compiler and some software that can be compiled with ICC will be compiled with icc. This idea "of minor compiler support" could be also interesting for different applications. For example, hypothetic situation: I have SPARC with Solaris. I'm not going to completely change my OS, but, probably, I would like to take advantages of gentoo portage also. And probably I would like to choose second compiler (SUN compiler of course), which will be used for compilation of some stuff that can be compiled with it. And, if software use automake and autoconf, it probably will be compiled without real troubles. It basically looks very interesting and not such hypothetic, because anyway nowadays you fill your Solaris box (or Irix box) with incredible amount of GNU stuff, if you want to have some comfort :) And, I guess, portage can be really, easy adopted to that. OK, it couldn't be in mainstream. But...if, let say, you have 300 Solaris clients and ppl whant to use a really a LOT of different stuff, either you compile program by program by yourself and put in on a servers into shared /usr folder (or whatevere else), or you just force portage think that you have gentoo and portage do you job for you and just go and drink coffe :) Thats real example. Of course, there is two ways to implement this. One - it's just to add more and more USE flags for different compilers. it is some kind of clean way with granted result, if you ebuild support this compiler which you have in USE flags...but... I guess, at least in case of Fortran. ebuild that can be compiled with ANY Fortran compiler wail NEVER check for all these flags, because for such behavior ebuild should be tested with ALL these compilers, reported that it works and submitted a patch for ebuild for particular compiler. That practically probably never will be happen :) But almost for sure a lot of software will be compiled without any problems with most of major Fortran compiler. And even with almost any widely spread C compilers. Especially if it case of scientific software. I really can't imaging situation, when MPICH will not compile itself and will not compile F90 interface with any non-exotic compiler. I've just never meet such situation. :) One more thing. Lets imaging that next month on market will be available one more C++ or Fortran compiler, which really excellent :) Most of software can be build with it...but... it will take long time to add more flag to USE, change all ebuilds with it and so on. So, there is coming in mind some idea of different approach. Transparent level of multicompiler support. OK, it is not granted. But...scientific guys use to live in not granted world :) It probably looks like: 1) You have two more flags: "altcc" and "altfc" 2) somewhere (in make.conf for ex) you have specify : ALTCC=C-compiler-which-I-really-like ALTCXX=C++-compiler-which-I-really-like ALTF77=F77-compiler-which-I-really-like ALTF90=F90-compiler-which-I-really-like ALTCFLAGS="optimize-it-to-make-a-rocket" ALTF77LAGS="optimize-it-to-make-a-rocket" and thats all. Ebuild just check for "altcc" and "altfc" flags in USE, if they are, it force configure or whatever else to use it. Thats done. Of course you can't be sure that it will be compiled on all possible alternative compilers, but you can try :) And it make your life really flexible. You do can what you want. Thats Gentoo philosophy, I guess :) It just a general talk, don't kick me if I'm wrong :) Anton Starikov -- gentoo-dev@gentoo.org mailing list