scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit f66f04630a180ff03a8480c6a59597a1231975a6
parent 725b8d42e3032d6db0c80b2d8e786d05e4a1ef8b
Author: Quentin Rameau <quinq@fifth.space>
Date:   Tue, 29 Nov 2016 15:14:19 +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.

Diffstat:
Mdriver/posix/scc.c | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git 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");