Ross Burton wrote in
:
|On Tue, 1 Feb 2022 at 14:53, Ross Burton wrote:
|>
|> When I cross-compile s-nail I get a slew of errors:
...
|OK, found it.
|
|My CC has options, as our compiler *needs* a --sysroot argument and we
|pass that via CC to ensure that it is always used.
|
|However, su-make-errors.sh does "${CC}" which means the shell tries to
|find a binary called 'gcc --sysroot=/foo', which doesn't exist. The
|loop has done set -e, so the error is silently absorbed.
|
|The easy fix appears to be to simply remove the quotes around ${CC},
|as they serve no purpose apart from breaking builds where CC has
|arguments.
Thanks for the report.
This fits fine into the proceeding as via (mk/su-find-command.sh:
clearly define space behaviour, 2021-12-16):
#@ _However_, in order to support prefilled variables like "awk='busybox awk'"
#@ spaces in command names found via path search are not supported.
#@ That is to say that we take user-prefilled variable names with spaces as
#@ granted, and actively fail to find commands with spaces ourselfs; like this
#@ users of these functions can simply say: $VAR args, not "$VAR" args.
as well as (mx-test.sh: remove bogus quotation marks, 2021-12-31)
so i happily remove these last occurrances of bogus such.
I am still undecided whether i should / it is possible to pass
$CFLAGS to all invocations of $CC we have. 'Will not forget that
i hope.
Ross Burton wrote in
:
|An observation. This command isn't parallelised:
|
|$ make -j build
|
|This is because it immediately re-calls $(MAKE) in OBJDIR, but doesn't
|pass $(MAKEFLAGS) so the -j is lost.
These should come in via the generated "$(OBJDIR)"/mk-config.mk if
i recall correctly :)
gmake produces warnings like
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make
rule.
make[1]: Entering directory '/tmp/.nail/y'
make[1]: warning: -j4 forced in makefile: resetting jobserver mode.
however, this has been reported years ago, what can i do?
This project uses the de-facto only possibility to use portable
build parallelization with nothing but POSIX make(1), via
indirection and some "tricks" in the top makefile, that is
.NOTPARALLEL:
.WAIT: # Luckily BSD make supports specifying this as target, too
...
all: config .WAIT build
So until now .NOTPARALLEL for GNU make in the top makefile, and
fine control for BSD make via .WAIT. I hope in the future GNU
make will support that, too. The parallelization in the recursive
make via picked up flags from mk-config.mk.
(Unfortunately some make maintainers seem to be pretty bold, yes
even to standstill, if i realize some responses. But i will write
portable makefiles nonetheless.)
Ciao from Germany!
--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)