[hackers] [scc] driver: use cc{1,2}-ARCH as default target || Quentin Rameau
commit f66f04630a180ff03a8480c6a59597a1231975a6
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Tue Nov 29 15:14:19 2016 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
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
_AT_@ -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");
Received on Tue Nov 29 2016 - 15:18:50 CET
This archive was generated by hypermail 2.3.0
: Tue Nov 29 2016 - 15:24:16 CET