Add a make target that will checks the dependencies of all packages.
This will currently only detect circular dependencies, but more tests
can be added later if need be.
This can then be used in the autobuilders to automatically report
dependency issues.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Currently, we generate the dependency graph in a single command, piping
the stdout of support/scripts/.graph-depends to the stdin of dot.
Unfortunately, this means we can't catch a failure of graph-depends, as
the shell can only treturn the exit code of the last command in a pipe.
Still, we do want to keep the output of graph-depends, and we in fact do
keep it by mean of a tee.
graph-depends has just gained the ability to generate its output to a
file, so we break the pipe in two differnet commands, so we can bail out
on graph-depends errors.
Do that for the two call sites.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
At least with French user's locale HOSTARCH is empty since
'Target' is not present in gcc output.
gcc -v 2>&1
Utilisation des specs internes.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/lto-wrapper
Cible : x86_64-redhat-linux
Override the user's local with LC_ALL=C.
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Commit 7a6b83a211 introduced the skeleton
package, which took over the lib32/lib64 -> lib symlink creation from the
main Makefile.
However, the definition of the LIB_SYMLINK variable did not move along, for
no real reason.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Currently, we set HOSTARCH to the output of `uname -m`. This gives us
the architecture as seen by the running kernel. For example, we would
end up with 'x86_64' for a 64-bit kernel running on an x86_64 processor.
We use that value to determine whether we can run some binary tools,
like our pre-configured external toolchains.
However, one may be running a userland in a different bitness than that
of the running kernel. For example, one may run in a 32-bit chroot, even
though the kernel is running in 64-bit.
Up until recently, this was not an issue because the pre-configured
external toolchains were all requiring an i386 (x86 in Buildroot
parlance).
But since we introduced the latest Linaro toolchains, we now have
toolchains that require a 64-bit userland.
So, when running on a 64-bit kernel, we believe those toolchains are
available, even when the user is running a 32-bit userland. This causes
build failures for our autobuilders, like so:
http://autobuild.buildroot.org/results/9cd/9cdf10ec5b31144b2e03ea09cf128702339895b3/
with the following symptoms:
>>> toolchain-external undefined Configuring
Cannot execute cross-compiler '/home/test/autobuild/instance-3/output/host/opt/ext-toolchain/bin/aarch64-linux-gnu-gcc'
So, instead of relying on the output of `uname -r`, look for the host
gcc and extract the target it was configured to generate code for.
Fixes:
http://autobuild.buildroot.org/results/9cd/9cdf10ec5b31144b2e03ea09cf128702339895b3/ (aarch64)
http://autobuild.buildroot.org/results/888/8889aa7d9fb48370e4760a6edbc6d3ae945f02f2/ (arm)
and many more...
Besides fixing those issues, it will also allow us to add the 64-bit
variants of toolchains when they exist, like the upcoming Codescape
MTI and IMG toolchains for MIPS from Imagination Technologies.
[Peter: use HOSTCC_NOCCACHE]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Currently, the check that packages we build are indeed enabled is done
at the time a package is configured.
This can come quite late in the build process, and does not provide
direct knowledge of the real culprit for the incorrect dependency.
However, we can improve these two issues quite easily, albeit at the
expense of a very slightly more complicated make code.
First, the check can not be done at the time we define the package, i.e.
in the inner-generic-pacakge, because all its dependencies might have
not been parsed yet, so we can't yet know whether it is enabled or not
(because we can't match the package name of the dependency to its
Kconfig variable yet).
But then, we know we have all packages definitions after we scanned the
the bundled packages, kernel, bootloaders and toolchains, as well as the
br2-external tree (if any).
So, at this location, we iterate through the list of enabled packages,
and check that the packages they each depend on are indeed enabled.
This allows us to:
1- do the check very early, before any build action,
2- report on the exact offending package very easily.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The ldconfig handling in the main Makefile is utterly broken, as it
calls the build machine ldconfig to generate the ld.so.cache of the
target. Unfortunately, the format of the ld.so.cache is architecture
specific, and therefore the build machine ldconfig cannot be used
as-is.
This patch therefore simply drops using ldconfig entirely, and removes
/etc/ld.so.conf.d/ from the target skeleton. The idea is that all
libraries that should be loaded by the dynamic linker must be
installed in paths where the dynamic linker searches them by default
(typically /lib or /usr/lib).
This might potentially break a few packages, but the only way to know
is to actually stop handling ldconfig.
In order to be notified of such cases, we add a check in
target-finalize to verify that there is no /etc/ld.so.conf file as
well as no /etc/ld.so.conf.d directory.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Some host packages need a recent gcc version. Add symbols to Config.in
to specify the HOSTCC version. The values are passed through the
environment, and this environment is generated in a new support script.
Also update the documentation to mention the new symbols.
[Thomas: simplify by using only make logic instead of an external
shell script.]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
If RANLIB is set and we're trying to build binutils, binutils will pick
this up and potentially fail to build.
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fixes the following valgrind error (tested on freescale imx6):
valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strcmp
valgrind: in an object with soname matching: ld-linux-armhf.so.3
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld-linux-armhf.so.3
valgrind:
valgrind: Possible fixes: (1, short term): install glibc's debuginfo
valgrind: package on this machine. (2, longer term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standard
valgrind: calling conventions for this platform. The package you need
valgrind: to install for fix (1) is called
Note that we can still strip the dynamic linker, but only strip the
debugging symbols and nothing else.
[Thomas: slightly adjust comment in the code.]
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Dumping our 176164 variables can take quite some time (~12s here). What
takes the most time is sorting the variables (~9s), followed by the
parsing of our Makefiles (~3s), with the actual printing in the noise.
However, sometimes only one or a few variables are needed. For example,
one may want to retrieve the Linux build dir from a post-build hook (to
get the Linux' actual .config after our fixups and check for various
features).
Add the possibility to only dump the variables listed in $(VAR) which
must be passed as a make argument, like so:
$ make -s printvars VARS="LINUX_DIR TOPDIR O"
LINUX_DIR=/home/ymorin/dev/buildroot/O/build/linux-4.3 ($(BUILD_DIR)/$(LINUX_BASE_NAME))
O=/home/ymorin/dev/buildroot/O/. (/home/ymorin/dev/buildroot/O/.)
TOPDIR=/home/ymorin/dev/buildroot/buildroot (/home/ymorin/dev/buildroot/buildroot)
It is also possible to use make-appterns, like:
$ make -s printvars VARS="BUSYBOX_%"
This is much faster (the time is just about the time it takes to parse
our Makefiles, 3s here) and easier to parse.
[Thomas: improve comment above the printvars target.]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
When the target uses a merged /usr setup, gdbserver will only report
paths in /lib to the remote gdb, which in turn will only look for
libraries in staging/lib and never in staging/usr/lib.
So. the merged (or non-merged) /usr setup must be replicated in the
staging.
The best solution where to do so is in the skeleton package, since it
is guaranteed to come before any package that installs things in the
staging, and even before the (internal or external) toolchain as well.
Reported-by: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
distclean is supposed to return the current directory, whether in-tree
or out-of-tree, into pristine conditions, which means we should also
forget about any br2-external tree on distclean.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
One of the selling points for br2-external is to provide a mean to add
new packages. However, it is not supported that a package be defined by
Buildroot and then redefined in a br2-external tree.
This situation may occur without the user noticing or even willing to
redefine the package, for example:
- br2-external is first created against a version of Buildroot
- a package (missing in Buildroot) is added to that br2-external tree
- upstream Buildroot adds this package
- user updates to the new Buildroot
In this case, the result in undefined, and we can't make any guarantee
on the result (working or not).
Add a sanity check so that a package redefinition gets caught.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Arnout Vandecappelle <arnout@mind.be>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
'quiet' variable is set and exported, but it is not used. We can safely
remove it.
This variable is inherited from the Makefile of the Linux kernel, and
is not used in Buildroot.
In support/scripts/mkmakefile, 'quiet' value is checked, but the test
is always true ('quiet' is never set to silent_), so the test can be
removed as well.
Signed-off-by: Cédric Marie <cedric.marie@openmailbox.org>
Reviewed-by: "James Knight" <james.d.knight@live.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Allow the BR2_CCACHE_DIR .config option to be overriden by the
BR2_CCACHE_DIR env variable.
This is useful for big projects where in some cases the developers home
directory might be a NFS mount (slow) and real production builds aren't.
Update documentation accordingly as well.
Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit implements a graph-size target that calls the script of
the same name to generate the graph and CSV files related to package
and file sizes.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
By moving the ccache call to the toolchain wrapper, the following
scenario no longer works:
make foo-dirclean all BR2_CCACHE=
That's a sometimes useful call to check if some failure is perhaps
caused by ccache.
We can enable this scenario again by exporting BR_NO_CCACHE when
BR2_CCACHE is not set, and by handling this in the toolchain wrapper.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Romain Naour <romain.naour@openwide.fr>
Reviewed-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The FOO_SITE/FOO_SOURCE variables usually point to a tarball containing
source code.
For the downloaded external toolchains this is not true, the "source"
tarball actually contains binaries. This is fine for making Buildroot
work, but for legal-info we really want to ship real source code, not
binaries.
Luckily, some (hopefully all) toolchain vendors publish a downloadable
tarball containing the source code counterpart for their binary
packages.
Here we allow the user to declare the URL of this other tarball in the
pair of variables FOO_ACTUAL_SOURCE_TARBALL (by default equal to
FOO_SOURCE) and FOO_ACTUAL_SOURCE_SITE (by default equal to FOO_SITE).
If the "actual source" package can be downloaded from the same
directory as the binary package, then only FOO_ACTUAL_SOURCE_TARBALL
needs to be set.
Note this change is not strictly toolchain-specific: it might be useful
for other packages that happen to ship binaries in the same way.
[Thomas:
- remove "the source code has not been saved" warning that could
never be triggered due to how the conditions were
organized. Discussed with Luca live during the meeting.]
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Some packages, sudo for instance, install .a and .la files in
$(TARGET_DIR)/usr/libexec. These files are not needed on target.
This patch refactors the existing "find" invocations in
target-finalize into a single one removing all .a and .la files from
lib, usr/lib and usr/libexec.
[Thomas: rework to use a single "find" invocation, and adjusted the
commit log accordingly.]
Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The <pkg>-legal-info target is only a component of the top-level
legal-info target, it is not meant to be used alone.
For example, calling twice 'make busybox-legal-info' produces duplicate
entries in licenses.txt and manifest.csv.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Arnout Vandecappelle <arnout@mind.be>
Reviewed-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
After bee5745ccc ("Makefile: don't depend on the umask"), any use
of "make O=<dir>" would leak $O into the enviroment for submakes,
and it's inherited by package makefiles. Some package makefiles have
protections to make sure they don't use the value of $O if it comes from
the enviroment (Linux), but some don't (uClibc).
This caused build failures when using a different output dir.
Fix this by unconditionally unexporting the O variable, since we never
need to have it set in the environment for packages, it should be only
internally used by BR.
Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Commit bee5745c introduced an extra level of 'make' when the umask is
different from 0022. However, when several targets were specified on
the command line, a new make instance would be called for each target.
This introduces a huge performance overhead when many targets are
specified on the command line.
To fix this, use the same approach as used in the mkmakefile script:
an addition target on which the MAKECMDGOALS depend, so that this
target is run only once.
Note that the mkmakefile script contains a special exception for
Makefile, because the Makefile in the output directory is generated.
Since the top-level Makefile is not generated, this exception is not
needed here.
While we're at it, also fix the whitespace in the UMASK assignment.
Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[yann.morin.1998@free.fr: aggregate patches from Arnout and Guido]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The Buildroot release tarballs inadvertently contain a build/docs directory,
containing the manual sources, the generated lists, and manual.text and
manual.pdf (but excluding manual.html).
This directory is populated as $(BUILD_DIR) (==$(O)/build), while O is
set explicitly from the release target to a subdirectory
buildroot-xxxx.yy-git/ which was populated with 'git archive'.
Since the generated manuals are available in docs/manual, which is
also referred to from the README, the build directory is not needed and
should be removed from the release tarball.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Save MAKE_VERSION as RUNNING_MAKE_VERSION since this is later clobbered
by the make package.
It will be used by the webkitgtk24 package to check for older make
versions which have a bug building it with parallel jobs (it hangs).
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Create a proper package for the skeleton.
The main Makefile is modified to remove the skeleton support.
The 'dirs' target, will create the $(TARGET_DIR).
The file 'output/target/.root' doesn't exists anymore, as there's no
Make rule to statisfy.
The infrastructure are modified to filter host-skeleton.
It's needed becauses the host-dependencies are derived from the
dependencies of the target package where 'host-' is preprended to the
depedency name.
In the pkg-generic we add skeleton as a dependency to every package.
The whole system/system.mk is now removed at the profit of
package/skeleton/skeleton.mk
[Thomas:
- rebase on top of master and fix some minor conflicts
- remove the 'select BR2_PACKAGE_SKELETON' in
BR2_ROOTFS_SKELETON_DEFAULT and BR2_ROOTFS_SKELETON_CUSTOM, since
anyway the skeleton package is always enabled.
- fixup a few mistakes in the getty handling due to misnamed
variables.]
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The /usr/share/X11/locale/locale.dir file is needed by libX11.
Removing it breaks locale support in X11. However, make removes
not only directories but also all files, which are not listed
in the BR2_ENABLE_LOCALE_WHITELIST.
This re-creates locale.dir database file where needed.
Signed-off-by: Valentine Barshak <gvaxon@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Arnout: use a separate loop, and add some explanatory comments]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Since the man paths have been removed, it is no longer necessary to
grep them out and the loop can be simplified.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
These directories are going to be removed anyway, so no point purging
their locales.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
We use 'rsync -a' to copy the skeleton and overlays, so the target ends
up with the exact same permissions as on the repo. The problem is we
don't track these permissions, since Git doesn't allow for that (except
for the exec bit). This means users with different umasks at the time of
cloning could end up with different target permissions.
Fix this by using --chmod on rsync calls so we don't depend on the
current permission set for the skeleton and overlays. We do depend on
the exec bit, but that's fine since that one is tracked by Git.
Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Some packages and BR itself create files and directories on the target
with cp/mkdir/etc which depend on the umask at the time of building.
To fix this, use a trick inside the Makefile which wraps all rules when
the umask is not 0022. This sets the umask at the top level, and then
the building process continues as usual.
[Thomas: add --no-print-directory, as suggested by Arnout.]
Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Instead of doing a removal of the completion file package per package,
do it all at the finalize stage so it's done once and for all.
Note: This fixes an issue with systemd where passing a --bashcompletiondir
or --zshcompletiondir would be evaluated to '.' by the autotools macro.
This would create a 'target./' directory.
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Add aarch64_be support. Note that CONFIG_CPU_BIG_ENDIAN should be
defined in kernel config when building a big endian kernel.
Signed-off-by: Zhang Jian(Bamvor) <bamvor.zhangjian@huawei.com>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The boost and jack2 packages fail to build when PARALLEL_JOBS is empty
so instead of using an empty PARALLEL_JOBS don't use it in the MAKE
variable when top-level parallel make is being used.
To simplify the use of top-level parallel make, check the MAKEFLAGS
variable to know automatically if the -j option is being used, also use
the "=" operator instead of the ":=" operator because the MAKEFLAGS
variable can be checked only in a "recursively expanded variable".
The "override" keyword must be used in order to change the automatic
variable "MAKE".
When the top-parallel make is being used the sub-make are called without
specifying the "-j" option in order to let GNU make share the job slots
specified in the top make. This is done because GNU make is able
to share the job slots available between each instance of make so if you
want to increase the number of jobs you just need to increase the <jobs>
value in the top make -j<jobs> command.
If we specify the -j<jobs> option in each instance of make, it is less
efficient, e.g. in a processor with 8 cores we specify -j9 in each instance:
the number of processes goes up to 81 because each sub-make can execute
9 processes. The excessive number of processes is not a good thing
because in my tests even -j16 is slower than -j9.
Instead if we don't specify the -j<jobs> option in the sub-make, the top
make share the job slots automatically between each instance, so the
number of process in this examples goes up to 9 that is faster than
using up to 81 processes.
e.g. when the -j3 option is specified only in the top make:
possible state n. 1:
process 1 - <packagea>-build
process 2 - <packagea>-build
process 3 - <packagea>-build
possible state n. 2:
process 1 - <packagea>-extract
process 2 - <packageb>-configure
process 3 - <packagec>-build
possible state n. 3:
process 1 - <packagea>-build make -j1
process 2 - <packageb>-build make -j1
process 3 - <packagec>-build make -j1
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
CMake verbose mode is based on VERBOSE environment variable.
* If VERBOSE is exported but empty, only "Dependee ... is newer than
depender ..." messages are shown.
* If VERBOSE is exported and set (whatever the value), all compilation
commands are shown.
VERBOSE is currently systematically exported by Buildroot, even if it
is empty, in the root Makefile, which implies that the "light" verbose
mode - with "Dependee ... is newer than depender ..." messages - is
always enabled.
VERBOSE should only be exported when V=1, which is the standard way to
enable verbose mode in Buildroot.
Signed-off-by: Cédric Marie <cedric.marie@openmailbox.org>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
BR2_DEFCONFIG should not be present in saved defconfig file.
The use case is:
make qemu_arm_versatile
make savedefconfig BR2_DEFCONFIG=my_custom_defconfig
BR2_DEFCONFIG is set in my_custom_defconfig with an absolute path
to qemu_arm_versatile (value present in .config) and set in
my_custom_defconfig as it is different from default mentioned in
config.in (default is BR2_DEFCONFIG from environment).
On savedefconfig recipe, simply remove BR2_DEFCONFIG from generated file
[Peter: fixup typos and use SED as noted by Arnout]
Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>