[U-Boot] [PATCH 1/3] buildman: Allow 'gnueabihf' toolchains for ARM

Many toolchains for ARM use the 'gnueabihf' suffix rather than just 'gnueabi', so allow these to be used, but with a lower priority than 'gnueabi' ones.
Cc: Simon Glass sjg@chromium.org Signed-off-by: Tom Rini trini@konsulko.com --- tools/buildman/toolchain.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index 47788762016b..5cf97ac8148e 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -120,8 +120,9 @@ class Toolchain: Priority of toolchain, PRIORITY_CALC=highest, 20=lowest. """ priority_list = ['-elf', '-unknown-linux-gnu', '-linux', - '-none-linux-gnueabi', '-uclinux', '-none-eabi', - '-gentoo-linux-gnu', '-linux-gnueabi', '-le-linux', '-uclinux'] + '-none-linux-gnueabi', '-none-linux-gnueabihf', '-uclinux', + '-none-eabi', '-gentoo-linux-gnu', '-linux-gnueabi', + '-linux-gnueabihf', '-le-linux', '-uclinux'] for prio in range(len(priority_list)): if priority_list[prio] in fname: return PRIORITY_CALC + prio

Linaro provides a number of pre-built GCC toolchains for both 32 and 64bit ARM. Switch to their 2017.02 release of gcc-6.3.1 for both.
Cc: Koen Kooi koen.kooi@linaro.org Signed-off-by: Tom Rini trini@konsulko.com --- .travis.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/.travis.yml b/.travis.yml index 591915df4c89..f6898a2edb7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,8 +22,6 @@ addons: - swig - libpython-dev - gcc-powerpc-linux-gnu - - gcc-arm-linux-gnueabihf - - gcc-aarch64-linux-gnu - iasl - grub-efi-ia32-bin - rpm2cpio @@ -40,6 +38,8 @@ install: - ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname` # prepare buildman environment - echo -e "[toolchain]\nroot = /usr" > ~/.buildman + - echo -e "aarch64 = /tmp/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu" >> ~/.buildman + - echo -e "arm = /tmp/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf" >> ~/.buildman - echo -e "\n[toolchain-alias]\nsh = sh4\nopenrisc = or32" >> ~/.buildman - cat ~/.buildman - virtualenv /tmp/venv @@ -70,6 +70,13 @@ before_script: echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman; fi - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi + # If TOOLCHAIN is unset, we're on some flavour of ARM. + - if [[ "${TOOLCHAIN}" == "" ]]; then + wget http://releases.linaro.org/components/toolchain/binaries/6.3-2017.02/aarch64... && + wget http://releases.linaro.org/components/toolchain/binaries/6.3-2017.02/arm-lin... && + tar -C /tmp -xf gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz && + tar -C /tmp -xf gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf.tar.xz; + fi - if [[ "${QEMU_TARGET}" != "" ]]; then git clone git://git.qemu.org/qemu.git /tmp/qemu; pushd /tmp/qemu; @@ -152,7 +159,7 @@ matrix: - env: - BUILDMAN="sun7i" - env: - - BUILDMAN="sun8i -x orangepi_pc2" + - BUILDMAN="sun8i" - env: - BUILDMAN="sun9i" - env: @@ -221,7 +228,6 @@ matrix: - BUILDMAN="uniphier" - env: - BUILDMAN="aarch64 -x tegra,freescale,mvebu,uniphier,sunxi,samsung,rockchip" - TOOLCHAIN="aarch64" - env: - BUILDMAN="rockchip" - env:

On Fri, Apr 14, 2017 at 07:47:51PM -0400, Tom Rini wrote:
Linaro provides a number of pre-built GCC toolchains for both 32 and 64bit ARM. Switch to their 2017.02 release of gcc-6.3.1 for both.
Cc: Koen Kooi koen.kooi@linaro.org Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

There are more and more cases where if we do not use gcc-6.0 or later we run into problems where our binaries are too large for the targets. Given the prevalence of gcc-6.0 or later toolchains at this point in time, we give notice now that starting with v2018.01 we will require gcc-6 (or later) for ARM.
Signed-off-by: Tom Rini trini@konsulko.com --- arch/arm/config.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 907c69371b94..9d305e1f4448 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -45,7 +45,14 @@ endif
# Only test once ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y) -archprepare: checkthumb +archprepare: checkthumb checkgcc6 + +checkgcc6: + @if test "$(call cc-name)" = "gcc" -a \ + "$(call cc-version)" -lt "0600"; then \ + echo -n '*** Your GCC is older than 6.0 and will not be '; \ + echo 'supported starting with v2018.01.'; \ + fi
checkthumb: @if test "$(call cc-name)" = "gcc" -a \

Hi Tom,
2017-04-15 8:47 GMT+09:00 Tom Rini trini@konsulko.com:
There are more and more cases where if we do not use gcc-6.0 or later we run into problems where our binaries are too large for the targets. Given the prevalence of gcc-6.0 or later toolchains at this point in time, we give notice now that starting with v2018.01 we will require gcc-6 (or later) for ARM.
Signed-off-by: Tom Rini trini@konsulko.com
arch/arm/config.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 907c69371b94..9d305e1f4448 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -45,7 +45,14 @@ endif
# Only test once ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y) -archprepare: checkthumb +archprepare: checkthumb checkgcc6
+checkgcc6:
@if test "$(call cc-name)" = "gcc" -a \
"$(call cc-version)" -lt "0600"; then \
echo -n '*** Your GCC is older than 6.0 and will not be '; \
echo 'supported starting with v2018.01.'; \
fi
checkthumb: @if test "$(call cc-name)" = "gcc" -a \ --
I am confused.
Is this requirement only for thumb, or for all ARM?
Looking at the code, the check is wrapped with ifeq CONFIG_SYS_THUMB_BUILD.
If you intend this for thumb, please describe it in git-log. If not, the code seems not effective.

On Sat, Apr 15, 2017 at 11:40:10AM +0900, Masahiro Yamada wrote:
Hi Tom,
2017-04-15 8:47 GMT+09:00 Tom Rini trini@konsulko.com:
There are more and more cases where if we do not use gcc-6.0 or later we run into problems where our binaries are too large for the targets. Given the prevalence of gcc-6.0 or later toolchains at this point in time, we give notice now that starting with v2018.01 we will require gcc-6 (or later) for ARM.
Signed-off-by: Tom Rini trini@konsulko.com
arch/arm/config.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 907c69371b94..9d305e1f4448 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -45,7 +45,14 @@ endif
# Only test once ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y) -archprepare: checkthumb +archprepare: checkthumb checkgcc6
+checkgcc6:
@if test "$(call cc-name)" = "gcc" -a \
"$(call cc-version)" -lt "0600"; then \
echo -n '*** Your GCC is older than 6.0 and will not be '; \
echo 'supported starting with v2018.01.'; \
fi
checkthumb: @if test "$(call cc-name)" = "gcc" -a \ --
I am confused.
Is this requirement only for thumb, or for all ARM?
All ARM. So, when this moves from a warning to a fail, checkthumb should go away at that time.
Looking at the code, the check is wrapped with ifeq CONFIG_SYS_THUMB_BUILD.
Oops, I too quickly copied the checkthumb example. I'll do a v2 after giving others a chance to comment. Thanks!

There are more and more cases where if we do not use gcc-6.0 or later we run into problems where our binaries are too large for the targets. Given the prevalence of gcc-6.0 or later toolchains at this point in time, we give notice now that starting with v2018.01 we will require gcc-6 (or later) for ARM.
Signed-off-by: Tom Rini trini@konsulko.com --- Changes in v2: - Move logic out of THUMB check so we always do it, as noted by Masahiro. - Reword the message slightly so it's shorter than 80 characters. --- arch/arm/config.mk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 907c69371b94..eb09b0e37878 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -45,7 +45,7 @@ endif
# Only test once ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y) -archprepare: checkthumb +archprepare: checkthumb checkgcc6
checkthumb: @if test "$(call cc-name)" = "gcc" -a \ @@ -55,8 +55,18 @@ checkthumb: echo '*** Your board is configured for THUMB mode.'; \ false; \ fi +else +archprepare: checkgcc6 endif
+checkgcc6: + @if test "$(call cc-name)" = "gcc" -a \ + "$(call cc-version)" -lt "0600"; then \ + echo -n '*** Your GCC is older than 6.0 and will not be '; \ + echo 'supported starting in v2018.01.'; \ + fi + + # Try if EABI is supported, else fall back to old API, # i. e. for example: # - with ELDK 4.2 (EABI supported), use:

On Mon, Apr 17, 2017 at 09:18:00AM -0400, Tom Rini wrote:
There are more and more cases where if we do not use gcc-6.0 or later we run into problems where our binaries are too large for the targets. Given the prevalence of gcc-6.0 or later toolchains at this point in time, we give notice now that starting with v2018.01 we will require gcc-6 (or later) for ARM.
Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

On 14 April 2017 at 17:47, Tom Rini trini@konsulko.com wrote:
Many toolchains for ARM use the 'gnueabihf' suffix rather than just 'gnueabi', so allow these to be used, but with a lower priority than 'gnueabi' ones.
Cc: Simon Glass sjg@chromium.org Signed-off-by: Tom Rini trini@konsulko.com
tools/buildman/toolchain.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Fri, Apr 14, 2017 at 07:47:50PM -0400, Tom Rini wrote:
Many toolchains for ARM use the 'gnueabihf' suffix rather than just 'gnueabi', so allow these to be used, but with a lower priority than 'gnueabi' ones.
Cc: Simon Glass sjg@chromium.org Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!
participants (3)
-
Masahiro Yamada
-
Simon Glass
-
Tom Rini