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: G++ on solaris.



Thanks for the reply... Here's some more info on my dillema. :)

I'm the author of a GPL'd C++ program (http://www.nondot.org/MagicStats),
and one of my users it trying to get it to work on Solaris.  There the
link step was whining about not having a -export-dynamic option (which I
use because I have dlopen'd plugins that are also written in C++ that
reference symbols in the main executable).  I tracked it down to being
this problem, and I reproduced it on a solaris box that I have access
to.  I don't know anything about this particular users config, but I'm
trying to do a more or less portable fix.

The problem is that he(and I in this case) don't have root access on the
machine, so he can't modify the GCC install (by putting in a symlink or
something).  Also quotas are a problem so we can't rebuild GCC.  :(

I'm I just out of luck here, or is there anything that I can possibly do?

Thanks for the help,

-Chris

On 28 Nov 2000, Alexandre Oliva wrote:

> On Nov 28, 2000, Chris Lattner <sabre@nondot.org> wrote:
> 
> > My problem is this, it seems that G++ on solaris likes to link with the
> > system ld.  In my particular case, gnu ld is installed as gld, and I need
> > to use it (for the -export-dynamic option), but gcc insists on using
> > ld.
> 
> There are instructions in the FAQ about how to make sure GCC uses GNU
> as and/or ld instead of the system built-in counterparts.  One of the
> options is to configure GCC --with-ld=/path/to/ld.
> 
> > I have also tried linking the application with gld directly (ie gld
> > xxx.o... -lstdc++ -lg++), but it claims to not be able to find
> > libstdc++ or libg++.
> 
> You don't want to use ld directly.  If you do it, you're preventing
> GCC from linking in some run-time object files that deal with
> initialization of global objects.
> 
> > I can see how to do it when configuring, but in this case I don't
> > have the option of reconfiguring g++/gcc.
> 
> In this case, it's just a matter of creating some soft-links in the
> GCC install tree.  I believe this is also covered in the FAQ.  But it
> is recommended that you rebuild GCC anyway, at least using the
> switches --with-gnu-as and --with-gnu-ld.  Not only will this result
> in a more efficient GCC, because it will know it can rely on the
> assembler and the linker to deal with certain issues, but also, on
> certain systems, GCC configured for the native as/ld won't work with
> the GNU counter-parts, and vice-versa.  The GNU tools are often
> extended to accept system-specific flags, so this case is rare, and
> maybe it won't bite you.
> 
> -- 
> Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
> Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
> CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
> Free Software Evangelist    *Please* write to mailing lists, not to me
> 


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