aboutsummaryrefslogtreecommitdiff
path: root/gcc/tlink.c
diff options
context:
space:
mode:
authorMike Stump <mrs@gcc.gnu.org>2007-02-24 06:22:12 +0000
committerMike Stump <mrs@gcc.gnu.org>2007-02-24 06:22:12 +0000
commite7d406d5392e7174efa6c18644364d030543334b (patch)
treed29c1cc7a2a865f80752fe23fcaed4cedc5bc6c0 /gcc/tlink.c
parentc4f46fdee9c08eef35a95b0cddb8a39615f8e56e (diff)
downloadgcc-e7d406d5392e7174efa6c18644364d030543334b.zip
gcc-e7d406d5392e7174efa6c18644364d030543334b.tar.gz
gcc-e7d406d5392e7174efa6c18644364d030543334b.tar.bz2
tlink.c (scan_linker_output): Parse linker messages from darwin9's linker better.
* tlink.c (scan_linker_output): Parse linker messages from darwin9's linker better. From-SVN: r122286
Diffstat (limited to 'gcc/tlink.c')
-rw-r--r--gcc/tlink.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/tlink.c b/gcc/tlink.c
index 8e79d24..7907f41 100644
--- a/gcc/tlink.c
+++ b/gcc/tlink.c
@@ -607,7 +607,7 @@ scan_linker_output (const char *fname)
{
FILE *stream = fopen (fname, "r");
char *line;
- int skip_next_line = 0;
+ int skip_next_in_line = 0;
while ((line = tfgets (stream)) != NULL)
{
@@ -616,11 +616,11 @@ scan_linker_output (const char *fname)
int end;
int ok = 0;
- if (skip_next_line)
- {
- skip_next_line = 0;
+ /* On darwin9, we might have to skip " in " lines as well. */
+ if (skip_next_in_line
+ && strstr (p, " in "))
continue;
- }
+ skip_next_in_line = 0;
while (*p && ISSPACE ((unsigned char) *p))
++p;
@@ -662,17 +662,19 @@ scan_linker_output (const char *fname)
demangled *dem = 0;
q = 0;
- /* On darwin9, we look for "foo" referenced from:\n.*\n */
+ /* On darwin9, we look for "foo" referenced from:\n\(.* in .*\n\)* */
if (strcmp (oldq, "referenced from:") == 0)
{
/* We have to remember that we found a symbol to tweak. */
ok = 1;
- /* We actually want to start from the first word on the line. */
+ /* We actually want to start from the first word on the
+ line. */
oldq = p;
- /* Since the format is multiline, we have to skip the next line. */
- skip_next_line = 1;
+ /* Since the format is multiline, we have to skip
+ following lines with " in ". */
+ skip_next_in_line = 1;
}
/* First try `GNU style'. */