public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Modifying GCC's default search dirs
@ 2005-10-12  0:05 Shaun Jackman
  2005-10-12  0:20 ` Shaun Jackman
  0 siblings, 1 reply; 2+ messages in thread
From: Shaun Jackman @ 2005-10-12  0:05 UTC (permalink / raw)
  To: gcc-help

I would like to change GCC's concept of its PREFIX and MACHINE, for
the purpose of modifying GCC's default search directories. For
example, my local GCC was configured with PREFIX=/usr and
MACHINE=i486-linux-gnu. I would like to tell GCC to instead use
PREFIX=/usr/local and MACHINE=i386-linux-newlib, so that the default
library search path includes PREFIX/MACHINE/lib and the default header
search path includes PREFIX/MACHINE/include. Is this possible?

I've run into the environment variables GCC_EXEC_PREFIX and
COMPILER_PATH as well as the switch -B. I've tried playing with these,
but they don't seem to have the exact effect I'm looking for. In
particular they seem to be adding additional search directories,
instead of replacing the default search directories.

I've also run into the -b MACHINE and -v VERSION switches which gave
me hope, but they only seem to call the binary MACHINE-gcc-VERSION,
which, if it doesn't exist, doesn't accomplish much of anything.

Thanks!
Shaun

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Modifying GCC's default search dirs
  2005-10-12  0:05 Modifying GCC's default search dirs Shaun Jackman
@ 2005-10-12  0:20 ` Shaun Jackman
  0 siblings, 0 replies; 2+ messages in thread
From: Shaun Jackman @ 2005-10-12  0:20 UTC (permalink / raw)
  To: gcc-help

With a little experimentation, I found out the default search
directories of GCC.

Given the compile time options of, for example, PREFIX=/usr,
MACHINE=i486-linux-gnu, VERSION=4.0.1, and the default
GCC_EXEC_PREFIX=PREFIX/lib/gcc
... the default library search paths are...
	GEP/M/V
	GEP/M/V/../../../../M/lib/M/V
	GEP/M/V/../../../../M/lib
... and the default include search paths are...
	GEP/M/V/../../../../M/sys-include
	GEP/M/V/include
	GEP/M/V/../../../../M/include

Now one can change GEP by either setting the environment variable or
with the -B switch. However, what I'd really like to modify is the
entire GEP/M/V portion, as well as the M in
../../../../M/{include,lib}. Can this be done?

(as a little experiment, I copied the gcc binary, searched for the
string i486-linux-gnu, and hacked it with an editor to be something
else, and this did have the desired effect of changing the parameter M
above!)

Please cc me in your reply. Thanks again,
Shaun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-10-12  0:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-12  0:05 Modifying GCC's default search dirs Shaun Jackman
2005-10-12  0:20 ` Shaun Jackman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).