commit f66f04630a180ff03a8480c6a59597a1231975a6
Author:     Quentin Rameau <[email protected]>
AuthorDate: Tue Nov 29 15:14:19 2016 +0100
Commit:     Quentin Rameau <[email protected]>
CommitDate: Tue Nov 29 15:14:19 2016 +0100

    driver: use cc{1,2}-ARCH as default target
    
    With the recent arch changes in scc, we don't use libexec/cc{1,2}
    anymore, so use directly the default ARCH set in config.mk.

diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index 1361e16..7a04c9b 100644
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
@@ -104,14 +104,14 @@ inittool(int tool)
        case CC1: /* FALLTHROUGH */
        case CC2:
                binln = strlen(t->bin);
-               if (arch) {
-                       n = snprintf(t->bin + binln,
-                                    sizeof(t->bin) - binln,
-                                    "-%s", arch);
-                       if (n < 0 || n >= sizeof(t->bin))
-                               die("scc: target tool bin too long");
-                       binln = strlen(t->bin);
-               }
+               if (!arch)
+                       arch = ARCH;
+               n = snprintf(t->bin + binln,
+                            sizeof(t->bin) - binln,
+                            "-%s", arch);
+               if (n < 0 || n >= sizeof(t->bin))
+                       die("scc: target tool bin too long");
+               binln = strlen(t->bin);
 
                if (strlen(t->cmd) + binln + 1 > sizeof(t->cmd))
                        die("scc: target tool path too long");

Reply via email to