shithub: mc

Download patch

ref: 7ab08eebe99f9f9da5d316a401bcef27e0e5f180
parent: edf6844aa3b02b92e4b93c8078cb85ce52b24e27
author: Ori Bernstein <[email protected]>
date: Sun Dec 21 17:47:26 EST 2014

Make myrbuild's assembler command respect configure.

--- a/myrbuild/myrbuild.c
+++ b/myrbuild/myrbuild.c
@@ -25,7 +25,7 @@
 
 /* binaries we call out to */
 char *mc = "6m";
-char *as = "as";
+char *as[] = Asmcmd;
 char *ar = "ar";
 char *ld = "ld";
 char *muse = "muse";
@@ -312,10 +312,10 @@
         swapsuffix(obj, sizeof obj, file, ".s", ".o");
         if (isfresh(file, obj))
             goto done;
-        extra[nextra++] = "-g";
-        extra[nextra++] = "-o";
+        for (i = 1; as[i]; i++)
+            extra[nextra++] = as[i];
         extra[nextra++] = obj;
-        gencmd(&cmd, &ncmd, as, file, extra, nextra);
+        gencmd(&cmd, &ncmd, as[0], file, extra, nextra);
         run(cmd);
     }
 done:
@@ -502,7 +502,7 @@
             case 's': ldscript = ctx.optarg; break;
             case 'S': genasm = 1; break;
             case 'C': mc = ctx.optarg; break;
-            case 'A': as = ctx.optarg; break;
+            case 'A': as[0] = ctx.optarg; break;
             case 'M': muse = ctx.optarg; break;
             case 'L': ld = ctx.optarg; break;
             case 'R': ar = ctx.optarg; break;