Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!husc6!rice!sun-spots-request From: roy@philabs.philips.com Newsgroups: comp.sys.sun Subject: Floating point compiler options under SunOS-3.X Keywords: Software Message-ID: <3700@phri.UUCP> Date: 8 Mar 89 22:08:41 GMT Sender: usenet@rice.edu Organization: Public Health Research Institute, NYC, NY Lines: 17 Approved: Sun-Spots@rice.edu Original-Date: 24 Feb 89 17:19:04 GMT X-Sun-Spots-Digest: Volume 7, Issue 188, message 11 of 22 When you do "cc -fwhatever -lm", how does the linker know which versions of the math library to link in? If you do a "cc -dryrun" to see what's going on, the only difference at the linking stage is using a different version of crt.o. The only thing I can see that might make sense (and looking at gprof output semi-confirms this) is that every routine in the math library is actually 3 routines in one (soft, 68881, and fpa versions) and does a switch to the right code on entry, based on the value of some global variable set in crt.o. Could this really be the way things work? Is the binary of every program I write using the math library loaded down with three versions of each routine (plus the, admittedly minor, overhead of the switch-out code on each call)? Roy Smith, System Administrator Public Health Research Institute {allegra,philabs,cmcl2,rutgers}!phri!roy -or- phri!roy@uunet.uu.net