This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[BUG] gcc 2.95.2 strips trailing slash from GCC_EXEC_PREFIX
- To: gcc-bugs at gcc dot gnu dot org
- Subject: [BUG] gcc 2.95.2 strips trailing slash from GCC_EXEC_PREFIX
- From: "J. David Bryan" <jdbryan at acm dot org>
- Date: Fri, 17 Mar 2000 04:32:04 -0500
- Organization: Palomar Corporation
This report is filed against GCC 2.95.2, compiled for i386-mingw32msvc and
running on Windows NT 4.0 SP6 (Intel x86).
GCC strips a trailing directory separator from the GCC_EXEC_PREFIX string.
For example, if GCC_EXEC_PREFIX is set to "F:\aaa\bbb\", the actual prefix
used will be "F:\aaa\bbb" (no trailing slash).
Example:
set GCC_EXEC_PREFIX=F:\aaa\bbb\
gcc -print-search-dirs
install: /gcc-2.95.2/lib/gcc-lib/i386-mingw32msvc\2.95.2\
programs: F:\aaa\bbbi386-mingw32msvc\2.95.2\;F:\aaa\bbb; ...
libraries: F:\aaa\bbbi386-mingw32msvc\2.95.2\;F:\aaa\bbb; ...
(Example output truncated for clarity; full output attached.)
Note the merging of the prefix in the first entry in each of the "programs"
and "libraries" paths. It is therefore impossible to specify a directory
as the prefix. In fact, setting GCC_EXEC_PREFIX to either "F:\aaa\bbb" or
"F:\aaa\bbb\" produces exactly the same result.
This behavior is contrary to the GCC manual, "Environment Variables
Affecting GCC" subsection:
"If GCC_EXEC_PREFIX is set, it specifies a prefix to use in the names of
the subprograms executed by the compiler. No slash is added when this
prefix is combined with the name of a subprogram, but you can specify a
prefix that ends with a slash if you wish."
The trouble appears to be in lines 282-288 of gcc/prefix.c.
If I may clarify any aspect of this report, please do not hesitate to
contact me.
-- Dave Bryan
gcc-output