Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] binutils: Add user support for fetching from git.
       [not found] <cover.1416611974.git.andrew.burgess@embecosm.com>
@ 2014-11-21 23:32 ` Andrew Burgess
  2014-12-02 16:02   ` Andrew Burgess
  2014-12-03 19:04   ` Yann E. MORIN
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Burgess @ 2014-11-21 23:32 UTC (permalink / raw)
  To: buildroot

This change adds a new option "from git repository" to the list of
available binutils versions.  Selecting this allows the user to input
the URL of a git repository, and the version to use from the
repository.

The ARC target, which previously was hard coding a git URL and version
into binutils.mk switches to this new scheme, moving the URL and
version into Config.in.host.

This is my first buildroot patch, I don't know if this is a change
that will be useful to others, but it's been helpful for me.

Feedback, comments welcome.

Thanks,
Andrew


Signed-off-by: Andrew Burgess <andrew.burgess@embecosm.com>
---
 package/binutils/Config.in.host | 29 ++++++++++++++++++++++++-----
 package/binutils/binutils.mk    |  8 ++++----
 2 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host
index 45f604a..e2b8e11 100644
--- a/package/binutils/Config.in.host
+++ b/package/binutils/Config.in.host
@@ -2,7 +2,6 @@ comment "Binutils Options"
 
 choice
 	prompt "Binutils Version"
-	depends on !BR2_arc
 	default BR2_BINUTILS_VERSION_2_24 if BR2_microblaze || BR2_powerpc64le
 	default BR2_BINUTILS_VERSION_2_22
 	help
@@ -13,25 +12,45 @@ choice
 		bool "binutils 2.18-avr32-1.0.1"
 
 	config BR2_BINUTILS_VERSION_2_22
-		depends on !BR2_avr32 && !BR2_aarch64 && !BR2_microblaze && !BR2_powerpc64le
+		depends on !BR2_avr32 && !BR2_aarch64 && !BR2_microblaze && !BR2_powerpc64le && !BR2_arc
 		bool "binutils 2.22"
 
 	# bfin disabled for newer binutils due to
 	# https://sourceware.org/bugzilla/show_bug.cgi?id=17334
 	config BR2_BINUTILS_VERSION_2_23_2
-		depends on !BR2_avr32 && !BR2_aarch64 && !BR2_bfin && !BR2_microblaze && !BR2_powerpc64le
+		depends on !BR2_avr32 && !BR2_aarch64 && !BR2_bfin && !BR2_microblaze && !BR2_powerpc64le && !BR2_arc
 		bool "binutils 2.23.2"
 
 	config BR2_BINUTILS_VERSION_2_24
-		depends on !BR2_avr32 && !BR2_bfin
+		depends on !BR2_avr32 && !BR2_bfin && !BR2_arc
 		bool "binutils 2.24"
 
+	config BR2_BINUTILS_VERSION_GIT
+		bool "from git repository"
+
 endchoice
 
+if BR2_BINUTILS_VERSION_GIT
+
+config BR2_BINUTILS_CUSTOM_REPO_URL
+	string "URL of binutils repository"
+	default "git://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb" if BR2_arc
+	help
+	  URL for git repository to use.
+
+config BR2_BINUTILS_CUSTOM_REPO_VERSION
+	string "Version of binutils repository"
+	default "arc-2014.08"	if BR2_arc
+	help
+	  Revision to use in the typical format used by Git/Mercurial
+	  E.G. a sha id, a tag, branch, ..
+
+endif
+
 config BR2_BINUTILS_VERSION
 	string
+	default BR2_BINUTILS_CUSTOM_REPO_VERSION if BR2_BINUTILS_VERSION_GIT
 	default "2.18-avr32-1.0.1" if BR2_BINUTILS_VERSION_2_18_AVR32_1_0_1
-	default "arc-2014.08"	if BR2_arc
 	default "2.22"		if BR2_BINUTILS_VERSION_2_22
 	default "2.23.2"	if BR2_BINUTILS_VERSION_2_23_2
 	default "2.24"		if BR2_BINUTILS_VERSION_2_24
diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index b8dab5d..16c542b 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -19,10 +19,10 @@ endif
 ifeq ($(ARCH),avr32)
 BINUTILS_SITE = ftp://www.at91.com/pub/buildroot
 endif
-ifeq ($(BR2_arc),y)
-BINUTILS_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,binutils-gdb,$(BINUTILS_VERSION))
+ifeq ($(BR2_BINUTILS_VERSION_GIT),y)
+BINUTILS_SITE = $(call qstrip,$(BR2_BINUTILS_CUSTOM_REPO_URL))
+BINUTILS_SITE_METHOD = git
 BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.gz
-BINUTILS_FROM_GIT = y
 endif
 BINUTILS_SITE ?= $(BR2_GNU_MIRROR)/binutils
 BINUTILS_SOURCE ?= binutils-$(BINUTILS_VERSION).tar.bz2
@@ -33,7 +33,7 @@ HOST_BINUTILS_DEPENDENCIES =
 BINUTILS_LICENSE = GPLv3+, libiberty LGPLv2.1+
 BINUTILS_LICENSE_FILES = COPYING3 COPYING.LIB
 
-ifeq ($(BINUTILS_FROM_GIT),y)
+ifeq ($(BR2_BINUTILS_VERSION_GIT),y)
 BINUTILS_DEPENDENCIES += host-texinfo host-flex host-bison
 HOST_BINUTILS_DEPENDENCIES += host-texinfo host-flex host-bison
 endif
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] binutils: Add user support for fetching from git.
  2014-11-21 23:32 ` [Buildroot] [PATCH] binutils: Add user support for fetching from git Andrew Burgess
