changeset 248:b9c48dd2e0da

[project @ 2003-04-16 21:25:59 by bellard] ignore OUTPUT_FORMAT and TARGET ld script commands (fixes Redhat >= 7 static link problems)
author bellard
date Wed, 16 Apr 2003 21:25:59 +0000
parents 5559494e740e
children 2a57089c79fc
files tccelf.c
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tccelf.c	Wed Apr 16 21:16:20 2003 +0000
+++ b/tccelf.c	Wed Apr 16 21:25:59 2003 +0000
@@ -1954,6 +1954,21 @@
                     t = ld_next(s1, filename, sizeof(filename));
                 }
             }
+        } else if (!strcmp(cmd, "OUTPUT_FORMAT") ||
+                   !strcmp(cmd, "TARGET")) {
+            /* ignore some commands */
+            t = ld_next(s1, cmd, sizeof(cmd));
+            if (t != '(')
+                expect("(");
+            for(;;) {
+                t = ld_next(s1, filename, sizeof(filename));
+                if (t == LD_TOK_EOF) {
+                    error_noabort("unexpected end of file");
+                    return -1;
+                } else if (t == ')') {
+                    break;
+                }
+            }
         } else {
             return -1;
         }