gcc.c (STANDARD_STARTFILE_PREFIX_1): Define.

2004-07-02  Aaron W. LaFramboise <aaronraolete36@aaronwl.com>

	* gcc.c (STANDARD_STARTFILE_PREFIX_1): Define.
	(STANDARD_STARTFILE_PREFIX_2): Define.
	(standard_startfile_prefix_1): Initialize to
	STANDARD_STARTFILE_PREFIX_1.
	(standard_startfile_prefix_2): Initialize to
	STANDARD_STARTFILE_PREFIX_2.
	* config/i386/mingw32.h (MD_STARTFILE_PREFIX): Remove.
	(STANDARD_STARTFILE_PREFIX_1): Define.
	(STANDARD_STARTFILE_PREFIX_2): Define.
	* doc/tm.texi (STANDARD_STARTFILE_PREFIX_1): Document.
	(STANDARD_STARTFILE_PREFIX_2): Document.

From-SVN: r84002
This commit is contained in:
Aaron W. LaFramboise 2004-07-01 23:55:22 +00:00 committed by Danny Smith
parent 78cc4167bc
commit 656c7a3a1a
4 changed files with 56 additions and 9 deletions

View File

@ -1,3 +1,17 @@
2004-07-02 Aaron W. LaFramboise <aaronraolete36@aaronwl.com>
* gcc.c (STANDARD_STARTFILE_PREFIX_1): Define.
(STANDARD_STARTFILE_PREFIX_2): Define.
(standard_startfile_prefix_1): Initialize to
STANDARD_STARTFILE_PREFIX_1.
(standard_startfile_prefix_2): Initialize to
STANDARD_STARTFILE_PREFIX_2.
* config/i386/mingw32.h (MD_STARTFILE_PREFIX): Remove.
(STANDARD_STARTFILE_PREFIX_1): Define.
(STANDARD_STARTFILE_PREFIX_2): Define.
* doc/tm.texi (STANDARD_STARTFILE_PREFIX_1): Document.
(STANDARD_STARTFILE_PREFIX_2): Document.
2004-07-01 Richard Henderson <rth@redhat.com>
* tree-sra.c (sra_walk_expr): Don't maybe_lookup_element_for_expr

View File

@ -69,9 +69,13 @@ Boston, MA 02111-1307, USA. */
#define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \
%{!shared:%{!mdll:crt2%O%s}} %{pg:gcrt2%O%s}"
/* An additional prefix to try after the standard prefixes. */
#undef MD_STARTFILE_PREFIX
#define MD_STARTFILE_PREFIX "/mingw/lib/"
/* Override startfile prefix defaults. */
#ifndef STANDARD_STARTFILE_PREFIX_1
#define STANDARD_STARTFILE_PREFIX_1 "/mingw/lib/"
#endif
#ifndef STANDARD_STARTFILE_PREFIX_2
#define STANDARD_STARTFILE_PREFIX_2 ""
#endif
/* Output STRING, a string representing a filename, to FILE.
We canonicalize it to be in Unix format (backslashes are replaced

View File

@ -469,6 +469,22 @@ try when searching for startup files such as @file{crt0.o}.
is built as a cross compiler.
@end defmac
@defmac STANDARD_STARTFILE_PREFIX_1
Define this macro as a C string constant if you wish to override the
standard choice of @code{/lib} as a prefix to try after the default prefix
when searching for startup files such as @file{crt0.o}.
@code{STANDARD_STARTFILE_PREFIX_1} is not searched when the compiler
is built as a cross compiler.
@end defmac
@defmac STANDARD_STARTFILE_PREFIX_2
Define this macro as a C string constant if you wish to override the
standard choice of @code{/lib} as yet another prefix to try after the
default prefix when searching for startup files such as @file{crt0.o}.
@code{STANDARD_STARTFILE_PREFIX_2} is not searched when the compiler
is built as a cross compiler.
@end defmac
@defmac MD_STARTFILE_PREFIX
If defined, this macro supplies an additional prefix to try after the
standard prefixes. @code{MD_EXEC_PREFIX} is not searched when the

View File

@ -1429,6 +1429,13 @@ static const char *gcc_libexec_prefix;
/* Default prefixes to attach to command names. */
#ifndef STANDARD_STARTFILE_PREFIX_1
#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
#endif
#ifndef STANDARD_STARTFILE_PREFIX_2
#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
#endif
#ifdef CROSS_COMPILE /* Don't use these prefixes for a cross compiler. */
#undef MD_EXEC_PREFIX
#undef MD_STARTFILE_PREFIX
@ -1454,8 +1461,10 @@ static const char *md_exec_prefix = MD_EXEC_PREFIX;
static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
static const char *const standard_startfile_prefix_1 = "/lib/";
static const char *const standard_startfile_prefix_2 = "/usr/lib/";
static const char *const standard_startfile_prefix_1
= STANDARD_STARTFILE_PREFIX_1;
static const char *const standard_startfile_prefix_2
= STANDARD_STARTFILE_PREFIX_2;
static const char *const tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
static const char *tooldir_prefix;
@ -6231,10 +6240,14 @@ main (int argc, const char **argv)
NULL, PREFIX_PRIORITY_LAST, 0, NULL, 1);
}
add_sysrooted_prefix (&startfile_prefixes, standard_startfile_prefix_1,
"BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 1);
add_sysrooted_prefix (&startfile_prefixes, standard_startfile_prefix_2,
"BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 1);
if (*standard_startfile_prefix_1)
add_sysrooted_prefix (&startfile_prefixes,
standard_startfile_prefix_1, "BINUTILS",
PREFIX_PRIORITY_LAST, 0, NULL, 1);
if (*standard_startfile_prefix_2)
add_sysrooted_prefix (&startfile_prefixes,
standard_startfile_prefix_2, "BINUTILS",
PREFIX_PRIORITY_LAST, 0, NULL, 1);
#if 0 /* Can cause surprises, and one can use -B./ instead. */
add_prefix (&startfile_prefixes, "./", NULL,
PREFIX_PRIORITY_LAST, 1, NULL, 0);