[Rd] [PATCH] Add fpicflags for Intel(R) Fortran Compiler (PR#8344)
kugelfang at gentoo.org
Tue Nov 22 18:58:52 CET 2005
-----BEGIN PGP SIGNED MESSAGE-----
Dear Prof. Ripley,
Prof Brian Ripley schrieb:
| 1) The documented way to specify this is to set FPICFLAGS in
| config.site: see the example in R-admin for the PG compilers. When you
| tried that, what went wrong?
Nothing went wrong. However, I was of the opinion that support of
ifc/ifort 'out-of-the-box' is worthwhile. This is why I asked to include
it into the source-tree. As a matter of fact, I stumbled upon this when
testing Gentoo's R-2.2.0 buildscripts and added a similar patch to our
| 2) It seems strange to specify this for the Fortran compiler and not the
| C or C++ compiler.
I used the combination of 'gcc/g++/ifort' to build and test R. Testing
the combination of 'icc/ifort' on Gentoo is scheduled already.
| 3) You have suggested the change to a section for all OSes. Do you know
| for sure that all compilers called 'ifort' on all OSes need the -fPIC
| flag? Or is it really just for Linux (and AFAICS, just x86_64 Linux, as
| i386 Linux seems to work with icc/ifort without it).
a) For building shared ELF-libraries on x86_64 and ia64, you need to
instruct the compiler to build PIC. As a matter of fact, this isn't
necessary for x86, but it is strongly recommended as it should improve
performance due to the lack of text relocations the dynamic linker would
have to perform otherwise. This affects all OSes that can handle ELF
binaries (Linux, FreeBSD, Solaris, tbc.).
b) I surely can't guarantee that there never will be a different fortran
compiler with same name on any OS. However, I think that it is a safe
assumption to say that there currently is no such compiler on OSes
supported by autotools.
The number of target OSes and and supported ISAs makes it - in my eyes -
worthwhile to add the check to the 'general' section of the configure.ac
script. If - in a rare case - a conflict with other compiler emerged, it
would still be possible to work around a problem in the following
section of the script: '## Step 3. Individual platform overrides.'.
(Emphasis here on 'individual' and 'override')
Danny van Dyk <kugelfang at gentoo.org>
Gentoo/AMD64 Project, Gentoo Scientific Project
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the R-devel