A typical image build will update the dashboard 3500-4500 times. This change
avoids two process forks (cat, wc) per update, and the remaining $(< file) is
faster than $(cat file).
See: https://www.gnu.org/software/bash/manual/html_node/Command-Substitution.html
"
...
Bash performs the expansion by executing command in a subshell environment and replacing
the command substitution with the standard output of the command, with any trailing newlines
deleted. Embedded newlines are not deleted, but they may be removed during word splitting. The
command substitution $(cat file) can be replaced by the equivalent but faster $(< file).
"
Testing indicates var=$(< file) is twice as fast as var=$(cat file).
speed: use O3
size: use Os
default: use O2
The priority order is to use speed if set, then size, and fallback
to default when neither are set.
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
When compiling glibc for cortex-a9, the following errors appears:
cc1: error: switch -mcpu=cortex-a9 conflicts with -march=armv7-a switch [-Werror]
Using mcpu with march and mtune is not recommended and compiler emits
warnings/errors when mismatched.
Due to missing cpp_args and cpp_link_args in meson.conf ninja builds
of projects with C++ code were performed without CPU optimization
flags (-march, -mcpu, -mtune etc). Add these args so C++ code is
built with proper flags.
Signed-off-by: Matthias Reichl <hias@horus.com>