@ 2014-12-02 16:02   ` Andrew Burgess
  2014-12-03 19:04   ` Yann E. MORIN
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Burgess @ 2014-12-02 16:02 UTC (permalink / raw)
  To: buildroot

Ping! I don't know if there's any interest in adding this feature.
I've found it pretty useful, but I understand that there might not be
a desire to allow random versions to be fetched from version control.

Thanks,
Andrew

* Andrew Burgess <andrew.burgess@embecosm.com> [2014-11-21 23:32:36 +0000]:

> This change adds a new option "from git repository" to the list of
> available binutils versions.  Selecting this allows the user to input
> the URL of a git repository, and the version to use from the
> repository.
> 
> The ARC target, which previously was hard coding a git URL and version
> into binutils.mk switches to this new scheme, moving the URL and
> version into Config.in.host.
> 
> This is my first buildroot patch, I don't know if this is a change
> that will be useful to others, but it's been helpful for me.
> 
> Feedback, comments welcome.
> 
> Thanks,
> Andrew
> 
> 
> Signed-off-by: Andrew Burgess <andrew.burgess@embecosm.com>
> ---
>  package/binutils/Config.in.host | 29 ++++++++++++++++++++++++-----
>  package/binutils/binutils.mk    |  8 ++++----
>  2 files changed, 28 insertions(+), 9 deletions(-)
> 
> diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host
> index 45f604a..e2b8e11 100644
> --- a/package/binutils/Config.in.host
> +++ b/package/binutils/Config.in.host
> @@ -2,7 +2,6 @@ comment "Binutils Options"
>  
>  choice
>  	prompt "Binutils Version"
> -	depends on !BR2_arc
>  	default BR2_BINUTILS_VERSION_2_24 if BR2_microblaze || BR2_powerpc64le
>  	default BR2_BINUTILS_VERSION_2_22
>  	help
> @@ -13,25 +12,45 @@ choice
>  		bool "binutils 2.18-avr32-1.0.1"
>  
>  	config BR2_BINUTILS_VERSION_2_22
> -		depends on !BR2_avr32 && !BR2_aarch64 && !BR2_microblaze && !BR2_powerpc64le
> +		depends on !BR2_avr32 && !BR2_aarch64 && !BR2_microblaze && !BR2_powerpc64le && !BR2_arc
>  		bool "binutils 2.22"
>  
>  	# bfin disabled for newer binutils due to
>  	# https://sourceware.org/bugzilla/show_bug.cgi?id=17334
>  	config BR2_BINUTILS_VERSION_2_23_2
> -		depends on !BR2_avr32 && !BR2_aarch64 && !BR2_bfin && !BR2_microblaze && !BR2_powerpc64le
> +		depends on !BR2_avr32 && !BR2_aarch64 && !BR2_bfin && !BR2_microblaze && !BR2_powerpc64le && !BR2_arc
>  		bool "binutils 2.23.2"
>  
>  	config BR2_BINUTILS_VERSION_2_24
> -		depends on !BR2_avr32 && !BR2_bfin
> +		depends on !BR2_avr32 && !BR2_bfin && !BR2_arc
>  		bool "binutils 2.24"
>  
> +	config BR2_BINUTILS_VERSION_GIT
> +		bool "from git repository"
> +
>  endchoice
>  
> +if BR2_BINUTILS_VERSION_GIT
> +
> +config BR2_BINUTILS_CUSTOM_REPO_URL
> +	string "URL of binutils repository"
> +	default "git://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb" if BR2_arc
> +	help
> +	  URL for git repository to use.
> +
> +config BR2_BINUTILS_CUSTOM_REPO_VERSION
> +	string "Version of binutils repository"
> +	default "arc-2014.08"	if BR2_arc
> +	help
> +	  Revision to use in the typical format used by Git/Mercurial
> +	  E.G. a sha id, a tag, branch, ..
> +
> +endif
> +
>  config BR2_BINUTILS_VERSION
>  	string
> +	default BR2_BINUTILS_CUSTOM_REPO_VERSION if BR2_BINUTILS_VERSION_GIT
>  	default "2.18-avr32-1.0.1" if BR2_BINUTILS_VERSION_2_18_AVR32_1_0_1
> -	default "arc-2014.08"	if BR2_arc
>  	default "2.22"		if BR2_BINUTILS_VERSION_2_22
>  	default "2.23.2"	if BR2_BINUTILS_VERSION_2_23_2
>  	default "2.24"		if BR2_BINUTILS_VERSION_2_24
> diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
> index b8dab5d..16c542b 100644
> --- a/package/binutils/binutils.mk
> +++ b/package/binutils/binutils.mk
> @@ -19,10 +19,10 @@ endif
>  ifeq ($(ARCH),avr32)
>  BINUTILS_SITE = ftp://www.at91.com/pub/buildroot
>  endif
> -ifeq ($(BR2_arc),y)
> -BINUTILS_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,binutils-gdb,$(BINUTILS_VERSION))
> +ifeq ($(BR2_BINUTILS_VERSION_GIT),y)
> +BINUTILS_SITE = $(call qstrip,$(BR2_BINUTILS_CUSTOM_REPO_URL))
> +BINUTILS_SITE_METHOD = git
>  BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.gz
> -BINUTILS_FROM_GIT = y
>  endif
>  BINUTILS_SITE ?= $(BR2_GNU_MIRROR)/binutils
>  BINUTILS_SOURCE ?= binutils-$(BINUTILS_VERSION).tar.bz2
> @@ -33,7 +33,7 @@ HOST_BINUTILS_DEPENDENCIES =
>  BINUTILS_LICENSE = GPLv3+, libiberty LGPLv2.1+
>  BINUTILS_LICENSE_FILES = COPYING3 COPYING.LIB
>  
> -ifeq ($(BINUTILS_FROM_GIT),y)
> +ifeq ($(BR2_BINUTILS_VERSION_GIT),y)
>  BINUTILS_DEPENDENCIES += host-texinfo host-flex host-bison
>  HOST_BINUTILS_DEPENDENCIES += host-texinfo host-flex host-bison
>  endif
> -- 
> 1.9.3
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] binutils: Add user support for fetching from git.
  2014-11-21 23:32 ` [Buildroot] [PATCH] binutils: Add user support for fetching from git Andrew Burgess
  2014-12-02 16:02   ` Andrew Burgess
@ 2014-12-03 19:04   ` Yann E. MORIN
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2014-12-03 19:04 UTC (permalink / raw)
  To: buildroot

Andrew, All,

On 2014-11-21 23:32 +0000, Andrew Burgess spake thusly:
> This change adds a new option "from git repository" to the list of
> available binutils versions.  Selecting this allows the user to input
> the URL of a git repository, and the version to use from the
> repository.
> 
> The ARC target, which previously was hard coding a git URL and version
> into binutils.mk switches to this new scheme, moving the URL and
> version into Config.in.host.

Thank you for your contribution, and sorry for the delay in answering.

The fact that we need a git revision for arc is just happenstance, we
could well point to a tarball of that tag instead of getting it from
git; we do not use a tarball because none is available to our knowledge,
and thus we have to use the git tree.

However, this is creating an imbalance between binutils and gcc/glibc/...
and basically all other packages (except very few critical ones) for
which we do not offer a choice to use a random git tree or commit.

Moreover, we believe this situation is better served by using the
_OVERRIDE_SRCDIR feature, see:
    http://nightly.buildroot.org/#_advanced_usage

    8.11.6. Using Buildroot during development

    [...] Buildroot provides a specific mechanism for this use case: the
    <pkg>_OVERRIDE_SRCDIR mechanism. Buildroot reads an override file,
    which allows the user to tell Buildroot the location of the source
    for certain packages.

In this case, you would have to provide:

    HOST_BINUTILS_OVERRIDE_SRCDIR=/path/to/your/arc-binutils

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-03 19:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1416611974.git.andrew.burgess@embecosm.com>
2014-11-21 23:32 ` [Buildroot] [PATCH] binutils: Add user support for fetching from git Andrew Burgess
2014-12-02 16:02   ` Andrew Burgess
2014-12-03 19:04   ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox