Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH V2 4/9] package/binutils: Add C-SKY support
Date: Sun, 26 May 2019 22:52:11 +0200	[thread overview]
Message-ID: <20190526225211.439a62d0@windsurf> (raw)
In-Reply-To: <1557305915-11247-4-git-send-email-guoren@kernel.org>

Hello,

On Wed,  8 May 2019 16:58:30 +0800
guoren at kernel.org wrote:

> +if !BR2_csky
>  choice
>  	prompt "Binutils Version"
>  	default BR2_BINUTILS_VERSION_2_31_X if !BR2_arc
> @@ -32,6 +33,7 @@ config BR2_BINUTILS_VERSION
>  	default "2.30"		if BR2_BINUTILS_VERSION_2_30_X
>  	default "2.31.1"	if BR2_BINUTILS_VERSION_2_31_X
>  	default "2.32"		if BR2_BINUTILS_VERSION_2_32_X
> +endif

Let's do it like we do for the ARC architecture: add an option, and the
proper depends on. I.e:

choice
        prompt "Binutils Version"
        default BR2_BINUTILS_VERSION_ARC if BR2_arc
	default BR2_BINUTILS_VERSION_CSKY if BR2_csky
        default BR2_BINUTILS_VERSION_2_31_X
        help
          Select the version of binutils you wish to use.

config BR2_BINUTILS_VERSION_2_30_X
        bool "binutils 2.30"
	depends on !BR2_csky

config BR2_BINUTILS_VERSION_2_31_X
        bool "binutils 2.31.1"
	depends on !BR2_csky

config BR2_BINUTILS_VERSION_2_32_X
        bool "binutils 2.32"
	depends on !BR2_csky

config BR2_BINUTILS_VERSION_ARC
        bool "binutils arc (2.31)"
        depends on BR2_arc

config BR2_BINUTILS_VERSION_CSKY
        bool "binutils csky (2.32)"
        depends on BR2_csky

endchoice

config BR2_BINUTILS_VERSION
        string
	default "c66d8bbcebfddf713b2b436e1b135e6b125a55a5" if BR2_BINUTILS_VERSION_CSKY
        default "arc-2019.03-rc1"       if BR2_BINUTILS_VERSION_ARC
        default "2.30"          if BR2_BINUTILS_VERSION_2_30_X
        default "2.31.1"        if BR2_BINUTILS_VERSION_2_31_X
        default "2.32"          if BR2_BINUTILS_VERSION_2_32_X


> diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
> index c70ba13..cebfd06 100644
> --- a/package/binutils/binutils.mk
> +++ b/package/binutils/binutils.mk
> @@ -20,6 +20,14 @@ BINUTILS_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,binutils-gdb,
>  BINUTILS_SOURCE = binutils-gdb-$(BINUTILS_VERSION).tar.gz
>  BINUTILS_FROM_GIT = y
>  endif
> +
> +ifeq ($(BR2_csky),y)
> +BINUTILS_VERSION = c66d8bbcebfddf713b2b436e1b135e6b125a55a5
> +BINUTILS_SITE = $(call github,c-sky,binutils-gdb,$(BINUTILS_VERSION))
> +BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.gz
> +BINUTILS_FROM_GIT = y
> +endif

Same here, please follow the same logic as the one used for ARC, for
consistency, i.e:

# Version is set when using buildroot toolchain.
# If not, we do like other packages
BINUTILS_VERSION = $(call qstrip,$(BR2_BINUTILS_VERSION))
ifeq ($(BINUTILS_VERSION),)
ifeq ($(BR2_arc),y)
BINUTILS_VERSION = arc-2019.03-rc1
else ifeq ($(BR2_csky),y)
BINUTILS_VERSION = c66d8bbcebfddf713b2b436e1b135e6b125a55a5
else
BINUTILS_VERSION = 2.31.1
endif
endif # BINUTILS_VERSION

ifeq ($(BINUTILS_VERSION),arc-2019.03-rc1)
BINUTILS_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,binutils-gdb,$(BINUTILS_VERSION))
BINUTILS_SOURCE = binutils-gdb-$(BINUTILS_VERSION).tar.gz
BINUTILS_FROM_GIT = y
else ifeq ($(BINUTILS_VERSION),c66d8bbcebfddf713b2b436e1b135e6b125a55a5)
BINUTILS_SITE = $(call github,c-sky,binutils-gdb,$(BINUTILS_VERSION))
BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.gz
BINUTILS_FROM_GIT = y
endif

What we're doing for ARC is made not the best, but being consistent in
how different architectures do it is much more important.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2019-05-26 20:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08  8:58 [Buildroot] [PATCH V2 1/9] arch/csky: Add VDSP and FLOAT_ABI compiler options guoren at kernel.org
2019-05-08  8:58 ` [Buildroot] [PATCH V2 2/9] arch/csky: Add ck860 and -mcpu " guoren at kernel.org
2019-05-26 20:43   ` Thomas Petazzoni
2019-05-27  6:43     ` Guo Ren
2019-05-08  8:58 ` [Buildroot] [PATCH V2 3/9] arch/csky: Add toolchain build framework guoren at kernel.org
2019-05-26 20:44   ` Thomas Petazzoni
2019-05-27  6:52     ` Guo Ren
2019-05-08  8:58 ` [Buildroot] [PATCH V2 4/9] package/binutils: Add C-SKY support guoren at kernel.org
2019-05-26 20:52   ` Thomas Petazzoni [this message]
2019-05-27  7:23     ` Guo Ren
2019-05-08  8:58 ` [Buildroot] [PATCH V2 5/9] package/gcc: " guoren at kernel.org
2019-05-26 20:53   ` Thomas Petazzoni
2019-05-27  7:27     ` Guo Ren
2019-05-08  8:58 ` [Buildroot] [PATCH V2 6/9] package/gdb: " guoren at kernel.org
2019-05-26 20:56   ` Thomas Petazzoni
2019-05-27  8:08     ` Guo Ren
2019-05-08  8:58 ` [Buildroot] [PATCH V2 7/9] package/glibc: " guoren at kernel.org
2019-05-26 20:57   ` Thomas Petazzoni
2019-05-27  8:11     ` Guo Ren
2019-05-08  8:58 ` [Buildroot] [PATCH V2 8/9] support/config.sub: " guoren at kernel.org
2019-05-27 20:30   ` Thomas Petazzoni
2019-05-27 22:00     ` Peter Korsgaard
2019-05-28  6:55       ` Thomas Petazzoni
2019-06-06 15:19     ` Peter Korsgaard
2019-05-08  8:58 ` [Buildroot] [PATCH V2 9/9] configs/qemu_cskyXXX_virt: new defconfig guoren at kernel.org
2019-05-13  5:46 ` [Buildroot] [PATCH V2 1/9] arch/csky: Add VDSP and FLOAT_ABI compiler options Guo Ren
2019-05-26 20:39 ` Thomas Petazzoni
2019-05-26 20:40 ` Thomas Petazzoni
2019-05-27 11:35   ` Guo Ren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190526225211.439a62d0@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox