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 -static in GCC_EXTRA_CONFIG?


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.

Dave

-- 
David Haworth       3SOFT GmbH, Frauenweiherstr. 14, 91058 Erlangen
david.haworth@3soft.de                        Tel +49 9131 7701-154
http://www.3soft.de                           Fax +49 9131 7701-333
PGP Fingerprint: 3B95 445F B68A F72C 14D9  D257 0CB7 2D8A 770D C4BE

------
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]