summaryrefslogtreecommitdiffstats
path: root/support/dependencies
Commit message (Collapse)AuthorAgeFilesLines
* dependencies: correct dependencies for top-level parallel buildArnout Vandecappelle (Essensium/Mind)2018-01-081-0/+2
| | | | | | | | | | | | | | | | | | | | Commit 4932c8a7cc94277b3d53cecd935f725b91cfa9fe introduced the core-dependencies target to make sure that the dependencies.sh script runs before we attempt to compile any host tool, so that the absence of a compiler is properly detected. However, this relied on the left-to-right evaluation of dependencies. This will no longer be true when we enable top-level parallel build. Fix this by letting DEPENDENCIES_HOST_PREREQ depend on core-dependencies. Note that it is not possible to remove the dependencies <- core-dependencies. Indeed, it is possible that DEPENDENCIES_HOST_PREREQ is completely empty, and in that case we still need to check core-dependencies. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core-dependencies: remove unneeded HOSTCCArnout Vandecappelle (Essensium/Mind)2018-01-081-4/+3
| | | | | | | | | | | | | dependencies.sh uses HOSTCC_NOCCACHE directly, and this variable is exported from the top-level Makefile, so there is no need to pass HOSTCC to it. HOSTCC is not used at all in dependencies.sh. Thus, we also no longer need to apply the HOSTCC override for core-dependencies. The core-depencies rule doesn't use HOSTCC or HOSTCXX. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* dependencies: always use HOSTCC_NOCACHE for DEPENDENCIES_HOST_PREREQAlfredo Alvarez Fernandez2017-10-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Currently, HOSTCC and HOSTCXX are set to their _NOCACHE variants in the 'dependencies' target. This is needed because at that time, ccache is not built yet - host-ccache is one of the dependencies. However, because this override is only specified for the 'dependencies' target (and thereby gets inherited by its dependencies), the override is only applied when the package is reached through the 'dependencies' target. This is not the case when one of DEPENDENCIES_HOST_PREREQ is built directly from the command line, e.g. when doing 'make host-ccache'. So in that case, ccache will be built with ccache... which fails of course. To fix this, directly apply the override to the DEPENCIES_HOST_PREREQ targets. Note that this only fixes the issue for 'make host-ccache', NOT for e.g. 'make host-ccache-configure'. Signed-off-by: Alfredo Alvarez Fernandez <alfredo.alvarez_fernandez@nokia.com> [Arnout: improve commit message] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/binArnout Vandecappelle2017-07-054-4/+4
| | | | | | | | | | | Since things are no longer installed in $(HOST_DIR)/usr, the callers should also not refer to it. This is a mechanical change with git grep -l '$(HOST_DIR)/usr/bin' | xargs sed -i 's%$(HOST_DIR)/usr/bin%$(HOST_DIR)/bin%g' Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core: add "cmake3" to the list of cmake candidatesCarlos Santos2017-06-241-1/+1
| | | | | | | | | This is useful on CentOS 7, whose "cmake" utility corresponds to version 2.8.12, which is too old for Buildroot. Signed-off-by: Carlos Santos <casantos@datacom.ind.br> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core: allow having a list of "cmake" candidatesCarlos Santos2017-06-241-3/+4
| | | | | | | | | | | | | | Add the BR2_CMAKE_CANDIDATES variable, containing a list of candidates to check and use as BR2_CMAKE, if possible. This allows using "cmake3" on CentOS 7, whose default cmake corresponds to version 2.8.12. Example: $ make BR2_CMAKE_CANDIDATES="cmake cmake3" Signed-off-by: Carlos Santos <casantos@datacom.ind.br> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core: allow check-host-cmake.sh to try several candidatesCarlos Santos2017-06-241-35/+41
| | | | | | | | | | | | | | | | | | | This is useful on CentOS 7 whose "cmake" package provides cmake 2.8.12, which is too old, but the "cmake3" package (from EPEL) provides version 3.6.3, which is satisfactory. Examples: $ sh support/dependencies/check-host-cmake.sh 2.8 cmake cmake3 /usr/bin/cmake $ sh support/dependencies/check-host-cmake.sh 3.1 cmake cmake3 /usr/bin/cmake3 $ sh support/dependencies/check-host-cmake.sh 3.8 cmake cmake3 (nothing) Signed-off-by: Carlos Santos <casantos@datacom.ind.br> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core: reverse the argument order in check-host-cmakeCarlos Santos2017-06-242-3/+3
| | | | | | | | | Pass the minimal version before the program name. In a later change the script will become able to test a list of candidates. Signed-off-by: Carlos Santos <casantos@datacom.ind.br> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/dependencies: check PATH does not carry a \nYann E. MORIN2017-06-081-0/+12
| | | | | | | | | | | | | | | | ... otherwise it fails spectacularly as soon as PATH is referenced in a package rule (i.e. very soon, fortunately): >>> host-lzip 1.18 Downloading /bin/bash: -c: line 0: unexpected EOF while looking for matching `"' /bin/bash: -c: line 1: syntax error: unexpected end of file Fixes # 9886. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Ciro Santilli <ciro.santilli@gmail.com> [Thomas: fix typo in message, use tabs for indentation.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Revert "dependencies/cmake: blacklist cmake 3.7"Yann E. MORIN2017-03-011-8/+0
| | | | | | | | | | This reverts commit 4422eca2d418e2b817b419ff6c4c62f7f4cb7871. We now have a workaround for the RPATH issue introduced in 3.7, so we can use it again. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* dependencies/cmake: blacklist cmake 3.7Yann E. MORIN2017-02-281-0/+8
| | | | | | | | | | | | | | | | | cmake-3.7 has a bug in how it handles rpath, linking with libraries from the host. Until we completely understand the issue, just blacklist cmake-3.7. The issue has been reported upstream: http://public.kitware.com/pipermail/cmake/2017-February/064970.html Reported-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Jörg Krause <joerg.krause@embedded.rocks> Cc: Ben Boeckel <mathstuf@gmail.com> Cc: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* package: add generic support for lz archivesBaruch Siach2017-02-152-0/+19
| | | | | | | | | | This commit teaches the generic package handling code how to extract .tar.lz archives. When lzip is not installed on the host, host-lzip gets built automatically. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package: refactor listing of extractor dependenciesBaruch Siach2017-02-151-0/+1
| | | | | | | | | | | | | | | Don't special case $(XZCAT) when constructing DL_TOOLS_DEPENDENCIES. The next commit will introduce another extractor that automatically builds when not installed. Introduce EXTRACTOR_DEPENDENCY_PRECHECKED_EXTENSIONS that lists archive extensions for which the extractor is already checked in support/dependencies/check-host-foo.mk. Use this in the newly introduced extractor-dependency to populate DL_TOOLS_DEPENDENCIES. Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> [Thomas: add missing space after "firstword", as noticed by Thomas DS.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core: do not reset DEPENDENCIES_HOST_PREREQ in dependencies.mkJérôme Pouiller2017-01-281-2/+0
| | | | | | | | Usually, Buildroot does never initialize variables with empty content. DEPENDENCIES_HOST_PREREQ was an unjustified exception. Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/dependencies: ensure we have 'file' on the hostYann E. MORIN2016-12-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recently, the autoconf macros for libtool started using '/usr/bin/file' to determine the type of library that is generated by the toolchain. Packages that use this recent version of the libtool autoconf macros will fail in a rather dramatic way when /usr/bin/file is not present on the host: the package will still build but no shared library is generated, which in turn may cause build failures in other packages that link with it. For example, libpng's configure determines that it is not possible to build a shared library on MIPS64 because the expected output from 'file' is not present. Therefore, only a static libpng.a is built. Later, bandwithd links with -lpng but it doesn't use the pkg-config's Private-Libs (because it's not linking statically) and it doesn't have access to the NEEDED reference from the shared library. Therefore, it doesn't link with zlib and fails with pngrutil.c:(.text+0x55c): undefined reference to `inflate' We cant use host-file because it is itself an autotools package and is itself using libtool, so this would be a chicken-n-egg problem. Besides, the libtool script really wants to call /usr/bin/file, so it would not even find our host-file anyway. So, just require that '/usr/bin/file' is present on the host. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/dependencies: use the new kconfig option to check UTF8 localeYann E. MORIN2016-12-041-2/+1
| | | | | | | | | | | | | | | Currently, we require a host with an UTF-8 locale as soone as we build a Buildroot toolchain with support for locales. This means that we do erquire such a locale when building a toolchain with either uClibc, glibc or musl. However, glibc and musl do not require such a locale to be present. Use the new option to check if an UTF8 locale is needed on the host, rather than deriving that from toolchain settings. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* dependencies: check for Math BigInt/BigRat Perl moduleRomain Naour2016-10-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As for MakeMaker Perl module, add a check for Math BigInt/BigRat Perl Core module, which are needed by mpv. Fixes: Waf: Entering directory `output/build/mpv-0.17.0/build' [ 1/198] Compiling version.sh [ 12/198] Processing ebml_types.h: demux/ebml.c demux/demux_mkv.c -> build/ebml_types.h [ 13/198] Compiling demux/ebml.c Can't locate Math/BigRat.pm in @INC (you may need to install the Math::BigRat module) Waf: Entering directory `output/build/mpv-0.17.0/build' [ 1/198] Compiling version.sh [ 2/198] Compiling TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns [ 3/198] Compiling video/out/x11_icon.bin [ 4/198] Compiling etc/input.conf [ 5/198] Compiling sub/osd_font.otf [ 6/198] Compiling video/out/opengl/nnedi3_weights.bin [ 7/198] Compiling player/lua/defaults.lua [ 8/198] Compiling player/lua/assdraw.lua [ 9/198] Compiling player/lua/options.lua [ 10/198] Compiling player/lua/osc.lua [ 11/198] Compiling player/lua/ytdl_hook.lua [ 12/198] Processing ebml_types.h: demux/ebml.c demux/demux_mkv.c -> build/ebml_types.h [ 13/198] Compiling demux/ebml.c [ 14/198] Compiling DOCS/man/mpv.rst Can't locate Math/BigInt.pm in @INC (you may need to install the Math::BigInt module) Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: François Perrad <francois.perrad@gadz.org> [Thomas et al.: make those perl modules only required when mpv is enabled.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* dependencies: check for MakeMaker Perl moduleRomain Naour2016-10-161-0/+1
| | | | | | | | | | | | | | | | | | | | ExtUtils::MakeMaker is one of the Perl Core modules usually packaged in Perl package for a Debian/Ubuntu based system. For a Fedora based system, each Perl Core modules have their own RPM package. So install only Perl package is not enough. Fixes: >>> host-libxml-parser-perl 2.41 Configuring [...] perl `which perl` Makefile.PL Can't locate ExtUtils/MakeMaker.pm in @INC (you may need to install the ExtUtils::MakeMaker module) Add a new Perl module check in dependency.sh. Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: François Perrad <francois.perrad@gadz.org> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core: don't build host-cmake if it is available on the build hostLuca Ceresoli2016-09-172-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently all cmake packages depend on host-cmake. Unfortunately host-cmake takes a long time to configure and build: almost 7 minutes on a dual-core i5 with SSD. The time does not change even with ccache enabled. Indeed, building host-cmake is avoidable if it is already installed on the build host: CMake is supposed to be quite portable, and the only patch in Buildroot for the CMake package seems to only affect target-cmake. Thus we automatically skip building host-cmake and use the one on the system if: - cmake is available on the system and - it is recent enough. First, we leverage the existing infrastructure in support/dependencies/dependencies.mk to find out whether there's a suitable cmake executable on the system. Its path can be passed in the BR2_CMAKE environment variable, otherwise it defaults to "cmake". If it is enabled, found and suitable then we set BR2_CMAKE_HOST_DEPENDENCY to empty; otherwise we set BR2_CMAKE_HOST_DEPENDENCY to 'host-cmake' and override BR2_CMAKE with "$(HOST_DIR)/usr/bin/cmake" to revert to using our own cmake (the old behaviour). Then in pkg-cmake.mk we replace the hard-coded dependency on host-cmake to using the BR2_CMAKE_HOST_DEPENDENCY variable, and we use $(BR2_CMAKE) instead of $(HOST_DIR)/usr/bin/cmake. Unlike what we do for host-tar and host-xzcat, for host-cmake we do not add host-cmake to DEPENDENCIES_HOST_PREREQ. If we did, host-cmake would be a dependency for _any_ package when it's not installed on the host, even when no cmake package is selected. Cmake versions older than 3.0 are affected by the bug described and fixed in Buildroot in ef2c1970e4bf ("cmake: add patch to fix Qt mkspecs detection"). The bug was fixed in upstream CMake in version 3.0 [0]. Amongst all the cmake packages currently in Buildroot, the currently highest version mentioned in cmake_minimum_required() is 3.1 (grantlee and opencv3). Thus we use 3.1 as the lowest required cmake for now, until a package is bumped, or a new package added, with a higher required version. [0] https://cmake.org/gitweb?p=cmake.git;h=e8b8b37ef6fef094940d3384df5a1d421b9fa568 Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Samuel Martin <s.martin49@gmail.com> Cc: Davide Viti <zinosat@tiscali.it> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Romain Naour <romain.naour@gmail.com> Tested-by: Romain Naour <romain.naour@gmail.com> [yann.morin.1998@free.fr: - simplify logic in check-host-cmake.mk; - set and use BR2_CMAKE_HOST_DEPENDENCY, drop USE_SYSTEM_CMAKE; - bump to cmake 3.1 for grantlee and opencv; ] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* build: cleanup remaining references to BR2_STRIP_sstripJulien Floret2016-06-101-4/+0
| | | | | | | | sstrip option has been removed in commit 106f5b8c5093 ("build: remove deprecated sstrip option"). Signed-off-by: Julien Floret <julien.floret@6wind.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* dependencies.sh: improve the missing perl modules detectionVicente Olivert Riera2015-10-151-5/+21
| | | | | | | | | | [Thomas: - Check for Thread::Queue, not Thread:Queue. - Use 'printf' instead of 'echo -e', since printf is POSIX, but not 'echo -e'.] Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-generic: fix fallout of <pkg>_STRIP_COMPONENTS introductionThomas Petazzoni2015-07-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The introduction of <pkg>_STRIP_COMPONENTS broke the build of the target tar package, because support/dependencies/check-host-tar.mk defines TAR_STRIP_COMPONENTS to --strip-components. Which leads to have the package infrastructure do: $$(TAR_STRIP_COMPONENTS)=$$($(2)_STRIP_COMPONENTS) which for the tar package evaluates to: $$(TAR_STRIP_COMPONENTS)=$$(TAR_STRIP_COMPONENTS) which evalutes to: --strip-components=--strip-components Which obviously doesn't work really well. And in fact the TAR_STRIP_COMPONENTS definition in support/dependencies/check-host-tar.mk is no longer necessary: it was needed in the days where we were trying to support old tar versions that did not support --strip-components. But nowadays, when such an old tar version is encountered, we build our own host-tar which supports --strip-components. Fixes: http://autobuild.buildroot.org/results/ae2/ae20df67f99f75b1ba5d5b7316ad265d66f3aa66/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* fix typo in package install suggestion for dependenciesGergely Imreh2015-05-081-1/+1
| | | | | Signed-off-by: Gergely Imreh <imrehg@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* support/scripts/dependencies.sh: cleanup the output of the 32 bits gcc testJens Stimpfle2014-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The screen is cluttered when we build for 32 bit target and 32 bit gcc is missing. ~/buildroot$ make [...] /usr/bin/ld: cannot find crt1.o: No such file or directory /usr/bin/ld: cannot find crti.o: No such file or directory /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc.a when searching for -lgcc /usr/bin/ld: cannot find -lgcc /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_s.so when searching for -lgcc_s /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lc /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc.a when searching for -lgcc /usr/bin/ld: cannot find -lgcc /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_s.so when searching for -lgcc_s /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find crtn.o: No such file or directory collect2: error: ld returned 1 exit status [...] Your Buildroot configuration needs a compiler capable of building 32 bits binaries. The final note is enough, and adding 2>/dev/null to the gcc test invocation is also more consistent with the rest of the script. The patch makes the '/usr/bin/ld:' and 'collect2:' lines go away. Signed-off-by: Jens Stimpfle <debian@jstimpfle.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts/dependencies.sh: improve g++ test to avoid misleading outputJens Stimpfle2014-12-081-0/+2
| | | | | | | | | | | | | | | | | When g++ is not installed, a misleading error message turns up because of a bad combination of an unquoted shell variable and control flow. ~/buildroot$ make You may have to install 'g++' on your build machine /home/testuser/buildroot/support/dependencies/dependencies.sh: 136: [: -lt: unexpected operator [Thomas: - fixed commit log, as per the suggestion of Yann E. Morin. - don't change existing empty new lines, suggested by Yann. - use positive logic in the newly added test, suggested by Yann.] Signed-off-by: Jens Stimpfle <debian@jstimpfle.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* infra: do not append an empty LD_LIBRARY_PATHYann E. MORIN2014-11-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we set LD_LIBRARY_PATH when building our host tools, we append any pre-existing value to our custom path: LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" But then if LD_LIBRARY_PATH was previously empty, we end up with an LD_LIBRARY_PATH that ends with a colon. Also, when we check that an existing LD_LIBRARY_PATH does not contain CWD, we previously did not look for a zero-length prefix. Since 'man ld.so' says of LD_LIBRARY_PATH: A colon-separated list of directories in which to search for ELF libraries at execution-time. Similar to the PATH environment variable. And POSIX states about PATH: A zero-length prefix is a legacy feature that indicates the current working directory. And bash also recognises a zero-length prefix to search in CWD: A zero-length (null) directory name in the value of PATH indicates the current directory. We may thus end up on a system where a zero-length prefix in LD_LIBRARY_PATH is interpreted as CWD. Do not append the previous LD_LIBRARY_PATH if it was empty, and check for a zero-length prefix when checking dependencies. 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> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* package: indentation cleanupJerzy Grzegorek2014-10-252-4/+4
| | | | | Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* .mk files: bulk aligment and whitespace cleanup of assignmentsThomas De Schampheleire2014-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* dependencies: Reject gcj in BR2_NEEDS_HOST_JAVA checkBernd Kuhls2014-08-171-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Xbmc uses the Groovy java package to generate API code, for details see http://wiki.xbmc.org/index.php?title=Codegeneration#How_it_works Groovy itself is broken when used with gcj: http://jira.codehaus.org/browse/GROOVY-3701 Xbmc recommends to use another java package instead, like openjdk: http://forum.xbmc.org/showthread.php?tid=199742 Until we come up with a host package to provide a java setup and in order to make autobuilder happy let´s reject gcj when we check for a java installation on the host. Currently Xbmc is the only package using BR2_NEEDS_HOST_JAVA so changing the behaviour of dependencies.sh has no side effects. Fixes http://autobuild.buildroot.net/results/213/213d7454a1dc68cfb8f4c8d9508f52ebf8e58e33/ http://autobuild.buildroot.net/results/639/639cda872cf36c122cbd6139dd76f6b51ac1864e/ http://autobuild.buildroot.net/results/c9e/c9eb12c95b2939c64590692a82af8d84bbd90956/ Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* dependencies.sh: fix typoVincent2014-07-191-1/+1
| | | | | | Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* dependencies.sh: add other Debian package names for 32 bits librariesKaroly Kasza2014-07-151-2/+3
| | | | | | | [Thomas: implemented Arnout suggestion.] Signed-off-by: Karoly Kasza <kaszak@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* classpath: Use generic check for host programMaxime Hadjinlian2014-06-141-10/+8
| | | | | | | | | | | | Remove the specific check that was done in dependencies.sh to use the generic one that were introduced by the previous patch. Also, introduce, BR2_NEEDS_HOST_JAVAC and BR2_NEEDS_HOST_JAR as it is needed by classpath. Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* infra: Add generic check_prog_host functionMaxime Hadjinlian2014-06-141-16/+14
| | | | | | | | | Avoid copy/pasting the same block of code to check if a program is available on the host machine. Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Improve tar check if bsdtar is installedHeiko Abraham2014-05-311-0/+7
| | | | | | | | | | | | | If bsdtar is installed, fix script error for tar version detection. bsdtar does not provide all expected command line (long) options like "--hard-dereference". To ensure compatibility, mark version of tar as 'invalid' and trigger build of 'host-tar'. [Peter; slightly reworded commit text] Signed-off-by: Heiko Abraham <abrahamh@web.de> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* support: properly check bash is availableYann E. MORIN2014-04-201-4/+8
| | | | | | | | | | | | | | | | | | | The current check is broken, as it only checks if the user's login shell is bash, not what the system shell is. Mimick the sequence found in the top-level Makefile to search for bash, except for the fallback case, where we explicitly check that 'sh' is bash, by checking if it sets $BASH, so we know the fallback case, in the top-level Makefile, to use 'sh' will indeed use bash. Remove superfluous semi-colons ';' at the end of lines, they are not needed in a shell script (this is not C!) 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: Andrew Barnes <andy@outsideglobe.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* infra: Change BR2_HOST_NEEDS_JAVA nameMaxime Hadjinlian2014-02-191-1/+1
| | | | | | | | | | Change BR2_HOST_NEEDS_JAVA to BR2_NEEDS_HOST_JAVA as it makes more sense. The host doesn't need Java but Buildroot needs the host to have Java in order to build the package that select this option. Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* infra: Introduce BR2_HOST_NEEDS_JAVAMaxime Hadjinlian2014-02-191-0/+8
| | | | | | | | | | | | | | | | | | | | | XBMC needs Java on the host in order to build, because it uses a code-generator which is built in two phases: In the first phase SWIG is used to parse C++ header files that define the API. SWIG outputs an XML file that contains a complete description of the structure of the API. In the second phase, the XML file is ingested by a Groovy (Java) program that then creates C++ code that forms the bridge to the scripting language (Python). The second phase is why we need java on the host. You can learn more at the XBMC's wiki: http://wiki.xbmc.org/index.php?title=Codegeneration#How_it_works In order to check that, this patch introduce this mechanism in dependencies.sh, and it also defines the variable in Config.in [Peter: fix error message] Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* infra: replace BUILDROOT_CONFIG with BR2_CONFIGArnout Vandecappelle2014-02-091-5/+5
| | | | | | | | | | | | | | | To make the naming consistent (all user-visible options should be prefixed with BR2_). An entry is added to Makefile.legacy to warn users who have set BUILDROOT_CONFIG but not BR2_CONFIG. Still export BUILDROOT_CONFIG but pointing to some phony value, to make sure that scripts that still use it fail in a predictable way. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Jérémy Rosen <jeremy.rosen@openwide.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* dependencies.sh: cleanup dependencies.shMaxime Hadjinlian2014-02-061-60/+59
| | | | | | | Cleanup mixed indents and remove commented lines. Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* dependencies.sh: stop stray a.out being created for ia32 compiler testMartin Bark2014-02-051-1/+1
| | | | | | | | | | | | If the grub package is selected it also selects BR2_HOSTARCH_NEEDS_IA32_COMPILER. This triggers a test in dependencies.sh to verify the host compiler can build 32 bit executables. Currently this test does not set any output for the compiler which causes a stray a.out to be create outside the output directory. This patch sets the compiler output to /dev/null so no a.out is created but the test is still performed. Signed-off-by: Martin Bark <martin@barkynet.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* dependencies.sh: stop mixing echo and printf (use echo)Bjørn Forsman2014-01-221-23/+44
| | | | | | | | | | | | 'printf' was introduced because it is more portable than 'echo -e'. But when the escape sequences are just newlines we can just as well use plain 'echo' (and remove the newline escape sequences). This looks cleaner than having some lines with echo and some with printf. Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Prefer 'printf' over 'echo -e' (for portability)Bjørn Forsman2014-01-211-41/+41
| | | | | | | | | | | | | | | | | support/dependencies/dependencies.sh uses #!/bin/sh shebang. It is not guaranteed that /bin/sh provides an 'echo' implementation that understands the '-e' flag (interpret backslash escape chars). For example, dash doesn't. 'printf' is more portable (it must interpret backslash escape chars, according to POSIX), so use that. NOTE: Before the previous commit, the dependencies.sh script used /bin/echo instead of the shell built-in. That's probably why this hasn't come up before. Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* support/dependencies/dependencies.sh: Remove some absolute pathsBjørn Forsman2014-01-211-48/+48
| | | | | | | | | | Buildroot fails to run on NixOS because it has no /bin/echo or /bin/grep. Instead of relying on absolute paths, rely on tools to be available in PATH. This should work for all systems. Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com> Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* core: add BR2_HOSTARCH_NEEDS_IA32_COMPILER optionThomas Petazzoni2013-12-011-0/+9
| | | | | | | | | | | | | | | | Some bootloaders (such as Grub) need to be built for x86 (i.e IA32) even if the target architecture is x86-64. However, when the target architecture is x86-64, the cross-compiler generated by Buildroot is not able to generate 32 bits code. To solve this, we will rely on the host compiler being a x86 + x86-64 compiler. Therefore, this commit introduces the BR2_HOSTARCH_NEEDS_IA32_COMPILER option, which tells the dependency checking logic to verify that the host compiler is indeed capable of building x86 32 bits code. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* dependencies.sh: update i386 package namesFrank Hunleth2013-11-061-1/+2
| | | | | | | | This is the list needed to run the Linaro pre-built toolchain on a 64-bit Ubuntu 13.10 system. Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* manual generation: check dependencies firstThomas De Schampheleire2013-11-011-0/+36
| | | | | | | | | | | To generate the manual, you need a few tools. If these are not present, pretty cryptic error messages are given. This patch adds a simple check for these dependencies, before attempting to build the manual. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* dependencies: remove useless targetsThomas Petazzoni2013-10-091-8/+0
| | | | | | | | | The dependencies-source, dependencies-clean and dependencies-dirclean targets are not needed, as long as 'dependencies' is not used in the <pkg>_DEPENDENCIES of a package. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* package: remove the empty trailing linesJerzy Grzegorek2013-09-131-1/+0
| | | | | Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* xzcat: treat as host prerequisite and build if neededThomas De Schampheleire2013-09-062-0/+21
| | | | | | | | | | | | | | If xzcat is not present on the host system, buildroot bails out early asking the developer to install it (xzcat is now a DL_TOOLS_DEPENDENCY) Conversely, when BR2_TARGET_ROOTFS_CPIO_XZ is enabled, then host-xz is a build dependency, and no manual action is required from the developer. Because the second approach is nicer, also build host-xz when xzcat is not available, using the host-prerequisite and suitable-host-pkg mechanisms, already used for tar. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* Fix build reproducibility in Make 3.82Jérôme Pouiller2013-09-061-1/+1
| | | | | | | | | | | | Make 3.82 no longer sort the result of wildcards (see http://comments.gmane.org/gmane.comp.gnu.make.bugs/4260). This may break build reproducibility. This patch sort results of wildcards to ensure reproducibility. Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
OpenPOWER on IntegriCloud