Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: dsr@lns598.lns.cornell.edu (Daniel S. Riley)
Subject: Re: gcc 2.7.2, ld warnings on Digital UNIX v3.2
Date: 1996/05/01	[thread overview]
Message-ID: <shybnctr78.fsf@lns100.lns.cornell.edu> (raw)
In-Reply-To: 4kubph$b90@vertex.tor.hookup.net


With <4lo9l0$n8g@disunms.epfl.ch>,
it seems Radenko Kalajdzic (rkalajdz@di.epfl.ch) sez:
rkalajdz> /usr/bin/ld:
rkalajdz> Warning: clog defined as GLOBAL DATA but is defined in a shared 
rkalajdz>          lib as a GLOBAL FUNC

In article <4m6a4n$em2@valhalla.cs.wright.edu>
pedwards@valhalla.cs.wright.edu (Phil Edwards) writes:
pedwards> The problem is due to a conflict between iostream.h and
pedwards> libm.a.  The iostream header file contains this declaration:

pedwards> 	extern _IO_ostream_withassign cout, cerr, clog;
[...]
pedwards> 	3)  Build a math library which doesn't contain clog(3), and
pedwards> 	    name it libm.a; keep the "real" one as liboldm.a or

Won't fix it.  The problem is with libm.so, not libm.a.  If it were
libm.a, the linker would just ignore the object module with clog in it,
unless clog were actually called somewhere (in which case you have
trouble anyway).  It doesn't have that option with shared libraries,
hence the message.  To fix it, you either have to change the name of
clog in libm.so, or fix g++ to link explicitly to libm.a instead of -lm.

pedwards> 	4)  Find a version of g++ in which "g++" is just a script
pedwards> 	    which calls gcc with command-line arguments, and then
pedwards> 	    remove "-lm" from the script.  Personally, I think GNU
pedwards> 	    made a /big/ mistake when they moved g++ to a separate
pedwards> 	    executable:  their goal of "an integrated compiler" is
pedwards> 	    now further away, 

I don't understand this remark at all.  g++ is just a front end that
calls gcc with the appropriate arguments; whether it is a shell script
or a C program makes no difference to how "integrated" the compiler
is, as long as the C program has the same functionality as the shell
script.  The front-ends have very little to do with how "integrated"
the compiler is anyway--everything interesting is in the back-ends.

pedwards> 	    and "gcc" doesn't correctly detect a C++ program
pedwards>           anymore.

Works for me--the only thing gcc doesn't do is insert the C++
libraries and -lm on the link line.  And it must work for you, if g++
works, since all g++ does is construct an appropriate invocation of
gcc (just like the shell script did).  Compile with 'g++ -v' if you
don't believe me.
-- 
Dan Riley                          Internet:  dsr@lns598.lns.cornell.edu
Wilson Lab, Cornell University     HEPNET/SPAN: lns598::dsr (44630::dsr)
http://w4.lns.cornell.edu/    "Distance means nothing/To me." -Kate Bush



  parent reply	other threads:[~1996-05-01  4:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-15  4:00 gcc 2.7.2, ld warnings on Digital UNIX v3.2 Carm Frascatore
1996-04-15  4:00 ` Murray S. Kucherawy
1996-04-17  4:00   ` Allen M. Cohen
1996-04-17  4:00     ` Norbert Berzen
1996-04-25  4:00       ` Radenko Kalajdzic
1996-05-01  4:00         ` Phil Edwards
1996-04-18  4:00     ` Tim Lucia
1996-05-01  4:00   ` Daniel S. Riley [this message]
1996-05-01  4:00   ` Dale Hagglund
1996-05-08  4:00   ` Phil Edwards
1996-05-08  4:00   ` Jason Merrill
1996-05-09  4:00   ` Gary Holt
1996-04-18  4:00 ` John C. Fowler
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox