Commit Graph

71 Commits

Author SHA1 Message Date
Bernd Kuhls
0911cd9d86 package/ccache: bump version to 4.10.2
Release notes: https://ccache.dev/releasenotes.html#_ccache_4_10_2

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-08-23 18:41:06 +02:00
Heiko Thiery
23c21c6f29 package/pkg-generic.mk: add variable to skip ccache dependency
As more and more packages are required to build the host ccache package
and therefore they has to be filtered out for ccache dependency the list
growed up.

By adding the variable <PKG>_ADD_CCACHE_DEPENDENCY with the default
value to 'yes' we can remove that dependency for each package that is
needed by ccache by setting the value to 'no'. This can be done  in the
package makefile instead of tracking the list in the core pkg-generic.mk file.

This behavior is similar to the skeleton and toolchain dependency.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
[Arnout: move the BR2_CCACHE condition to the dependency itself]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-07-13 22:21:30 +02:00
Heiko Thiery
c19ba0dfcd package/ccache: bump version to 4.10.1
https://ccache.dev/releasenotes.html#_ccache_4_10_1

This version requires use the system dependencies of host-blake3 and
host-xxhash. The bundled version is not able to build/download.

The ZSTD_FROM_INTERNET and HIREDIS_FROM_INTERNET variables are replaced
in the ccache build system with DEP_ZSTD and DEP_HIREDIS in version 4.10.
For the sake of completeness, all DEP_<xxx> variables were set for external
dependencies.

The generation of documentation has also been switched off.

The LICENSE.adoc was updated regarding the bundled libraries version used
like cpp-httplib, BLAKE3, fmt, nonstd-span, cxxurl.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-07-13 22:21:26 +02:00
Julien Olivain
197be7ed87 package/ccache: always disable developer mode
Ccache CMake build system has some conditions that automatically
enables a developer mode (sets CCACHE_DEV_MODE=ON). See [1].

More specifically, if CCACHE_DEV_MODE is unset AND the environment
variable "CI" is set, CCACHE_DEV_MODE is set to "ON".

This situation can happen when Buildroot builds are executed in
Jenkins jobs, for example. Since Buildroot does not set
CCACHE_DEV_MODE and Jenkins sets the "CI" environment variable,
this ccache developer mode can be enabled in an unexpected way
for the Buildroot user. For example, it happened that a Jenkins build
breaks, while the build with the same configuration in the user
session is working.

One of the effects of enabling this ccache developer mode, is to treat
compiler warnings as errors, see [3]. This can lead to build error,
depending on the ccache version and the host compiler being used.

This behavior can be reproduced and observed, with commands:

    cat > .config <<EOF
    BR2_aarch64=y
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_CCACHE=y
    BR2_PACKAGE_BUSYBOX=y
    EOF
    make olddefconfig

    make clean
    make host-ccache

Outputs:

    ...
    -- Ccache version: 4.9.1
    -- Ccache dev mode: OFF
    -- Setting CMAKE_BUILD_TYPE to Release as none was specified.
    ...

Whereas:

    make clean
    CI=true make host-ccache

Outputs:

    ...
    -- Ccache version: 4.9.1
    -- Ccache dev mode: ON
    -- Setting CMAKE_BUILD_TYPE to Debug as none was specified.
    ...

For a failure example: on Fedora 40 with host gcc 14.1.1, Buildroot at
tag 2024.02 has ccache 4.8.2. Host ccache can fail, when building with
"CI=true make host-ccache" with output:

    /buildroot/output/build/host-ccache-4.8.2/src/third_party/fmt/core.h:3119:44:   in 'constexpr' expansion of 'fmt::v8::make_format_args<>(args#0, args#1)'
    /buildroot/output/build/host-ccache-4.8.2/src/third_party/fmt/core.h:1706:15: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
     1706 |   const auto& arg = arg_mapper<Context>().map(std::forward<T>(val));
          |               ^~~

This commit sets CCACHE_DEV_MODE=OFF to make the ccache behavior more
deterministic in Buildroot, independently of being used in a CI tool
or not.

[1] https://github.com/ccache/ccache/blob/v4.9.1/CMakeLists.txt#L56
[2] https://github.com/jenkinsci/jenkins/blob/jenkins-2.459/core/src/main/java/jenkins/model/CoreEnvironmentContributor.java#L43
[3] https://github.com/ccache/ccache/blob/v4.9.1/cmake/StandardWarnings.cmake#L5

Reported-by: Xavier Roumegue <xroumegue@gmail.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-05-29 08:50:04 +02:00
Bernd Kuhls
8dd4917d86 package/ccache: bump version to 4.9.1
Removed patch which is included in this release.

Updated license hash due to various version and copyright year bumps:
https://github.com/ccache/ccache/commits/master/LICENSE.adoc

Release notes: https://ccache.dev/releasenotes.html#_ccache_4_9_1

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Tested-by: Marcus Hoffman <buildroot@bubu1.eu>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-04-07 16:47:38 +02:00
Marcus Hoffmann
aa443e8251 package/ccache: disable building tests
Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-02-29 17:05:59 +01:00
Bernd Kuhls
e34063c5be package/ccache: fix build with gcc 12.3
Since the bump of ccache from 4.7.4 to 4.8.2 in Buildroot commit
1db3f0f844 ("package/ccache: bump
version to 4.8.2"), it started failing to build on machines that use
gcc 12.3, due to a bug in gcc:

/home/buildroot/autobuild/instance-0/output-1/build/host-ccache-4.8.2/src/storage/local/LocalStorage.cpp:701:24:   required from here
/home/buildroot/autobuild/instance-0/output-1/build/host-ccache-4.8.2/src/Logging.hpp:33:7: internal compiler error: Segmentation fault
   33 |       Logging::log(std::string_view(message_));                                \
      |       ^~~~~~~

Upstream ccache has committed a workaround to avoid this compiler bug,
which we backport in this commit.

Fixes:

  http://autobuild.buildroot.net/results/cd341365d1c429bfca505a742e86b3090897db23/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-08-06 14:22:43 +02:00
Bernd Kuhls
6508581652 package/ccache: fix license hash
Buildroot commit 1db3f0f844 failed to
update the license hash which is needed due to various commits in 2023
updating package versions and copyright year:
https://github.com/ccache/ccache/commits/master/LICENSE.adoc

Fixes:
http://autobuild.buildroot.net/results/41b/41b3427e30b6e44352fc78b27360fdadf9e46393/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2023-06-19 21:36:37 +02:00
Bernd Kuhls
1db3f0f844 package/ccache: bump version to 4.8.2
Release notes: https://ccache.dev/releasenotes.html

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-06-16 10:28:20 +02:00
James Hilliard
7087e5286d package/ccache: bump to version 4.7.4
Migrate to cmake package infrastructure.

Add new host-hiredis host-zstd dependencies.

Add new ccache dependency exclusions to pkg-generic.

Migrate HOST_CCACHE_PATCH_CONFIGURATION to handle updated
source files/format.

License hashes changed due to migrating urls to https:
a0f32f161f

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-21 21:16:19 +01:00
Francois Perrad
ca9ee3d654 package/ccache: bump to version 3.7.12
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-10-06 21:00:13 +02:00
Francois Perrad
8519994cde package/ccache: bump to version 3.7.11
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-09-07 22:50:55 +02:00
Asaf Kahlon
4b943562b4 package/ccache: bump to version 3.7.10
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-06-22 22:44:48 +02:00
Bernd Kuhls
4e47e0e179 package/ccache: bump version to 3.7.9
Release notes: https://ccache.dev/releasenotes.html#_ccache_3_7_9

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-04-15 21:42:29 +02:00
Asaf Kahlon
0e6748ac51 package/ccache: bump to version 3.7.8
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-03-18 22:43:07 +01:00
Asaf Kahlon
7b54d799cf package/ccache: bump to version 3.7.7
Licese was change with a year bump.

Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-01-09 18:26:00 +01:00
Bernd Kuhls
503fd718c7 package/ccache: bump version to 3.7.5
Release notes:
https://ccache.dev/releasenotes.html#_ccache_3_7_5

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-10-27 10:18:16 +01:00
Asaf Kahlon
f106a31654 package/ccache: bump to version 3.7.4
- Update CCACHE_SITE to github.

- The hash of the license file is updated. There were two changes:

  * The reference to the credits.html file changed from
    ccache.samba.org to ccache.dev

  * The MIT license text for minitrace.[ch] was added, but it doesn't
    change the fact that the whole is under GPL-3.0, and we anyway
    already had "GPL-3.0, others" in CCACHE_LICENSE

Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
[Thomas: update the license file hash]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-09-13 22:24:14 +02:00
Asaf Kahlon
1fb7b6b2be ccache: bump to version 3.6
License update - a year bump.

Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-01-15 21:21:25 +01:00
Asaf Kahlon
8d466a9d9f ccache: bump to version 3.5
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-10-20 19:31:17 +02:00
Asaf Kahlon
d6d51c8a23 ccache: bump to version 3.4.3
Update LICENSE.adoc: change was zlib and year bump.

Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-25 23:30:48 +02:00
Asaf Kahlon
b743cb408a ccache: bump to version 3.4.2
Update license info, and remove the patch since it's already on upstream.

Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-25 19:34:06 +02:00
Thomas Petazzoni
0283d7ee39 package/pkg-generic: handle host-ccache as a regular dependency
This moves the host-ccache dependency handling from
DEPENDENCIES_HOST_PREREQ to a proper package dependency. When
BR2_CCACHE=y, we add host-ccache as a regular dependency of all
packages except:

 - The extractor packages host-tar, host-xz and host-lzip

 - host-ccache itself

 - host-skeleton, because all packages depend on it

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-03-25 17:49:05 +02:00
Mark Hirota
01955b5b6e ccache: bump to version 3.3.5
(Likely) fixes #10536

https://bugs.buildroot.org/show_bug.cgi?id=10536

Signed-off-by: Mark Hirota <markhirota@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-01-27 10:04:52 +01:00
Peter Korsgaard
bdca0d0581 ccache: make default host-ccache cache dir fit for multi-user setups
While building I noticed:

>>> host-ccache 3.3.4 Building
conf.c: In function 'conf_create':
conf.c:314:2: warning: too many arguments for format [-Wformat-extra-args]
  conf->cache_dir = format("/home/peko/.buildroot-ccache", get_home_directory());
  ^

As host-ccache gets installed into $(HOST_DIR) and is part of the SDK,
hardcoding the build user homedir isn't really nice for the relocatable
SDK feature (or simply for a SDK used by multiple users).

As the warning shows, CCache replaces "%s" with the current user home
directory, so rewrite BR_CACHE_DIR to use this feature if it begins with
$HOME.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2017-07-08 20:32:04 +02:00
Rahul Bedarkar
337aa51f3f boot, package: use SPDX short identifier for GPLv3/GPLv3+
We want to use SPDX identifier for license string as much as possible.
SPDX short identifier for GPLv3/GPLv3+ is GPL-3.0/GPL-3.0+.

This change is done using following command.
find . -name "*.mk" | xargs sed -ri '/LICENSE( )?[\+:]?=/s/\<GPLv3\>/GPL-3.0/g'

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-01 15:17:59 +02:00
Gustavo Zacarias
64da2fd259 ccache: bump to version 3.3.4
Switch download URL to avoid a redirect.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-02-26 15:00:08 +01:00
Brandon Maier
da8584d2ae ccache: Patch to fix toolchain-wrapper's --sysroot
ccache doesn't rewrite the --sysroot base_dir from toolchain-wrapper
correctly. Resulting in a large number of cache misses when building
from different base directories.

A fix has already been accepted to the ccache upstream[1], but won't be
released until ccache 3.4. (Was noted as an improvement, so unsure
of the 3.4 release timing)

[1] https://github.com/ccache/ccache/pull/132

Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-01-27 21:57:23 +13:00
Jörg Krause
2befc2c736 package/ccache: bump to version 3.3.3
Note, that version 3.3.3 of ccache fixes a bug [1] where the Linux
kernel image is the same even after changing the source code and
rebuilding it.

[1] https://github.com/ccache/ccache/issues/136

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-11-08 09:37:16 +01:00
Gustavo Zacarias
b28f867c06 ccache: bump to version 3.3.2
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-05 09:53:01 +02:00
Gustavo Zacarias
b644b9c35b ccache: bump to version 3.3.1
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-09-15 11:55:54 +02:00
Gustavo Zacarias
ca6811fe84 ccache: bump to version 3.3
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-08-29 23:21:22 +02:00
Gustavo Zacarias
a3479d9fa5 ccache: bump to version 3.2.5
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-19 21:16:58 +02:00
Gustavo Zacarias
e0ef9c13eb ccache: bump to version 3.2.4
Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-10-31 09:47:14 +01:00
Gustavo Zacarias
6ef65bb8ae ccache: bump to version 3.2.3
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-10-07 12:31:36 +02:00
Arnout Vandecappelle
f4682cf933 ccache: use mtime for external toolchain, CONF_OPTS for internal toolchain
Our current ccache disables hashing of the compiler executable itself,
because using the default 'mtime' doesn't work in buildroot: we always
rebuild the compiler, so the mtime is always different, so the cache
always misses.

However, in the current situation, if a user changes the compiler
configuration (which would result in the compiler generating different
object files than before) and does 'make clean all', ccache may in fact
reuse object files from the previous run. This rarely gives problems,
because
(1) the cache expires quite quickly (it's only 1GB by default),
(2) radically changing compiler options will cause cache misses because
    different header files are used,
(3) many compiler changes (e.g. changing -mtune) have little practical
    effect because the resulting code is usually still compatible,
(4) we currently don't use CCACHE_BASEDIR, and almost all object files
    will contain an absolute path (e.g. in debug info), so when
    building in a different directory, most of it will miss,
(5) we do mostly build test, and many of the potential problems only
    appear at runtime.
Still, when ccache _does_ use the wrong cached object files, the
effects are really weird and hard to debug. Also, we want reproducible
builds and obviously the above makes builds non-reproducible. So we
have a FAQ entry that warns against using ccache and tells the user to
clear the cache in case of problems.

Now that ccache is called from the toolchain wrapper, it is in fact
possible to at least use the 'mtime' compiler hash for the external
toolchain and for the host-gcc. Indeed, in this case, the compiler
executable comes from a tarball so the mtime will be a good reference
for its state. Therefore, the patch (sed script) that changes the
default from 'mtime' to 'none' is removed.

For the internal toolchain, we can do better by providing a hash of
the relevant toolchain options. We are only interested in things that
affect the compiler itself, because ccache also processes the header
files and it doesn't look at libraries because it doesn't cache the
link step, just compilation. Everything that affects the compiler
itself can nicely be summarised in $(HOST_GCC_FINAL_CONF_OPTS). Of
course, also the compiler source itself is relevant, so the source
tarball and all the patches are included in the hash. For this purpose,
a new HOST_GCC_XTENSA_OVERLAY_TAR is introduced.

The following procedure tests the ccache behaviour:

 Use this defconfig:
BR2_arm=y
BR2_CCACHE=y

 make
 readelf -A output/build/uclibc-1.0.6/libc/signal/signal.os
-> Tag_CPU_name: "ARM926EJ-S"

 Now make menuconfig, change variant into BR2_cortex_a9

 make clean; make
 readelf -A output/build/uclibc-1.0.6/libc/signal/signal.os
-> Tag_CPU_name: "ARM926EJ-S"
 should be "Cortex-A9"

After this commit, it is "Cortex-A9".

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Danomi Manchego <danomimanchego123@gmail.com>
Cc: Károly Kasza <kaszak@gmail.com>
Cc: Samuel Martin <s.martin49@gmail.com>
Cc: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-10-04 18:22:21 +02:00
Karoly Kasza
67524ba4e8 package/ccache: bump to version 3.2.2
Bump ccache to minor version 3.2.2.
Also changed download URL to https.

Signed-off-by: Karoly Kasza <kaszak@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-06-04 15:28:22 +02:00
Karoly Kasza
83c8fae3cd package/ccache: bump to version 3.2.1
Bump ccache from v.3.1.x to v.3.2.x.
All functionality remained the same.
 - Configure now accepts a parameter to use ccache's internal zlib.
 - conf.c was introduced and some settings were moved from ccache.c,
   with minor changes.
 - The PATCH_CONFIGURATION hook was moved from POST_CONFIGURE to
   POST_PATCH, as patching files should be done there, before calling
   the configure script.

Signed-off-by: Karoly Kasza <kaszak@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-04-26 19:17:21 +02:00
Jerzy Grzegorek
f3b44101d3 ccache: fix the indentation
Commit "packages: indentation cleanup" broke the build of master.
This commit reverse the patch on just ccache package and fix that issue.

Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-03-31 23:36:55 +02:00
Jerzy Grzegorek
bd8c733fb4 packages: indentation cleanup
This commit doesn't touch infra packages.

Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-03-31 13:57:41 +02:00
Karoly Kasza
e0fe88ea2a package/ccache: add hash file
Signed-off-by: Karoly Kasza <kaszak@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-03-29 15:18:19 +02:00
Karoly Kasza
b1b3f49e84 package/ccache: bump version to 3.1.11
Signed-off-by: Karoly Kasza <kaszak@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-03-29 14:54:50 +02:00
Thomas De Schampheleire
f268f7131b .mk files: bulk aligment and whitespace cleanup of assignments
The Buildroot coding style defines one space around make assignments and
does not align the assignment symbols.

This patch does a bulk fix of offending packages. The package
infrastructures (or more in general assignments to calculated variable
names, like $(2)_FOO) are not touched.

Alignment of line continuation characters (\) is kept as-is.

The sed command used to do this replacement is:
find * -name "*.mk" | xargs sed -i \
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*$#\1 \2#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\]\+\)$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\ \t]\+\s*\\\)\s*$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\(\s*\\\)#\1 \2\3#'

Brief explanation of this command:
    ^\([A-Z0-9a-z_]\+\)     a regular variable at the beginning of the line
    \([?:+]\?=\)            any assignment character =, :=, ?=, +=
    \([^\\]\+\)             any string not containing a line continuation
    \([^\\ \t]\+\s*\\\)     string, optional whitespace, followed by a
                            line continuation character
    \(\s*\\\)               optional whitespace, followed by a line
                            continuation character

Hence, the first subexpression handles empty assignments, the second
handles regular assignments, the third handles regular assignments with
line continuation, and the fourth empty assignments with line
continuation.

This expression was tested on following test text: (initial tab not
included)

	FOO     = spaces before
	FOO     =   spaces before and after
	FOO	= tab before
	FOO	  = tab and spaces before
	FOO =	tab after
	FOO =	   tab and spaces after
	FOO =   	spaces and tab after
	FOO =    \
	FOO = bar \
	FOO = bar space    \
	FOO   =		   \
	GENIMAGE_DEPENDENCIES   = host-pkgconf libconfuse
	FOO     += spaces before
	FOO     ?=   spaces before and after
	FOO     :=
	FOO     =
	FOO	=
	FOO	  =
	FOO =
	   $(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C
	AT91BOOTSTRAP3_DEFCONFIG = \
	AXEL_DISABLE_I18N=--i18n=0

After this bulk change, following manual fixups were done:
- fix line continuation alignment in cegui06 and spice (the sed
  expression leaves the number of whitespace between the value and line
  continuation character intact, but the whitespace before that could have
  changed, causing misalignment.
- qt5base was reverted, as this package uses extensive alignment which
  actually makes the code more readable.

Finally, the end result was manually reviewed.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Cc: Yann E. Morin <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-07 15:00:28 +02:00
Thomas De Schampheleire
aaffd209fa packages: rename FOO_CONF_OPT into FOO_CONF_OPTS
To be consistent with the recent change of FOO_MAKE_OPT into FOO_MAKE_OPTS,
make the same change for FOO_CONF_OPT.

Sed command used:
   find * -type f | xargs sed -i 's#_CONF_OPT\>#&S#g'

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-04 18:54:16 +02:00
Danomi Manchego
dd79f2dfae ccache: provide capability to do initial ccache setup
For example, if your project is known to require more space than the
default max cache size, then you might want to increase the cache size
to a suitable amount using the -M (--max-size) option.

The string you specify here is passed verbatim to ccache.  Refer to
ccache documentation for more details.

These initial settings are applied after ccache has been compiled.

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-06-14 20:00:35 +02:00
Danomi Manchego
d93a0b4029 ccache: change default cache directory path to match config setting
Commit 433290761f changed the hard-coded
ccache directory location to use BR_CACHE_DIR (then BUILDROOT_CACHE_DIR),
which is exported by Makefile based on the BR2_CCACHE_DIR config option.
This allowed the cache location to be changed on-the-fly by setting a
"make" command line variable, but left the default location of ccache's
normal default at "$HOME/.ccache".  Since this location does not match the
default for BR2_CCACHE_DIR, it is basically almost never correct, so
direct invocation of ccache outside of the buildroot Makefile, such as for
increasing the cache size, becomes cumbersome.

This patch changes the last-ditch cache location from "$HOME/.ccache" to
the BR_CCACHE_DIR value defined when host-ccache is configured.  Note that
the ability to later override the cache location by using a BR_CACHE_DIR
command line variable is left intact.

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-06-14 19:59:07 +02:00
Dan Moulding
ffe3540efa ccache: Make the cache directory after ccache is built
This ensures that the cache directory (and all of its ancestor
directories) exist. This is a nice thing to do because, if the parent
of the cache directory doesn't exist, then ccache will complain that
it cannot create the cache directory, causing the build to fail.

[Peter: drop BR2_CCACHE conditional, use POST_INSTALL hook]
Signed-off-by: Dan Moulding <dan.moulding@rackwareinc.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-03-23 20:50:46 +01:00
Thomas De Schampheleire
831624c4c4 ccache: remove deprecated target package
The ccache target package has been deprecated since 2013.02 and thus can be
removed in 2014.02. This does not change anything about host ccache (used
for speeding up builds).

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-08 23:33:43 +01:00
Arnout Vandecappelle
e7ab4b49f4 ccache: replace BUILDROOT_CACHE_DIR with BR_CACHE_DIR.
To make the naming consistent (qstripped variant of a config option
should be named BR_XXX).

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-05 12:07:19 +01:00
Thomas De Schampheleire
ba4ad9d27c deprecated handling: introduce BR2_DEPRECATED_SINCE_xxxx_xx
In order to keep better track of when a feature got deprecated, and hence
when it can be removed, a new set of symbols BR2_DEPRECATED_SINCE_xxxx_xx is
introduced. These symbols are automatically selected when BR2_DEPRECATED is
selected, and thus are transparent to the user.
A deprecated feature will no longer depend on BR2_DEPRECATED directly, but
rather on the appropriate BR2_DEPRECATED_SINCE_xxxx_xx. If that symbol does
not yet exist, it has to be created in Config.in.
When removing a deprecated feature, one should also check whether this was
the last feature using the BR2_DEPRECATED_SINCE_xxxx_xx symbol, in which
case the latter can be removed from Config.in.

A followup patch will make sure the overview is added to the list of
deprecated features in the manual, so that a buildroot core developer can
easily determine which features to remove in a given development cycle.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-10 15:03:53 +01:00