summaryrefslogtreecommitdiffstats
path: root/toolchain
Commit message (Collapse)AuthorAgeFilesLines
* toolchain-external: make extraction idempotentArnout Vandecappelle2015-11-041-0/+1
| | | | | | | | | | | | | Commit 23ffa7ec first extracts to the toolchain-external build directory and then moves everything to $(HOST_DIR)/opt/ext-toolchain. However, this is not idempotent, because moving directories over existing ones doesn't always work, particularly if the target is on another device. Simply remove the destination contents before moving. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain/external: use generic extract commands (blackfin case)Yann E. MORIN2015-11-031-15/+16
| | | | | | | | | | | | | The backfin toolchains come in two archives. We extract the first (main) archive using the generic extract commands, while the second is extracted as a post-extract hook. 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: Romain Naour <romain.naour@openwide.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain/external: use generic extract commands (!blackfin case)Yann E. MORIN2015-11-031-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that packages can provide a list of files to be excluded when extracting their archive, downloaded external toolchains are no longer special in this respect. Still, those toolchains are currently extracted directly into their final location, $(HOST_DIR)/opt/ext-toolchain/ which means we still need a custom extract command. Except, we don't really need it: we can just move the toolchain, after it's been extracted by the generic extract command, with a post-extract hook. This means that: - we now extract the toolchain with the generic extract command, - the toolchain is thus extracted into $(@D) , - fixup commands are run against $(@D), as a post-extract hook, instead of against $(HOST_DIR)/opt/ext-toolchain , - once this is done, we move $(@D)/* into the final location with a new post-extract hook. Note: the blackfin case is special, and will be handled in a follow-up patch. [Thomas: register the TOOLCHAIN_EXTERNAL_FIXUP_CMDS only for the Arago case, add some additional comments in the code about why we're moving the toolchain around.] 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: Romain Naour <romain.naour@openwide.fr> Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain-external/blackfin: drop --hard-dereferenceYann E. MORIN2015-11-031-2/+2
| | | | | | | | | | | | | | | | Currently, for the blackfin external toolchains, we tell tar to extract files with the --hard-dereference. However, --hard-dereference is only meaningful when creating an archive, not when extracting it. Therefore, let's drop this option. [Thomas: rework commit title and commit log, after some suggestions from Arnout.] 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: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain/external: bump Linaro AArch64 to 2015.08Yann E. MORIN2015-11-033-2/+23
| | | | | | | | | | | | | | | That toolchain is built for an x86_64 host, so we make it available only for x86_64, and we keep the old 2014.09 toolchain for x86 hosts. To avoid dealing with legacy symbols and introduce versioned options, we reuse the same symbol for both toolchains. Thanks to the different depednencies (on the host), we can give them different prompts and different help texts. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain/external: bump Linaro ARMEB to 2015.08Yann E. MORIN2015-11-033-2/+30
| | | | | | | | | | | | | | | | | | | That toolchain is built for an x86_64 host, so we make it available only for x86_64, and we keep the old 2014.09 toolchain for x86 hosts. To avoid dealing with legacy symbols and introduce versioned options, we reuse the same symbol for both toolchains. Thanks to the different depednencies (on the host), we can give them different prompts and different help texts. [Thomas: tweak Config.in help text to actually match this toolchain instead of being a wrong copy/paste from the old Linaro toolchain for ARMeb.] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain/external: bump Linaro ARM to 2015.08Yann E. MORIN2015-11-033-2/+32
| | | | | | | | | | | | | | | | | That toolchain is built for an x86_64 host, so we make it available only for x86_64, and we keep the old 2014.09 toolchain for x86 hosts. To avoid dealing with legacy symbols and introduce versioned options, we reuse the same symbol for both toolchains. Thanks to the different depednencies (on the host), we can give them different prompts and different help texts. [Thomas: s/eglibc/glibc/ as noticed by Baruch.] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain: add 4.3.x choice for headersVicente Olivert Riera2015-11-022-0/+9
| | | | | | Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Reviewed-by: "James Knight" <james.knight@rockwellcollins.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain/wrapper: fix potential bug in foreach loopYann E. MORIN2015-10-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Makefile, the comma ',' is used to separate the arguments passed to functions, so we should not be allowed to use straight commas in strings we want to expand. For the toolchain wrapper, we need to transform a list: -mfoo -mbar -mbuz into something acceptable for a C array assignment: "-mfoo", "-mbar", "-mbuz", So, we use a $(foreach ...) loop for that. However, we do have a straight comma in there. It does not cause any issue in practice, since $(foreach) is a make builtin function that accepts three and only three parameters. However, this is not sane. Change the straight comma to the usual $(comma) expansion, like we would do for a call to any other function. At the same time, make the code a bit easier to read, by first creating the transformed list, and then creating the define. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* arch/x86: add support for Intel X1000Ray Kinsella2015-10-202-0/+7
| | | | | | | | | | | | The Intel X1000 is the Pentium class microprocessor that ships with Galileo Gen 1/2. This patch adds changes to arch and toolchain-wrapper to omit the lock prefix for the X1000. [Thomas: tweak commit log and Config.in help text.] Signed-off-by: Ray Kinsella <ray.kinsella@intel.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain: like glibc, musl always provides SSP supportThomas Petazzoni2015-10-181-0/+1
| | | | | | | | | Make sure BR2_TOOLCHAIN_USES_MUSL selects BR2_TOOLCHAIN_HAS_SSP since musl always provides SSP support (like glibc). Signed-off-by: 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>
* toolchain-external/CodeSourcery MIPS: available only for R2Vicente Olivert Riera2015-10-171-6/+3
| | | | | | | | | | | | Currently the CodeSourcery toolchains for MIPS can be selected to build mips32 (revision level 1) targets, but the resulting binaries are built for mips32r2 instead. This is because these toolchains don't have library support other than mips32r2, so there is no point to allow the selection of a mips32 variant with a CodeSourcery MIPS toolchain, since everything will be built for mips32r2 instead. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain-external: bypass buildroot wrapperArnout Vandecappelle2015-10-172-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | The buildroot internal toolchain now adds a wrapper. When we use a buildroot toolchain as an external toolchain, we want to bypass this wrapper and call the compiler directly, for two reasons: 1. The options added by the wrapper are not necessarily appropriate when it is reused as an external toolchain. For instance, ccache may have been enabled while building the toolchain but not when using it as an external toolchain. 2. Currently, the wrapper expects to reside in .../usr/bin, but when used as an external toolchain it will be in .../ext-toolchain/bin. Therefore, the wrapper can't find the real binary and sysroot anymore. To bypass the wrapper, we check for the existence of *.br_real files in the external toolchain directory. If any such file exists, the wrapper will add the .br_real suffix for all the wrapped files. Note that the wrapper doesn't check if the *.br_real exists for each individual wrapped file, it just assumes that all wrapped files have a corresponding .br_real. This is currently true but that may change in the future of course. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* toolchain: add mips64 for uClibc-ngWaldemar Brodkorb2015-10-131-1/+1
| | | | | | | | Filter out all other uClibc versions, as they containing serious bugs for mips64. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* arch: add support for mips32r6 and mips64r6 variantsVicente Olivert Riera2015-10-122-0/+12
| | | | | | | | | | | | | | | - Add support for mips32r6 and mips64r6 target architecture variants - Disable unsupported gcc versions - Disable unsupported binutils versions - Disable unsupported external toolchains - Disable unsuported C libraries - Add a hook in order to make glibc compile for MIPS R6. [Thomas: slightly tweak the glibc hack explanation, to make it hopefully clearer.] Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain: add sparc64 architecture supportWaldemar Brodkorb2015-10-101-1/+2
| | | | | | | | | Introduce sparc64 architecture to buildroot. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Tested-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain-wrapper.c: unbreak BR_CROSS_PATH_ABS handlingPeter Korsgaard2015-10-051-1/+1
| | | | | | | | | Fixes #8386 We should check if BR_CROSS_PATH_ABS is defined, not if it evalutates to true for the pre processor. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* toolchain/external: commonalise comments about Linaro toolchainsYann E. MORIN2015-10-041-10/+5
| | | | | | | | | | | | Those two comments: - are exactly the same - have the same dependencies (except for arm/armeb) So, make it a common comment. It will be useful to have that comment when we introduce new Linaro toolchain versions. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* ccache: support changing the output directoryArnout Vandecappelle2015-10-042-0/+15
| | | | | | | | | | | | | | | | | | | | When building in a different output directory than the original build, there will currently be a lot of ccache misses because in many cases there is some -I/... absolute path in the compilation. Ccache has an option CCACHE_BASEDIR to substitute absolute paths with relative paths, so they wil be the same in the hash (and in the output). Since there are some disadvantages to this path rewriting, it is made optional as BR2_CCACHE_USE_BASEDIR. It defaults to y because the usefulness of ccache is severely reduced without this option. In addition to CCACHE_BASEDIR, we also substitute away the occurences of $(HOST_DIR) in the calculation of the compiler hash. This is done regardless of the setting of BR2_CCACHE_USE_BASEDIR because it's quite harmless. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* ccache: use mtime for external toolchain, CONF_OPTS for internal toolchainArnout Vandecappelle2015-10-041-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* toolchain-wrapper: support change of BR2_CCACHEArnout Vandecappelle2015-10-041-4/+11
| | | | | | | | | | | | | | | | | | 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>
* infra: move ccache handling to the toolchain wrapperArnout Vandecappelle2015-10-042-1/+18
| | | | | | | | | | | | | | | | | | | | | Since we always have a toolchain wrapper now, we can move the ccache call to the toolchain wrapper. The hostcc ccache handling obviously stays. The global addition of ccache to TARGET_CC/CXX is removed, but many individual packages and infras still add it. This means we have a chain like this: ccache -> toolchain-wrapper -> ccache -> gcc However, this is fairly harmless: for cache misses, the inner ccache just adds overhead and for cache hits, the inner ccache is never called. Later patches will remove these redundant ccache calls. As a side effect, perl now supports ccache as well. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Danomi Manchego <danomimanchego123@gmail.com> Cc: Károly Kasza <kaszak@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* gcc: use toolchain wrapperArnout Vandecappelle2015-10-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a toolchain wrapper for external toolchain, but it is also beneficial for internal toolchains, for the following reasons: 1. It can make sure that BR2_TARGET_OPTIMIZATION is passed to the compiler even if a package's build system doesn't honor CFLAGS. 2. It allows us to do the unsafe path check (i.e. -I/usr/include) without patching gcc. 3. It makes it simpler to implement building each package with a separate staging directory (per-package staging). 4. It makes it simpler to implement a compiler hash check for ccache. The wrapper is reused from the external toolchain. A third CROSS_PATH_ option is added to the wrapper: in this case, the real executable is in the same directory, with the extension .real. The creation of the simple symlinks is merged with the creation of the wrapper symlinks, otherwise part of the -gcc-ar handling logic would have to be repeated. The complex case-condition could be refactored with the one for the external toolchain, but then it becomes even more complex because they each have special corner cases. For example, the internal toolchain has to handle *.real to avoid creating an extra indirection after host-gcc-{final,initial}-rebuild. Instead of creating the .real files, it would also have been possible to install the internal toolchain in $(HOST_DIR)/opt, similar to what we do for the external toolchain. However, then we would also have to copy things to the sysroot and do more of the magic that the external toolchain is doing. So keeping it in $(HOST_DIR)/usr/bin is much simpler. Note that gcc-initial has to be wrapped as well, because it is used for building libc and we want to apply the same magic when building libc. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Jérôme Oufella <jerome.oufella@savoirfairelinux.com> Reviewed-by: Romain Naour <romain.naour@openwide.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* toolchain-external: move wrapper to toolchain directoryArnout Vandecappelle2015-10-043-40/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The toolchain wrapper will be reused for the internal toolchain, so it belongs in the toolchain directory. Also, the ext- prefix is removed from it. The build commands are moved to a new toolchain-wrapper.mk. The wrapper arguments that are also relevant for the internal toolchain wrapper are moved to toolchain-wrapper.mk, the rest stays in toolchain-external.mk. While we're at it, move the building of the toolchain wrapper to the build step of toolchain-external. There is no specific reason to do this, other than that it fits better semantically. Also remove the MESSAGE call, otherwise we'd see: >>> toolchain-external undefined Building >>> toolchain-external undefined Building toolchain wrapper /usr/bin/gcc ... Having an extra "Building toolchain wrapper' message is pointless. The useless condition on $(BR2_TARGET_OPTIMIZATION) is removed. It was always true because it wasn't qstrip'ped first, so clearly it works without that condition as well. Also rewrapped some comments and removed the 'external' reference. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Jérôme Oufella <jerome.oufella@savoirfairelinux.com> Reviewed-by: Romain Naour <romain.naour@openwide.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* toolchain-external: define actual sources for arago toolchainsLuca Ceresoli2015-10-041-0/+2
| | | | | | | | Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> 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>
* toolchain-external: mass-define actual source tarball for known patternsLuca Ceresoli2015-10-041-0/+10
| | | | | | | | | | | | | For some external toolchain vendors the actual source code URL can be simply derived from the binary file URL. Here we obtain TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL for all Mentor and Linaro toolchains with a few $(subst) calls. 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>
* toolchain-external: Remove BLACKFIN_UCLINUX_2012R2Maxime Hadjinlian2015-10-042-25/+2
| | | | | | Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain-external: strip trailing slash from autogenerated FOO_SITELuca Ceresoli2015-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | Trailing slashes are going to be declared illegal from FOO_SITE variables. But Buildroot internally generates such a variable when using a custom external toolchain (i.e. BR2_TOOLCHAIN_EXTERNAL_CUSTOM). This is because TOOLCHAIN_EXTERNAL_SITE is set to $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))), and $(dir) leaves a trailing slash. Fix it using patsubst, just like linux and the bootloaders do. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain: Fix glibc breakageMaxime Hadjinlian2015-10-041-3/+1
| | | | | | | | | | | | | | Introduced by previous patch 0f75b2635ee564fbbdb9ea631cf39fa8731d6d6c, this printf would break the build of glibc, because there is no format to printf: printf: usage: printf [-v var] format [arguments] Signed-off-by Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Reported-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* package: Replace 'echo -n' by 'printf'Maxime Hadjinlian2015-10-042-4/+4
| | | | | | | | | | | | 'echo -n' is not a POSIX construct (no flag support), we shoud use 'printf', especially in init script. This patch was generated by the following command line: git grep -l 'echo -n' -- `git ls-files | grep -v 'patch'` | xargs sed -i 's/echo -n/printf/' Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* toolchain-external: fix musl-based builds on ARMhf platformsvicencb@gmail.com2015-09-281-0/+2
| | | | | | | | | | | | | | | When ARCH is arm and the hard-floating-point option is on executables expect to find the dynamic linker at /lib/ld-musl-armhf.so.1 and not /lib/ld-musl-arm.so.1. This patch adjusts the logic that creates the symbolic link from the dynamic linker path to the musl C library (since musl has everything built into a single file). [Thomas: tweak the commit log.] Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain-external/CodeSourcery MIPS 2015.05: fix lib-names headersVicente Olivert Riera2015-09-131-0/+32
| | | | | | | | | | | | | | | The CodeSourcery MIPS 2015.05 toolchain has some missing headers we need to create manually in order to avoid compilation errors. A bug has been already reported and fixed upstream, and the fix will be included in the next release. Fixes: http://autobuild.buildroot.net/results/bea/bea76392dec5c8e1bcea8be990ad109c6d27e947/ http://autobuild.buildroot.net/results/64f/64f2b6b6e60d5c2d9537ad6891211cda6baaf6d5/ ...and many more. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* toolchain-external: clarify the comment about *-gcc-ar... LTO wrappersArnout Vandecappelle2015-09-131-5/+6
| | | | | Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain-external: trivial clean up of messagesArnout Vandecappelle2015-09-131-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, the output of the toolchain-external build steps looked like this (abbreviated for clarity): >>> toolchain-external undefined Building >>> toolchain-external undefined Installing to staging directory >>> toolchain-external undefined Copying external toolchain sysroot to staging... >>> toolchain-external undefined Building ext-toolchain wrapper mkdir -p output/host/usr/bin; cd output/host/usr/bin; for i in ... /usr/bin/gcc -O2 -Ioutput/host/usr/include -DBR_SYSROOT='... if test -f output/host/usr/bin/i686-pc-linux-gnu-gdb ; then mkdir -p ... >>> toolchain-external undefined Fixing libtool files >>> toolchain-external undefined Installing to target >>> toolchain-external undefined Copying external toolchain libraries to target... if test -e output/target/lib/ld-uClibc.so.1; then ln -sf ld-uClibc.so.1 output/target/lib/ld-uClibc.so.0 ; fi if test -e output/target/lib/ld64-uClibc.so.1; then ln -sf ld64-uClibc.so.1 output/target/lib/ld64-uClibc.so.0 ; fi All the long lines with conditions and loops in them are not usefull, so put $(Q) in front of them. The line with mkdir can better be split on a separate line so the cd stands out more. There are two redundant semicolons that can be removed. The installation of gdbinit could use an extra message so the user can see what is going on. After this commit, the toolchain-external build steps look like this: >>> toolchain-external undefined Building >>> toolchain-external undefined Installing to staging directory >>> toolchain-external undefined Copying external toolchain sysroot to staging... >>> toolchain-external undefined Building ext-toolchain wrapper /usr/bin/gcc -O2 -Ioutput/host/usr/include -DBR_SYSROOT='... >>> toolchain-external undefined Installing gdbinit >>> toolchain-external undefined Fixing libtool files >>> toolchain-external undefined Installing to target >>> toolchain-external undefined Copying external toolchain libraries to target... Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain-external: finish removal of SH2A toolchainsThomas Petazzoni2015-09-083-10/+0
| | | | | | | | | | | | | | | | Commit c68c365d2937920df1f2062e4821ebb6d21d195e ("toolchain-external: remove CS sh2 toolchains") removed the definitions of the BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103 and BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009, but did not actually remove the code that was using those options. So this commit removes the parts of the code that are currently dead due to this: the definition of the prefix of those toolchains, the hashes, and the URLs. 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>
* toolchain: add 4.2.x choice for headersPeter Korsgaard2015-09-012-0/+9
| | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* toolchain/external: ensure gcc version is knownYann E. MORIN2015-08-181-0/+4
| | | | | | | | | | | | | | Currently, when a preconfigured prebuilt toolchain forgets to specify its gcc version, the error message is a bit misleading, like: Incorrect selection of gcc version: expected .x, got 4.9.2 Add a an explicit check for the gcc version being set, that reports a better error message. 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>
* toolchain/external: better check for gcc-5Yann E. MORIN2015-08-091-8/+4
| | | | | | | | | | | | | | | | | | | gcc will always report a three-digit version sting, like 4.9.3 or 5.1.0. For gcc before 5, we want to check the first two digits, while starting with gcc 5, we are only concerned about the first digit. So, change our matching code to test for the leading part of the version string, up to the first dot after as-many version digit we're interested in. Note: we're adding the dot in the .mk code rather than in the Kconfig symbol, because it seemed cleaner to do so. Reported-by: Jörg Krause <joerg.krause@embedded.rocks> 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>
* toolchain-external: add support for gcc version dependencyThomas Petazzoni2015-08-053-0/+102
| | | | | | | | | | | | | | | | | | | | | This commit wires up the gcc version dependency mechanism in the external toolchain backend. To do so, it: * Changes the definition of all pre-defined external toolchain profiles to select the appropriate BR2_TOOLCHAIN_GCC_AT_LEAST_* option. * For custom external toolchains, provides a visible Config.in "choice" to select the gcc version used in the external toolchain. * Adds a new check_gcc_version function, that verifies that the real gcc version found in the external toolchain matches the one declared in the Buildroot configuration. [Thomas: use better sed expression proposed by Yann E. Morin, which works with more cases.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain: add common gcc version hidden config optionsThomas Petazzoni2015-08-051-0/+44
| | | | | | | | | | | | This commit adds a number of hidden Config.in options, that will be used to handle dependencies on the gcc version. We mimic the model that was used for the kernel headers dependency mechanism. These hidden options will be selected by the internal and external toolchain backend logic respectively, in follow-up commits. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* toolchain-external wrapper: don't pass march/mcpu if mtune is on cmdlineThomas De Schampheleire2015-07-261-2/+3
| | | | | | | | | | | | | | | | | | | Before commit 5715d2dcf48a39c16a3f3e41c97109613fed121d, the external toolchain wrapper would not pass its own march/mcpu/mtune flags to the real compiler if at least one of them was passed on the wrapper command-line. The mentioned commit intended to remove the passing of an mtune parameter coming from Buildroot, which was always empty after some other refactoring, but the changes have the side-effect that march/mcpu is now also passed when mtune is already given on the command-line. In that case, only mtune should be passed to the real compiler. Restore part of the original toolchain wrapper code to check the presence of mtune on the command-line. 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>
* trivial: fix typo optimazationThomas De Schampheleire2015-07-171-1/+1
| | | | | Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain-external: fix uClibc-ng 64bit dynamic loader linkBaruch Siach2015-07-161-0/+3
| | | | | | | | | | Commit 34f95bf9dbb0 (toolchain-external: fix support of uClibc-ng toolchains, 2015-07-13) added the missing ld-uClibc.so.1 dynamic linker symlink that binaries expect when linked with uClibc-ng. However on 64bit targets the linker is called ld64-uClibc.so.1. Handle that case as well. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain-external: fix support of uClibc-ng toolchainsThomas Petazzoni2015-07-141-0/+12
| | | | | | | | | | | | | The uClibc-ng dynamic loader is called ld-uClibc.so.1, but gcc is not patched specifically for uClibc-ng, so it continues to generate binaries that expect the dynamic loader to be named ld-uClibc.so.0, like with the original uClibc. Therefore, when a uClibc-ng toolchain is used as an external toolchain, we need to create an additional symbolic link to make uClibc-ng systems work properly. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain-external: improve lib subdirectory matchingBai Yingjie2015-07-131-3/+14
| | | | | | | | | | | | | | | | | | | | The toolchain from the Cavium Networks Octeon SDK provides a sysroot with library directories lib32, lib32-fp, lib64 and lib64-fp. The -fp variants are used for processors with hardware floating point unit, such as the Octeon III variants. When specifying -march=octeon3 in BR2_TARGET_OPTIMIZATION, the toolchain will use lib32-fp, but currently Buildroot does not accept that pattern. This patch improves the matching by accepting lib(32|64)?([^/]*)? as lib directory name. Signed-off-by: Bai Yingjie <byj.tea@gmail.com> [ThomasDS: update commit message] Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> [Thomas: add comment above the function being modified to illustrate the various cases we try to handle.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain/helpers.mk: use --chmod on rsyncGuido Martínez2015-07-131-1/+1
| | | | | | | | | This makes sure we don't have any weird permissions on the staging dir, which could affect the target. 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>
* aarch64: add big endian(aarch64_be) supportBamvor Jian Zhang2015-07-121-13/+14
| | | | | | | | | 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>
* packages: do not use TAR_STRIP_COMPONENTS, but directly --strip-componentsThomas Petazzoni2015-07-121-3/+3
| | | | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain: allow for stupid toolchainsGuido Martínez2015-06-281-2/+4
| | | | | | | | | | | | | | | | | check_arm_abi builds a test C file to check that the toolchain is working correctly, with the output redirected to /dev/null. However, some toolchains (OSELAS 2014.12.0, for instance) foolishly append ".gdb" to the output filename for an intermediate file, causing an attempt to write to /dev/null.gdb, which obviously fails. Fix this by adding changing the output to a temporary file, which is later removed along with any other "suffixed" files. Suggested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain-buildroot: mark eglibc as deprecatedThomas Petazzoni2015-06-231-0/+1
| | | | | | | | | eglibc is a dead project and has not been making any release since a while, now that glibc is back and kicking. So let's deprecated our eglibc support. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
OpenPOWER on IntegriCloud