egcs/Solaris status
Dimitri Papadopoulos
dpo@club-internet.fr
Sun Aug 22 03:50:00 GMT 1999
Igor Markov wrote:
>
> Dimitri,
>
> several things:
> our sysadmin was able to build 2.95.1 on Solaris 2.7 with CC5.0
> We can compile and link our code, but it seg faults on trivial
> code (I posted a ridiculous 4-liner to gcc-bugs), so we are
> probably going to roll back to 2.95.
I don't get segfaults with your 4-liner. The cause may well be that
you are mixing Sun as/ld when buidling GCC and GNU as/ld when building
your programs which has caused me a lot of trouble... I had exactly
the same problems. This one wouldn't even link:
cout << endl;
Otherwise, I was able to build GCC with EGCS for use with GNU as/ld
_and_ Sun as/ld. However it took me a few days of tests and
modifications. I still don't understand why a build works or not. It
depends on many factors:
- GNU as/ld are in the PATH or not when buidling GCC.
- Sun as/ld are in the PATH or not when buidling GCC.
- The compiler used to bootstrap internally uses GNU as/ld or not
(this is relevant for EGCS/GCC compilers only, for they may use
GNU as/ld without as/ld being in the PATH).
- GNU as/ld are in the PATH or not when using GCC.
- Sun as/ld are in the PATH or not when using GCC.
I don't have time to test all combinations.
> Earlier, we installed binutils -- when we saw that gcc does not
> work well with Sun's ld, we decided not to try to fix that.
That's not an option for me. There are people out there who use EGCS
with Sun as/ld and I want to be able to exchange shared objects with
them. It's really a problem that EGCS/GCC produce their own format
of shared objects on Solaris, instead of sticking to the Solaris
standard format.
> I don't think you can expect to ever link C++ libs compiled with
> CC and with g++ because they seem to have vastly different ways
> to process templates (each offer 3-4 options, but non-default
> options either aren't working on our code, e.g., -frepo or lead
> to unacceptable code bloat, e.g., w SunCC).
Of course I don't expect C++ programs compiled by different compilers
to interoperate. That's not even a question of templates. I have never
written that I expect CC and g++ to interoperate.
> So, my question is -- what (how many) patches did you install for CC
> (you mentioned fully patched) ?
I have installed all the Workshop patches recommended by Sun:
http://access1.sun.com/workshop/current-patches.html
These are
server patches for building 32-bits programs
107289-03
107295-01
107311-05
107354-01
107355-02
107357-03
107740-01
107742-01
server patches for building 64-bits programs
107358-02
107390-04
Solaris 7 client patches for building and running 32-bits programs
106327-05
106748-02
Solaris 7 client patches for building and running 64-bits programs
106300-06
107058-01
Note that their C++ front-end is badly broken even after adding all
these patches...
> 2.95 seemed to work fine on Solaris 2.6 (we upgraded recently to 2.7
> and did not try 2.95 here).
All software seem to work fine until you have problems... After a few days
struggling to install it, the compiler seemed to work fine indeed, until I
started getting segfaults in Qt, which works like a charm with EGCS, with
other compilers or on other platforms. The problem may well be that I must
use -fno-strict-aliasing as Alexandre Oliva pointed out.
Dimitri
More information about the Gcc
mailing list