implications and importance of --prefix?? what about -static in GCC_EXTRA_CONFIG?

Dan Kegel dkegel@ixiacom.com
Fri Nov 7 19:29:00 GMT 2003


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



More information about the crossgcc mailing list