AdaCore / gprbuild

GPRbuild is an advanced build system designed to help automate the construction of multi-language systems.
Other
64 stars 21 forks source link

GFortran driver name probably incorrect #15

Closed DLightstone closed 7 years ago

DLightstone commented 7 years ago

In share/gprconfig/fortran.xml I suspect that the driver name generator for GFortran is incorrect

It currently is

package Naming is for Body_Suffix ("Fortran") use ".f"; end Naming; package Compiler is for Driver ("Fortran") use "${PATH(fortran)}gfortran${PREFIX(fortran)}"; for Leading_Required_Switches ("Fortran") use Compiler'Leading_Required_Switches ("Fortran") & ("-c", "-fno-underscoring"); for Include_Path ("Fortran") use "CPATH"; end Compiler; ##

from http://packages.ubuntu.com/trusty/i386/gfortran-powerpc-linux-gnu/filelist /usr/bin/powerpc-linux-gnu-gfortran GFORTRAN appears to follow the convention "${PATH(fortran)}${PREFIX(fortran)}gfortran"

from http://packages.ubuntu.com/trusty/amd64/gfortran-mingw-w64-x86-64/filelist /usr/bin/x86_64-w64-mingw32-gfortran GCC-MINGW32 appears to follow the convention "${PATH(fortran)}${PREFIX(fortran)}gfortran"

t-14 commented 7 years ago

Thanks for the heads up, this is definitely wrong, and there is also a similar bug in cpp.xml. We will fix.

DLightstone commented 7 years ago

just a speculation, but ${PATH(---language----)}${PREFIX(---language----)}-executable may just be a global necessity (well at least those where cross compilation is a possibility) that way renaming links to "executable" will not have to be created.

Not knowing the cross compiler naming conventions (no guarantee that the GNU gcc conventions are being followed), by other compiler writers, this may be a case by case situation

t-14 commented 7 years ago

It is indeed a case by case situation (i.e. it's not universally wrong, for example it's correct for the Wind River compilers that follow convention cc-arm and so on). It does look wrong for the FSF distributions however.

DLightstone commented 7 years ago

I thought FSF (Free Software Foundation) compilers were all GNU compilers. I thought the ${PREFIX} naming convention was established by FSF (that would be consistent with https://gcc.gnu.org/install/specific.html )

t-14 commented 7 years ago

Yes, we are in violent agreement :) All I am saying is that some compiler providers do not follow this convention.

DLightstone commented 7 years ago

understoud

t-14 commented 7 years ago

Should be fixed now.