This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Environment variable to pass in options?



>>>>> "Louis" == Louis Marascio <lmarasci@stevens-tech.edu> writes:

    >> SCO has had a similar feature in their tools for a long time.
    >> You can stuff things in environmental flags or in
    >> /etc/default/cc.
    >> 
    >> I thoroughly hate this feature for the very reason Jeff
    >> describes.  I have people constantly asking me "why does the
    >> compiler do XXX" and I spend a while beating on it and say, "it
    >> doesn't".  They send a test case and say, "does too".  I test
    >> their test case and say, "does not".  This is when they find
    >> out the system admin or some other coworker added '-Obazillion
    >> -UseSomeEsotericThing' to one of the above places and that's
    >> causing the wierdness.
    >> 
    >> Yes, I sometimes wish my compile lines would fit on a single 80
    >> column screen to increase the density of my 'make' output.  But
    >> after a couple rounds of playing the above game, I get over it.

    Louis> Chuckle, sounds like a pain.  There are, however, some
    Louis> instances when it could be helpful :) .. atleast from my
    Louis> perspective.  Compile options might be making my needs to
    Louis> generalized.  What I really want is some way to specify a
    Louis> path or set of paths that would have the same effect as
    Louis> having a bazillion -Isomedir in my compile line.  I tried
    Louis> each of these to no avail: CPATH, C_INCLUDE_PATH, and
    Louis> CPLUS_INCLUDE_PATH.  Anything else I could possibly try? :)

You should be able to write a small wrapper script for egcs that would
do what you want:

#! /bin/sh

egcs $EGCS_BEFORE "$@" $EGCS_AFTER

or some such.  This might not do quite what you want, but something
along these lines might.

    Louis> - - - - - Louis R. Marascio A.K.A Louis Armistead and Jim
    Louis> McCraken Email: lmarasci@stevens-tech.edu "We have plenty
    Louis> of psychological abuse ICQ: 4270107 in stock" -- Ripped
    Louis> from jsm

-- 
Mark Mitchell		mmitchell@usa.net
Stanford University	http://www.stanford.edu



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]