This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: implications and importance of --prefix?? what about -staticin GCC_EXTRA_CONFIG?


David Haworth wrote:
On Wed, Nov 05, 2003 at 08:00:42AM -0800, Dan Kegel wrote:

David Haworth wrote:

I think I didn't explain myself very well. I'd like to build a
gcc that "knows" where its files are by looking at an arbitrary
(specified at build time) environment variable. I think this is
what Wind River do in the gcc that is deleivered with Tornado -
it appears to use WIND_BASE.

The problem is that dirname(argv[0]) doesn't always work on
Unix - depends how the program is started.

Can you give me an example of when it fails?


argv[0] usually contains what you type at the command line.
So if your foo-gcc executable is in your path and the command
is "foo-gcc -c hello.c", argv[0] will contain "foo-gcc", so
dirname(argv[0]) will return "." according to my man page,
which isn't exactly what you want.

I was using argv[0] figuratively, I guess.


One of these days I'm going to look at how --with-sysroot is
really implemented.  I kind of doubt it suffers from the
problem you're worried about.

- Dan


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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