From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10ba33,ca8949b46bd15f7b,start X-Google-Attributes: gid10ba33,public X-Google-Thread: fee84,ca8949b46bd15f7b,start X-Google-Attributes: gidfee84,public From: pedwards@valhalla.cs.wright.edu (Phil Edwards) Subject: Why libm?? Build g++ to NOT link libm? Date: 1996/05/22 Message-ID: <4o04un$qlm@valhalla.cs.wright.edu>#1/1 X-Deja-AN: 156194695 expires: 5/31/96 distribution: world followup-to: gnu.g++.help organization: the top of Solsbury Hill. newsgroups: gnu.g++.help,comp.unix.osf.osf1 While I am extremely pleased with GNU's rapid adaptation of the standardization results into the compiler, I am extremely annoyed that the g++ front end automatically links the math library, which results in the namespace conflict (shame, shame!) with "clog" (the GLOBAL DATA vs GLOBAL FUNC thing in iostream.h vs libm). 1) Why is this done? I can't believe that its linking the math library for convenience; people too lazy to type "-lm" just shouldn't be using computers. So I'm thinking that some math code is required at some stage in the compilation, perhaps by one of the g++ libraries. I'm curious: what exactly requires libm? What is so important that the namespace conflict hasn't been fixed yet?? 2) What must I do to build the g++ front-end so that it doesn't call "-lm"? While I'm not the gcc maintainer at our site, I have grep'd and vi'd and more'd through the gcc 2.7.2 source tree, looking for some reference to libm or -lm, with no results. I would dearly love to build a second version of g++, but can't find the place(s) to change! I've lived with this bug for several years, and have finally lost my patience with a stupid namespace conflict. Any information is greatly appreciated. Luck++; Phil -- pedwards@cs.wright.edu http://www.cs.wright.edu/people/students/pedwards/ The gods do not protect fools. Fools are protected by more capable fools. -Larry Niven