G++ / gcc / gfortran / g77 binary compatibility?

Well, it seems to me that many of you are “very excited and proud of” moving to cling/clang and throwing CINT on the scrap heap.
Let me ask the following question.
Can you guarantee that the object code produced by cling/clang will be fully binary compatible with g++ / gcc / gfortran / g77?
Even if ROOT itself moves to cling/clang … a lot of existing “external” libraries and utilities will still use “traditional” compilers (e.g. the “default” system provided compilers).
Porting every existing source code to cling/clang is not a feasible option, I believe.
Moreover, in some cases the source code is not available at all, just the “precompiled libraries” are provided.
Finally, as far as I know, cling/clang will only support C and C-like languages. For other languages, like Fortran, one will still need a separate compiler (e.g. gfortran / g77).
Well, if there is no guarantee for the “binary compatibility” then cling/clang will be just a useless toy and I prefer to stay with CINT, accepting all its idiosyncrasies.
For the time being, it seems to me that switching to cling/clang makes sense only on systems where it will become the “default” system compiler as well.

[quote=“Pepe Le Pew”]Well, it seems to me that many of you are “very excited and proud of” moving to cling/clang and throwing CINT on the scrap heap.
[/quote]
Thanks for the irony and the tone! I will try to fit mine to it…

So let’s divide that into two parts. The first part - object code and the second binary compatibility.
By object code I can only assume what do you mean. If you mean the .o files there is no point in having compatibility between gcc/g++ and clang. I can hardly imagine someone compiling half of his program with gcc and the second half with clang.
GCC implements the Itanium C++ ABI as clang does as well, and as cling will inherit. Here there is no reason to panic. All the compiled code will work with no need to compile everything again. Of course things, as always, are different on windows, because MSVC++ implements to only certain extent the Itanium C++ ABI. Making clang fully ABI compatible with MSVC++ is work in progress.
And all the rest is speculation on the misunderstanding the ABI compatibility of clang.

Here I don’t quite understand your point? Does CINT support fortran?

[quote=“Pepe Le Pew”]
Well, if there is no guarantee for the “binary compatibility” then cling/clang will be just a useless toy and I prefer to stay with CINT, accepting all its idiosyncrasies.
For the time being, it seems to me that switching to cling/clang makes sense only on systems where it will become the “default” system compiler as well.[/quote]
As I said that is pure speculation based on the misunderstanding of clang’s ABI compatibility. I recommend you to have a look one of the examples root.cern.ch/drupal/content/cling-goes-public . There cling calls into library which is definitely not compiled with clang.

Even better download and check yourself.

Vassil

Hi,

I.e. to summarize Vassil’s answer:

Yes. So it’s it’s time for you to become very excited, too! :slight_smile:

And we will continue to compile ROOT using cling with (almost) all compilers that are out there - except for very few platforms (AIX and Solaris for now) because clang isn’t supported on AIX or Solaris for now.

Axel.

[quote=“Axel”]And we will continue to compile ROOT using cling with (almost) all compilers that are out there - except for very few platforms (AIX and Solaris for now) because clang isn’t supported on AIX or Solaris for now.
[/quote]

It would be lovely to see if this worked on Cygwin/gcc (especially since it looks like VC++ will be delayed)…

Cheers,
Charles

Hi Charles,
I agree that having it working on Cygwin would be fantastic. However we don’t have enough manpower and time to do it. Contributions in that respect are very welcomed!
Cheer,
Vassil

[quote=“vvassilev”] I agree that having it working on Cygwin would be fantastic. However we don’t have enough manpower and time to do it. Contributions in that respect are very welcomed!
[/quote]

I certainly understand the (wo)manpower issue. That being said, somebody should just try it to see if it works. Cygwin/gcc is very close to deadrat (sorry, red-hat, sorry SLC), it might be a lot closer to just working than the VC++ version.

Cheers,
Charles