This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
GCC_EXEC_PREFIX doesn't work
- To: bug-gcc at gnu dot org
- Subject: GCC_EXEC_PREFIX doesn't work
- From: bryanh at giraffe-data dot com (Bryan Henderson)
- Date: Tue, 28 Mar 2000 12:37:24 -0800
Gcc cannot find my specs file when I identify its location with the
GCC_EXEC_PREFIX environment variable:
$GCC_EXEC_PREFIX=/tmp/ gcc --verbose
Using builtin specs.
gcc version 2.95.2 19991024 (release)
A trace shows that it's because gcc is removing the trailing slash.
It does that in the function translate_name() in prefix.c under the
comment "/* Remove any trailing directory separator from what we got.
*/". I haven't a clue as to why this would ever be the right thing to
do.
I can circumvent the bug by using two trailing slashes:
$GCC_EXEC_PREFIX=/tmp// gcc --verbose
Reading specs from /tmp/i686-pc-linux-gnulibc1/2.95.2/specs
gcc version 2.95.2 19991024 (release)
The system is as described by gcc above. The shell is Bash.
By the way, as I read through the code analyzing this, I discovered a
lot of sophisticated path editing that contradicts the simple
explanation of GCC_EXEC_PREFIX in the info file (The "Environment
Variables" node). Shouldn't the full function be documented?
--
Bryan Henderson Phone 415-505-3367
Olympia, Washington