Message ID | 20191217213253.12446-1-vgupta@synopsys.com |
---|---|
State | New |
Headers | show |
Series | [v2] binutils/ARC: cleanup | expand |
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
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
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 >
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
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
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
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(-)