From: Keith M. <kei...@nt...> - 2008-07-24 20:00:20
|
On Thursday 24 July 2008 04:04:22 Earnie Boyd wrote: > > change the `local_prefix' spec string definition to say: > > > > *local_prefix: > > d:/mingw/local/ > > > > (or whatever substitution for d:/mingw is appropriate for the end > > user's installation), and the effect is similar to having > > /mingw/local/... in the compiler's default search path. > > Just a FLI; make sure you have a backup copy of the specs file. If you have modified it, and you value your changes, absolutely! It really shouldn't be necessary to say this; it should be included in your scheduled backup regimen. (You *do* have one, don't you? No? Have fun, when your working disk fails. Can't happen to you? Don't *ever* assume that!) > The GCC spec file isn't that difficult to understand ... Not sure I would agree with that; the syntax is quite simple, but rather arcane, and may seem initially mystifying. > ... and changing can have great benefits to the users of GCC. Perhaps there should be a "statutory health warning"; while tweaking the specs file can have benefits, if you mess it up, you can break GCC in some "interesting" ways. If you do screw it up, and you have never previously modified it, (or you have no valued changes to preserve), then you don't actually need a backup; you can just delete it, and GCC will revert to using built-in specs. The initial "as-built" specs file is simply a verbatim statement of those default built-in specs; it can be regenerated at any time, by executing: $ gcc -dumpspecs > /path/to/specs OTOH, if a change isn't behaving quite as you expect, and you want to debug it, GCC's "-###" option is your friend: $ gcc -### <normal usage options/arguments ...> (this shows what sub-commands GCC would invoke, to process the options and arguments specified as "normal", with all specs file substitutions expanded, but it does *not* actually invoke those sub-commands). > There is also a GCC switch > -specs=<file> to override the default file with one of your own. To be strictly accurate, this does not override, but rather it augments the default specs; of course overriding may be achieved, by redefining any of the default spec strings, amongst the augmenting specs. Regards, Keith. |