how to truly override a specs file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi there,

to start with, our environment:  debian linux (woody) and solaris 2.9,
using self-built gcc 3.3.4 (bootstrapped from gcc-3.3.2 in both cases).

we have an interesting system installation situation in which we'd like
gcc to provide two functions:

1) as compiler for the general public, it needs to automatically pick up
via -I and -L, libraries and headers installed in nonstandard locations.
    examples:  -I/lusr/X11/include -L/lusr/kde3/lib
these libraries and headers can't really be moved, so we've put the above
into the specs file so they will automagically be found.  so far, so good--
that works as intended.

2) as compiler for people building huge packages which require separate
versions of some libraries already installed in the directories mentioned
in the specs file.  these people need the ability to either completely
override the specs file, or else remove directories from the include
search path and link search path that the systemwide specs file includes.


the problem lies in the fact that despite any -specs="filename" flag used
to gcc, the system specs file is still read and applied first, so there's
no way to *undo* the -I or -L that exists there.  typical users need the
-I/-L, but specific package maintainers need them not to be there for
the duration of their builds.  i was rather confused since the info pages
suggest that the specs file can be "overridden" with the "-specs" flag:

    Specifying subprocesses and the switches to pass to them

    [...]
    The spec strings built into GCC can be overridden by using the
    `-specs=' command-line switch to specify a spec file.
	
but also says that:

    `-specs=FILE'
       Process FILE after the compiler reads in the standard `specs'
       file, in order to override the defaults that the `gcc' driver
       program uses

so, it makes sense that the -specs file is read in after the system
specs file, but there is no "overriding" going on as far as i can
tell.  adding, certainly, but overriding (ie changing existing settings)
i cannot find.  i thought i was onto something with the user specs file
directive (in a -specs="./testspecs" referenced file)
	*[cpp_unique_options]:
but indeed that does not un-define the system specs' cpp_unique_options
flag (which contains a -I/lusr/X11/include).

can anyone suggest a method for either completely and actually overriding
the system specs file, or else *removing* via command line arguments
-I/-L directives that arrived via the system specs file?  does anyone
else find this documentation a bit confusing?

the only solution we have now is to cripple the gcc installation by
putting a vanilla specs file in place while building problem packages
and then replacing our custom specs file afterwards, but this leaves
the compiler broken for all other intents and purposes for some time
(the typical builds which require this are kde, gnome, and X11 which
are not exactly quick builds...)

thanks in advance for any help!

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux