linux-snps-arc.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARC toolchian related fixes
@ 2019-12-06 19:39 Vineet Gupta
  2019-12-06 19:39 ` [PATCH 1/3] toolchain,glibc: Allow ARC big endian glibc builds Vineet Gupta
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Vineet Gupta @ 2019-12-06 19:39 UTC (permalink / raw)
  To: buildroot; +Cc: Evgeniy.Didin, linux-snps-arc, Vineet Gupta, Alexey.Brodkin

Hi,

PFA some improvements agan out of my glibc porting work.

Thx,
-Vineet

Vineet Gupta (3):
  toolchain,glibc: Allow ARC big endian glibc builds
  binutils/ARC: move ARC specific code together
  toolchain/ARC: Enable ability to build with upstream gcc/binutils

 arch/Config.in.arc                      | 4 ++++
 package/binutils/Config.in.host         | 6 +++---
 package/binutils/binutils.mk            | 7 ++-----
 package/gcc/Config.in.host              | 4 ++--
 toolchain/toolchain-buildroot/Config.in | 2 +-
 5 files changed, 12 insertions(+), 11 deletions(-)

-- 
2.20.1


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

* [PATCH 1/3] toolchain,glibc: Allow ARC big endian glibc builds
  2019-12-06 19:39 [PATCH 0/3] ARC toolchian related fixes Vineet Gupta
@ 2019-12-06 19:39 ` Vineet Gupta
  2019-12-06 21:18   ` [Buildroot] [PATCH 1/3] toolchain, glibc: " Thomas Petazzoni
  2019-12-06 19:39 ` [PATCH 2/3] binutils/ARC: move ARC specific code together Vineet Gupta
  2019-12-06 19:39 ` [PATCH 3/3] toolchain/ARC: Enable ability to build with upstream gcc/binutils Vineet Gupta
  2 siblings, 1 reply; 13+ messages in thread
From: Vineet Gupta @ 2019-12-06 19:39 UTC (permalink / raw)
  To: buildroot; +Cc: Evgeniy.Didin, linux-snps-arc, Vineet Gupta, Alexey.Brodkin

From: Vineet Gupta <Vineet.Gupta1@synopsys.com>

Apparently big endian glibc builds just work, if we let the endian
header allow that (which prev was #error).

The current ARC glibc version in buildroot arc-2019.09-rc1 already
contains that fix.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 toolchain/toolchain-buildroot/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index 95d513004aa0..a980f766ac14 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -48,7 +48,7 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC
 		   BR2_powerpc     || BR2_powerpc64  || BR2_powerpc64le || \
 		   BR2_riscv       || BR2_sh         || BR2_sparc64     || \
 		   BR2_x86_64      || BR2_microblaze || BR2_nios2       || \
-		   (BR2_arcle && BR2_ARC_ATOMIC_EXT) || BR2_csky
+		   (BR2_arc && BR2_ARC_ATOMIC_EXT)   || BR2_csky
 	depends on BR2_USE_MMU
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
-- 
2.20.1


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

* [PATCH 2/3] binutils/ARC: move ARC specific code together
  2019-12-06 19:39 [PATCH 0/3] ARC toolchian related fixes Vineet Gupta
  2019-12-06 19:39 ` [PATCH 1/3] toolchain,glibc: Allow ARC big endian glibc builds Vineet Gupta
@ 2019-12-06 19:39 ` Vineet Gupta
  2019-12-06 21:19   ` [Buildroot] " Thomas Petazzoni
  2019-12-06 19:39 ` [PATCH 3/3] toolchain/ARC: Enable ability to build with upstream gcc/binutils Vineet Gupta
  2 siblings, 1 reply; 13+ messages in thread
From: Vineet Gupta @ 2019-12-06 19:39 UTC (permalink / raw)
  To: buildroot; +Cc: Evgeniy.Didin, linux-snps-arc, Vineet Gupta, Alexey.Brodkin

That way ARC specific version update needs to be done in 1 place only

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 package/binutils/binutils.mk | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index a19d6940f7c1..ecc78b81e59f 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -8,14 +8,11 @@
 # 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.09-rc1
-else
 BINUTILS_VERSION = 2.32
 endif
-endif # BINUTILS_VERSION
 
-ifeq ($(BINUTILS_VERSION),arc-2019.09-rc1)
+ifeq ($(BR2_arc),y)
+BINUTILS_VERSION = arc-2019.09-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
-- 
2.20.1


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

* [PATCH 3/3] toolchain/ARC: Enable ability to build with upstream gcc/binutils
  2019-12-06 19:39 [PATCH 0/3] ARC toolchian related fixes Vineet Gupta
  2019-12-06 19:39 ` [PATCH 1/3] toolchain,glibc: Allow ARC big endian glibc builds Vineet Gupta
  2019-12-06 19:39 ` [PATCH 2/3] binutils/ARC: move ARC specific code together Vineet Gupta
@ 2019-12-06 19:39 ` Vineet Gupta
  2019-12-06 21:26   ` [Buildroot] " Thomas Petazzoni
  2 siblings, 1 reply; 13+ messages in thread
From: Vineet Gupta @ 2019-12-06 19:39 UTC (permalink / raw)
  To: buildroot; +Cc: Evgeniy.Didin, linux-snps-arc, Vineet Gupta, Alexey.Brodkin

While ARC upstream gcc/binutils work, they are still trailing behind
the more up to date code at github. To help expedite this gap, we want
to test the upstreeam versiosn more often, hence this patch. It allows
ARC tools to be built of upstream gcc/binutils.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 arch/Config.in.arc              | 4 ++++
 package/binutils/Config.in.host | 6 +++---
 package/binutils/binutils.mk    | 2 +-
 package/gcc/Config.in.host      | 4 ++--
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/arch/Config.in.arc b/arch/Config.in.arc
index fdfafda31c72..c389ba8b42c9 100644
--- a/arch/Config.in.arc
+++ b/arch/Config.in.arc
@@ -59,6 +59,10 @@ config BR2_arc
 	bool
 	default y if BR2_arcle || BR2_arceb
 
+config BR2_arc_gh
+	bool "ARC github tools"
+	default y if BR2_arc
+
 config BR2_ENDIAN
 	default "LITTLE" if BR2_arcle
 	default "BIG"	 if BR2_arceb
diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host
index 514f620086eb..78785878cecc 100644
--- a/package/binutils/Config.in.host
+++ b/package/binutils/Config.in.host
@@ -7,8 +7,8 @@ config BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI
 
 choice
 	prompt "Binutils Version"
-	default BR2_BINUTILS_VERSION_2_32_X if !BR2_arc && !BR2_csky
-	default BR2_BINUTILS_VERSION_ARC if BR2_arc
+	default BR2_BINUTILS_VERSION_2_32_X if !BR2_arc_gh && !BR2_csky
+	default BR2_BINUTILS_VERSION_ARC if BR2_arc_gh
 	default BR2_BINUTILS_VERSION_CSKY if BR2_csky
 	help
 	  Select the version of binutils you wish to use.
@@ -27,7 +27,7 @@ config BR2_BINUTILS_VERSION_2_33_X
 
 config BR2_BINUTILS_VERSION_ARC
 	bool "binutils arc (2.31)"
-	depends on BR2_arc
+	depends on BR2_arc_gh
 
 config BR2_BINUTILS_VERSION_CSKY
 	bool "binutils csky"
diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index ecc78b81e59f..63567db069ab 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -11,7 +11,7 @@ ifeq ($(BINUTILS_VERSION),)
 BINUTILS_VERSION = 2.32
 endif
 
-ifeq ($(BR2_arc),y)
+ifeq ($(BR2_arc_gh),y)
 BINUTILS_VERSION = arc-2019.09-rc1
 BINUTILS_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,binutils-gdb,$(BINUTILS_VERSION))
 BINUTILS_SOURCE = binutils-gdb-$(BINUTILS_VERSION).tar.gz
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 92af40b19fc3..d9f4c6cae14b 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -2,7 +2,7 @@ comment "GCC Options"
 
 choice
 	prompt "GCC compiler Version"
-	default BR2_GCC_VERSION_ARC if BR2_arc
+	default BR2_GCC_VERSION_ARC if BR2_arc_gh
 	default BR2_GCC_VERSION_CSKY if BR2_csky
 	default BR2_GCC_VERSION_OR1K if BR2_or1k
 	default BR2_GCC_VERSION_8_X
@@ -12,7 +12,7 @@ choice
 config BR2_GCC_VERSION_ARC
 	bool "gcc arc (9.x)"
 	# Only supported architecture
-	depends on BR2_arc
+	depends on BR2_arc_gh
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_9
 
 config BR2_GCC_VERSION_CSKY
-- 
2.20.1


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

* Re: [Buildroot] [PATCH 1/3] toolchain, glibc: Allow ARC big endian glibc builds
  2019-12-06 19:39 ` [PATCH 1/3] toolchain,glibc: Allow ARC big endian glibc builds Vineet Gupta
@ 2019-12-06 21:18   ` Thomas Petazzoni
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2019-12-06 21:18 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: buildroot, Evgeniy.Didin, linux-snps-arc, Alexey.Brodkin

On Fri,  6 Dec 2019 11:39:22 -0800
Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote:

> From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
> 
> Apparently big endian glibc builds just work, if we let the endian
> header allow that (which prev was #error).
> 
> The current ARC glibc version in buildroot arc-2019.09-rc1 already
> contains that fix.
> 
> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
> ---
>  toolchain/toolchain-buildroot/Config.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master with an improved commit title/log. Thanks!

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

_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

* Re: [Buildroot] [PATCH 2/3] binutils/ARC: move ARC specific code together
  2019-12-06 19:39 ` [PATCH 2/3] binutils/ARC: move ARC specific code together Vineet Gupta
@ 2019-12-06 21:19   ` Thomas Petazzoni
  2019-12-17 21:32     ` [PATCH v2] binutils/ARC: cleanup Vineet Gupta
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2019-12-06 21:19 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: buildroot, Evgeniy.Didin, linux-snps-arc, Alexey.Brodkin

On Fri,  6 Dec 2019 11:39:23 -0800
Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote:

> That way ARC specific version update needs to be done in 1 place only
> 
> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
> ---
>  package/binutils/binutils.mk | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
> index a19d6940f7c1..ecc78b81e59f 100644
> --- a/package/binutils/binutils.mk
> +++ b/package/binutils/binutils.mk
> @@ -8,14 +8,11 @@
>  # 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.09-rc1
> -else
>  BINUTILS_VERSION = 2.32
>  endif
> -endif # BINUTILS_VERSION
>  
> -ifeq ($(BINUTILS_VERSION),arc-2019.09-rc1)
> +ifeq ($(BR2_arc),y)

This is not going to work well with your PATCH 3/3 (on which I have
comments). Indeed, BR2_arc=y does not necessarily imply that we want to
use the ARC-specific binutils version.

You can however use ifeq ($(BR2_BINUTILS_VERSION_ARC),y) instead.

Best regards,

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

_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

* Re: [Buildroot] [PATCH 3/3] toolchain/ARC: Enable ability to build with upstream gcc/binutils
  2019-12-06 19:39 ` [PATCH 3/3] toolchain/ARC: Enable ability to build with upstream gcc/binutils Vineet Gupta
@ 2019-12-06 21:26   ` Thomas Petazzoni
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2019-12-06 21:26 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: buildroot, Evgeniy.Didin, linux-snps-arc, Alexey.Brodkin

On Fri,  6 Dec 2019 11:39:24 -0800
Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote:

> While ARC upstream gcc/binutils work, they are still trailing behind
> the more up to date code at github. To help expedite this gap, we want
> to test the upstreeam versiosn more often, hence this patch. It allows
> ARC tools to be built of upstream gcc/binutils.
> 
> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
> ---
>  arch/Config.in.arc              | 4 ++++
>  package/binutils/Config.in.host | 6 +++---
>  package/binutils/binutils.mk    | 2 +-
>  package/gcc/Config.in.host      | 4 ++--
>  4 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/Config.in.arc b/arch/Config.in.arc
> index fdfafda31c72..c389ba8b42c9 100644
> --- a/arch/Config.in.arc
> +++ b/arch/Config.in.arc
> @@ -59,6 +59,10 @@ config BR2_arc
>  	bool
>  	default y if BR2_arcle || BR2_arceb
>  
> +config BR2_arc_gh
> +	bool "ARC github tools"
> +	default y if BR2_arc

That's not how we want to handle this.

> +
>  config BR2_ENDIAN
>  	default "LITTLE" if BR2_arcle
>  	default "BIG"	 if BR2_arceb
> diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host
> index 514f620086eb..78785878cecc 100644
> --- a/package/binutils/Config.in.host
> +++ b/package/binutils/Config.in.host
> @@ -7,8 +7,8 @@ config BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI
>  
>  choice
>  	prompt "Binutils Version"
> -	default BR2_BINUTILS_VERSION_2_32_X if !BR2_arc && !BR2_csky
> -	default BR2_BINUTILS_VERSION_ARC if BR2_arc
> +	default BR2_BINUTILS_VERSION_2_32_X if !BR2_arc_gh && !BR2_csky
> +	default BR2_BINUTILS_VERSION_ARC if BR2_arc_gh
>  	default BR2_BINUTILS_VERSION_CSKY if BR2_csky
>  	help
>  	  Select the version of binutils you wish to use.
> @@ -27,7 +27,7 @@ config BR2_BINUTILS_VERSION_2_33_X
>  
>  config BR2_BINUTILS_VERSION_ARC
>  	bool "binutils arc (2.31)"
> -	depends on BR2_arc
> +	depends on BR2_arc_gh

For binutils, you can already select any upstream version, or the ARC
specific version on ARC. So there is nothing to change here: you can
already select either upstream or ARC-specific.

> diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
> index 92af40b19fc3..d9f4c6cae14b 100644
> --- a/package/gcc/Config.in.host
> +++ b/package/gcc/Config.in.host
> @@ -2,7 +2,7 @@ comment "GCC Options"

Ditto for gcc, you can already chose any upstream gcc version >= 7.x
for ARC, or the ARC-specific version.

So, I don't understand what your patch brings: what you describe in
your commit log is already possible today.

The following defconfig is already possible with Buildroot today:

BR2_arcle=y
BR2_archs38=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_BINUTILS_VERSION_2_33_X=y
BR2_GCC_VERSION_9_X=y

It builds an ARC HS38 glibc toolchain with upstream gcc 9.x and
upstream binutils 2.33.

Best regards,

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

_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

* [PATCH v2] binutils/ARC: cleanup
  2019-12-06 21:19   ` [Buildroot] " Thomas Petazzoni
@ 2019-12-17 21:32     ` Vineet Gupta
  2019-12-22 21:41       ` [Buildroot] " Thomas Petazzoni
  0 siblings, 1 reply; 13+ messages in thread
From: Vineet Gupta @ 2019-12-17 21:32 UTC (permalink / raw)
  To: buildroot; +Cc: Evgeniy.Didin, linux-snps-arc, Vineet Gupta, Alexey.Brodkin

Remove special handling for ARC - as it is not needed for cksy etc.

A nice side benefit is that the ARC specific version now only needs to
be specified in single place (vs 3 currently) in binutils/Config.in.host

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 package/binutils/binutils.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index a19d6940f7c1..3ae5561d67d3 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -8,14 +8,10 @@
 # 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.09-rc1
-else
 BINUTILS_VERSION = 2.32
 endif
-endif # BINUTILS_VERSION
 
-ifeq ($(BINUTILS_VERSION),arc-2019.09-rc1)
+ifeq ($(BR2_BINUTILS_VERSION_ARC),y)
 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
-- 
2.20.1


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

* Re: [Buildroot] [PATCH v2] binutils/ARC: cleanup
  2019-12-17 21:32     ` [PATCH v2] binutils/ARC: cleanup Vineet Gupta
@ 2019-12-22 21:41       ` Thomas Petazzoni
  2020-01-13 17:48         ` Vineet Gupta
  2020-09-10 23:21         ` Vineet Gupta
  0 siblings, 2 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2019-12-22 21:41 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: buildroot, Evgeniy.Didin, linux-snps-arc, Alexey.Brodkin

Hello Vineet,

On Tue, 17 Dec 2019 13:32:53 -0800
Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote:

> Remove special handling for ARC - as it is not needed for cksy etc.
> 
> A nice side benefit is that the ARC specific version now only needs to
> be specified in single place (vs 3 currently) in binutils/Config.in.host
> 
> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
> ---
>  package/binutils/binutils.mk | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
> index a19d6940f7c1..3ae5561d67d3 100644
> --- a/package/binutils/binutils.mk
> +++ b/package/binutils/binutils.mk
> @@ -8,14 +8,10 @@
>  # 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.09-rc1
> -else
>  BINUTILS_VERSION = 2.32
>  endif
> -endif # BINUTILS_VERSION
>  
> -ifeq ($(BINUTILS_VERSION),arc-2019.09-rc1)
> +ifeq ($(BR2_BINUTILS_VERSION_ARC),y)
>  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

In fact, I was wrong, this also does not work, in the following
situation:

 - You're using a pre-compiled external toolchain, so host-binutils is
   not selected/enabled, so the version selection in
   package/binutils/Config.in.host is not used, and therefore
   BR2_BINUTILS_VERSION_ARC cannot be set to 'y'.

 - You have binutils enabled for the target.

Then, with your patch, we will no longer select the ARC-specific fork
of binutils.

Basically, for the target binutils (just like for target gdb), we don't
have any version selection, so we force using one specific version
depending on the architecture.

Best regards,

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

_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

* Re: [Buildroot] [PATCH v2] binutils/ARC: cleanup
  2019-12-22 21:41       ` [Buildroot] " Thomas Petazzoni
@ 2020-01-13 17:48         ` Vineet Gupta
  2020-09-10 23:21         ` Vineet Gupta
  1 sibling, 0 replies; 13+ messages in thread
From: Vineet Gupta @ 2020-01-13 17:48 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot, Evgeniy Didin, linux-snps-arc, Alexey Brodkin

Hi Thomas,

On 12/22/19 1:41 PM, Thomas Petazzoni wrote:
> Hello Vineet,
>
> On Tue, 17 Dec 2019 13:32:53 -0800
> Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote:
>
>> Remove special handling for ARC - as it is not needed for cksy etc.
>>
>> A nice side benefit is that the ARC specific version now only needs to
>> be specified in single place (vs 3 currently) in binutils/Config.in.host
>>
>> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
>> ---
>>  package/binutils/binutils.mk | 6 +-----
>>  1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
>> index a19d6940f7c1..3ae5561d67d3 100644
>> --- a/package/binutils/binutils.mk
>> +++ b/package/binutils/binutils.mk
>> @@ -8,14 +8,10 @@
>>  # 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.09-rc1
>> -else
>>  BINUTILS_VERSION = 2.32
>>  endif
>> -endif # BINUTILS_VERSION
>>  
>> -ifeq ($(BINUTILS_VERSION),arc-2019.09-rc1)
>> +ifeq ($(BR2_BINUTILS_VERSION_ARC),y)
>>  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
> In fact, I was wrong, this also does not work, in the following
> situation:
>
>  - You're using a pre-compiled external toolchain, so host-binutils is
>    not selected/enabled, so the version selection in
>    package/binutils/Config.in.host is not used, and therefore
>    BR2_BINUTILS_VERSION_ARC cannot be set to 'y'.
>
>  - You have binutils enabled for the target.
>
> Then, with your patch, we will no longer select the ARC-specific fork
> of binutils.
>
> Basically, for the target binutils (just like for target gdb), we don't
> have any version selection, so we force using one specific version
> depending on the architecture.

Does that mean that other arch in that file (csky) with custom github location is
affected with the issue you mentioned above ?

-Vineet
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

* Re: [PATCH v2] binutils/ARC: cleanup
  2019-12-22 21:41       ` [Buildroot] " Thomas Petazzoni
  2020-01-13 17:48         ` Vineet Gupta
@ 2020-09-10 23:21         ` Vineet Gupta
  2020-09-11  9:18           ` Thomas Petazzoni
  1 sibling, 1 reply; 13+ messages in thread
From: Vineet Gupta @ 2020-09-10 23:21 UTC (permalink / raw)
  To: thomas.petazzoni, Vineet Gupta
  Cc: Evgeniy Didin, arcml, Alexey Brodkin, buildroot

Hi Thomas,

On 12/22/19 1:41 PM, Thomas Petazzoni wrote:
> Hello Vineet,
> 
> On Tue, 17 Dec 2019 13:32:53 -0800
> Vineet Gupta <Vineet.Gupta1-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> wrote:
> 
>> Remove special handling for ARC - as it is not needed for cksy etc.
>>
>> A nice side benefit is that the ARC specific version now only needs to
>> be specified in single place (vs 3 currently) in binutils/Config.in.host
>>
>> Signed-off-by: Vineet Gupta <vgupta-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
>> ---
>>  package/binutils/binutils.mk | 6 +-----
>>  1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
>> index a19d6940f7c1..3ae5561d67d3 100644
>> --- a/package/binutils/binutils.mk
>> +++ b/package/binutils/binutils.mk
>> @@ -8,14 +8,10 @@
>>  # 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.09-rc1
>> -else
>>  BINUTILS_VERSION = 2.32
>>  endif
>> -endif # BINUTILS_VERSION
>>  
>> -ifeq ($(BINUTILS_VERSION),arc-2019.09-rc1)
>> +ifeq ($(BR2_BINUTILS_VERSION_ARC),y)

Looks like we need this specific thunk anyways. When I select pristine upstream
binutils (not ARC fork @ github), the above forces it to download from github
which it should not and will not if the tag/branch has not been mirrored there.

>>  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
> 
> In fact, I was wrong, this also does not work, in the following
> situation:
> 
>  - You're using a pre-compiled external toolchain, so host-binutils is
>    not selected/enabled, so the version selection in
>    package/binutils/Config.in.host is not used, and therefore
>    BR2_BINUTILS_VERSION_ARC cannot be set to 'y'.
> 
>  - You have binutils enabled for the target.
> 
> Then, with your patch, we will no longer select the ARC-specific fork
> of binutils.
> 
> Basically, for the target binutils (just like for target gdb), we don't
> have any version selection, so we force using one specific version
> depending on the architecture.
> 
> Best regards,
> 
> Thomas
> 

_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

* Re: [PATCH v2] binutils/ARC: cleanup
  2020-09-10 23:21         ` Vineet Gupta
@ 2020-09-11  9:18           ` Thomas Petazzoni
  2020-09-11 19:37             ` Vineet Gupta
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2020-09-11  9:18 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: Evgeniy Didin, arcml, Alexey Brodkin, buildroot

Hello Vineet,

On Thu, 10 Sep 2020 23:21:43 +0000
Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote:

> >> -ifeq ($(BINUTILS_VERSION),arc-2019.09-rc1)
> >> +ifeq ($(BR2_BINUTILS_VERSION_ARC),y)  
> 
> Looks like we need this specific thunk anyways. When I select pristine upstream
> binutils (not ARC fork @ github), the above forces it to download from github
> which it should not and will not if the tag/branch has not been mirrored there.

So I guess you're talking about the situation where a host-binutils is
not enabled, and only a target binutils is used. In this case, indeed:

ifeq ($(BINUTILS_VERSION),)
ifeq ($(BR2_arc),y)
BINUTILS_VERSION = arc-2020.03-release
else
BINUTILS_VERSION = 2.33.1
endif
endif # BINUTILS_VERSION

will kick in and set BINUTILS_VERSION to arc-2020.03-release, which
will lead to:

ifeq ($(BINUTILS_VERSION),arc-2020.03-release)
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
endif

being taken into account.

What happens with target binutils is:

 (1) If a host-binutils is built (because Buildroot is building the
     toolchain), then we're using the same version as the
     host-binutils, which is defined by the choice in
     package/binutils/Config.in.host.

 (2) If not host-binutils is built (because we're using an external
     toolchain), then there is no version selection: we unconditionally
     use 2.33.1, except on ARC where we use the special ARC fork.

So I guess the decision to take is: do we want to switch to using the
upstream binutils, even for ARC, when no host-binutils is built ?

Best regards,

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

_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

* Re: [PATCH v2] binutils/ARC: cleanup
  2020-09-11  9:18           ` Thomas Petazzoni
@ 2020-09-11 19:37             ` Vineet Gupta
  0 siblings, 0 replies; 13+ messages in thread
From: Vineet Gupta @ 2020-09-11 19:37 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Evgeniy Didin, arcml, Alexey Brodkin, buildroot

On 9/11/20 2:18 AM, Thomas Petazzoni wrote:
> Hello Vineet,
>
> On Thu, 10 Sep 2020 23:21:43 +0000
> Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote:
>
>>>> -ifeq ($(BINUTILS_VERSION),arc-2019.09-rc1)
>>>> +ifeq ($(BR2_BINUTILS_VERSION_ARC),y)  
>> Looks like we need this specific thunk anyways. When I select pristine upstream
>> binutils (not ARC fork @ github), the above forces it to download from github
>> which it should not and will not if the tag/branch has not been mirrored there.
> So I guess you're talking about the situation where a host-binutils is
> not enabled, and only a target binutils is used. 

No sorry, I was not. I was trying to build a host binutils off upstream 2.34 and
must have some local change to make it download 2.34 off of github ARC fork. I
can't reproduce it now.

> In this case, indeed:
>
> ifeq ($(BINUTILS_VERSION),)
> ifeq ($(BR2_arc),y)
> BINUTILS_VERSION = arc-2020.03-release
> else
> BINUTILS_VERSION = 2.33.1
> endif
> endif # BINUTILS_VERSION
>
> will kick in and set BINUTILS_VERSION to arc-2020.03-release, which
> will lead to:
>
> ifeq ($(BINUTILS_VERSION),arc-2020.03-release)
> 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
> endif

The use of a single release string to decide where to download off of seems a bit
fragile. But given we are moving away from fork gradually it seems OK.

> being taken into account.
>
> What happens with target binutils is:
>
>  (1) If a host-binutils is built (because Buildroot is building the
>      toolchain), then we're using the same version as the
>      host-binutils, which is defined by the choice in
>      package/binutils/Config.in.host.
>
>  (2) If not host-binutils is built (because we're using an external
>      toolchain), then there is no version selection: we unconditionally
>      use 2.33.1, except on ARC where we use the special ARC fork.
>
> So I guess the decision to take is: do we want to switch to using the
> upstream binutils, even for ARC, when no host-binutils is built ?

I suppose so. upstream binutils is perhaps an odd commit or two behind the fork,
if at all.
I'll pester Alexey to just ditch binutils fork for upstream buildroot.

>
> Best regards,
>
> Thomas

_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

end of thread, other threads:[~2020-09-11 19:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 19:39 [PATCH 0/3] ARC toolchian related fixes Vineet Gupta
2019-12-06 19:39 ` [PATCH 1/3] toolchain,glibc: Allow ARC big endian glibc builds Vineet Gupta
2019-12-06 21:18   ` [Buildroot] [PATCH 1/3] toolchain, glibc: " Thomas Petazzoni
2019-12-06 19:39 ` [PATCH 2/3] binutils/ARC: move ARC specific code together Vineet Gupta
2019-12-06 21:19   ` [Buildroot] " Thomas Petazzoni
2019-12-17 21:32     ` [PATCH v2] binutils/ARC: cleanup Vineet Gupta
2019-12-22 21:41       ` [Buildroot] " Thomas Petazzoni
2020-01-13 17:48         ` Vineet Gupta
2020-09-10 23:21         ` Vineet Gupta
2020-09-11  9:18           ` Thomas Petazzoni
2020-09-11 19:37             ` Vineet Gupta
2019-12-06 19:39 ` [PATCH 3/3] toolchain/ARC: Enable ability to build with upstream gcc/binutils Vineet Gupta
2019-12-06 21:26   ` [Buildroot] " Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).