diff options
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | tools/musl-make.c | 8 |
2 files changed, 7 insertions, 6 deletions
@@ -6,7 +6,7 @@ CC = gcc AR = ar -CFLAGS = -g +CFLAGS = -g -O3 arch = x86_64 @@ -118,8 +118,7 @@ libc.a: $(all_obj) $(AR) rcs $@ $^ $(DESTDIR)$(bindir)/%: tools/% - $(install_cmd) - chmod +x $@ + install -D -m 755 $< $@ $(DESTDIR)$(libdir)/%: % $(install_cmd) diff --git a/tools/musl-make.c b/tools/musl-make.c index 33cc117..054c1b8 100644 --- a/tools/musl-make.c +++ b/tools/musl-make.c @@ -1166,7 +1166,7 @@ static void expand_shell(struct eval_aux *aux, struct eprofile *prof) if (pid == -1) syscall_error("fork"); if (pid == 0) { - char *argv[] = { "/bin/dash", "-c", arg.start, NULL }; + char *argv[] = { "/bin/sh", "-c", arg.start, NULL }; if (dup2(pipefds[1], 1) == -1) syscall_error("dup2"); close(pipefds[1]); @@ -2139,8 +2139,10 @@ static void parse(struct world *world) static int is_assignment(char *arg, char **equal_sign) { char *tmp = strchr(arg, '='); - if (tmp == NULL) + if (tmp == NULL) { + *equal_sign = NULL; return 0; + } *equal_sign = tmp; return 1; } @@ -2401,7 +2403,7 @@ static struct rule_body *find_body(struct world *world, struct str *target, int depth) { int i; - struct rule_body *tmp; + struct rule_body *tmp = NULL; /*printf("FB: %S\n", target);*/ if (rtable_find(&world->rtable, target, &tmp) == 1) return tmp; |