This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: non_shared compilation with 2.95.1 on irix 6.3


Hello there,

-> Hi,
-> 
-> I am working on a SGI O2 and I want to compile some C++ code in non_shared
-> mode.  I installed gcc 2.95.1 without (apparent) problem, gcc uses the mips
-> assembler and linker.  I compiled some code in shared mode; it worked ok.
-> Now I want to compile this code in non_shared mode.  I have gone into much
-> problems:
->   o when I pass the -static option at link time, the linker complains about
->     the crtbegin.o file "ld: FATAL 43: cannot mix PIC and non-PIC: /soft/lbit/irix/lib/gcc-lib/mips-sgi-irix6.3/2.95.1/crtbegin.o";
-> 
->   o for testing purpuses, I removed this filename from the link command: the
->     next file had the same comment.  I concluded that the assembly went
->     wrong;
-> 
->   o I added the flag -static -Wa,-non_shared on compilation of my first test
->     file and linked again without crtbegin.o: the second file was rejected
->     for the same reason.
-> 

O.K , As I understand on IRIX, to compile in non_shared mode there are 
things specific to that, like libraries, startup files like crt* files etc 
which are non-pic.

So I guess that the crtbegin.o should also be a non-pic one. But in your 
case it is not so. Since this is built from the gcc sources ( when gcc is 
compiled) , for the non_shared compilation a separate crtbegin.o should be 
generated that is strictly non-pic. Right now as I see from the gcc sources 
crtbegin.o and crtend.o are built in pic mode.

So I am afraid, you can *not* possibly compile in non_shared mode.

-> Do I have to modify the specs file and recompile gcc and libraries or did I
-> missed something???
-> 

No Modifying the specs file will not help. But make sure that your system 
has the subset to libraries that are used for compilation in the non_shared 
mode.

People using gcc/g++ on IRIX6* can be of more help to your problem I 
suppose.
It is just that I am aware of some of the things on IRIX6*, that I could 
tell this.

Hope that helps.

Cheers,

koundinya
-> Thank you.
-> -- 
-> Martin Larose                mailto:larosem@iro.umontreal.ca
->                              http://www.iro.umontreal.ca/~larosem
-> This mail message sent by GNU emacs, Gnus and Linux.
-> Food, Shelter, Source code.
-> 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]