From 5f31e9bc315703be11e7c2852efe601edecea697 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Fri, 17 Oct 2003 11:27:13 +0000 Subject: [PATCH] collect2.c (COLLECT_PARSE_FLAG): Provide default. * collect2.c (COLLECT_PARSE_FLAG): Provide default. (main): Use it. * doc/tm.texi (COLLECT_PARSE_FLAG): Document it. From-SVN: r72599 --- gcc/ChangeLog | 6 ++++++ gcc/collect2.c | 11 +++++++++-- gcc/doc/tm.texi | 6 ++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a096fda0333..0154838f7d7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-10-17 Rainer Orth + + * collect2.c (COLLECT_PARSE_FLAG): Provide default. + (main): Use it. + * doc/tm.texi (COLLECT_PARSE_FLAG): Document it. + 2003-10-17 Richard Earnshaw * arm-modes.def (CC_Nmode): New condition code mode. diff --git a/gcc/collect2.c b/gcc/collect2.c index 356eda96f6b..2d49cce3ffe 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -150,6 +150,10 @@ int do_collecting = 1; int do_collecting = 0; #endif +#ifndef COLLECT_PARSE_FLAG +#define COLLECT_PARSE_FLAG(FLAG) +#endif + /* Nonzero if we should suppress the automatic demangling of identifiers in linker error messages. Set from COLLECT_NO_DEMANGLE. */ int no_demangle; @@ -853,8 +857,11 @@ main (int argc, char **argv) int i; for (i = 1; argv[i] != NULL; i ++) - if (! strcmp (argv[i], "-debug")) - debug = 1; + { + if (! strcmp (argv[i], "-debug")) + debug = 1; + COLLECT_PARSE_FLAG (argv[i]); + } vflag = debug; } diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 2a986819870..8a0ff9bbe63 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -7100,6 +7100,12 @@ This macro is effective only in a native compiler; @command{collect2} as part of a cross compiler always uses @command{nm} for the target machine. @end defmac +@defmac COLLECT_PARSE_FLAG (@var{flag}) +Define this macro to be C code that examines @command{collect2} command +line option @var{flag} and performs special actions if +@command{collect2} needs to behave differently depending on @var{flag}. +@end defmac + @defmac REAL_NM_FILE_NAME Define this macro as a C string constant containing the file name to use to execute @command{nm}. The default is to search the path normally for -- 2.30.2