On Friday 16 January 2009 15:16:07 Garrett Cooper wrote: > The only variables that should be used are: > > For tools: > AR > CC > RANLIB > > For compilation definitions: > CFLAGS > LDFLAGS
and CXXFLAGS ... merging $(CFLAGS) and $(CXXFLAGS) is never right > They are standard (minus AR) with input to configure. Here's a working > configure.in definition for defining $(AR): we arent getting tools from configure. but that doesnt mean we cant integrate support for doing so ... then people could do the nice: ./configure --host=some-other-target and it would autodiscover CC/AR/CXX/RANLIB/etc... > Questionable variables: > CPPFLAGS (shouldn't need this -- hints at an infrastructure problem) that depends. if you're referring to -I paths, then i'd agree that people are doing something wrong if they need to pass crazy -I paths in order to get successful compilation as their toolchain should be configured properly. but some people might want to use -D flags and that's valid (think DEBUG or NDEBUG or FORTIFY or ...). > Btw, LIB_DIR isn't common; LDLIBS and LOADLIBES are. ive never even heard of it before ;) > -bash-3.00$ make -p foo | grep LIB neat trick, thanks > You can accomplish the same thing with LOADLIBES / LDLIBS that you can > with LDFLAGS by hardcoding libraries, but that's really a bad idea > anyhow, and anyone that does that deserves to be slapped for poorly > engineering a solution ;p. in general, people shouldnt be sticking libraries at the global level into the linking step. however, if you want to build/link against a random debugging library (like mudflap), then you'll need to inject the -lmudflap. personally i think gcc is sucking here by not converting -fmudflap to -lmudflap at the linking step via specs, but that is how it's behaved thus far from gcc-4.0 (the version iirc mudflap first showed up). -mike
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list