Patchwork [v2] gcc: coexist upstream with vendor git releases for mb and arc

login
register
mail settings
Submitter Spenser Gilliland
Date Jan. 27, 2014, 9:51 p.m.
Message ID <1390859507-31670-1-git-send-email-spenser@gillilanding.com>
Download mbox | patch
Permalink /patch/314517/
State New
Headers show

Comments

Spenser Gilliland - Jan. 27, 2014, 9:51 p.m.
This patch makes it easier to have both upstream gcc and vendor patch series
for microblaze and arc.

Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
---
 package/gcc/Config.in.host | 4 ++--
 package/gcc/gcc.mk         | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)
Arnout Vandecappelle - Jan. 28, 2014, 5:36 p.m.
On 27/01/14 22:51, Spenser Gilliland wrote:
> This patch makes it easier to have both upstream gcc and vendor patch series
> for microblaze and arc.

  Can you explain this is bit better? I don't see the advantage at the 
moment...

  After this patch, the version is sometimes set in Config.in.host and 
sometimes in gcc.mk. I really don't like that...

  Regards,
  Arnout

>
> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
> ---
>   package/gcc/Config.in.host | 4 ++--
>   package/gcc/gcc.mk         | 6 ++++--
>   2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
> index 186ba80..044cd0f 100644
> --- a/package/gcc/Config.in.host
> +++ b/package/gcc/Config.in.host
> @@ -96,8 +96,8 @@ config BR2_GCC_VERSION
>   	default "4.6.4"     if BR2_GCC_VERSION_4_6_X
>   	default "4.7.3"     if BR2_GCC_VERSION_4_7_X
>   	default "4.8.2"     if BR2_GCC_VERSION_4_8_X
> -	default "7466697995233cc3aab5b9427bf843e3c7fabd80" if BR2_GCC_VERSION_4_8_ARC
> -	default "b93bb009e021aba64dd4b8cdb0bbc5a176c55543" if BR2_GCC_VERSION_4_9_MICROBLAZE
> +	default "arc-git"   if BR2_GCC_VERSION_4_8_ARC
> +	default "mb-git"   if BR2_GCC_VERSION_4_9_MICROBLAZE
>   	default BR2_GCC_SNAP_DATE if BR2_GCC_VERSION_SNAP
>
>   config BR2_EXTRA_GCC_CONFIG_OPTIONS
> diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
> index 236297d..dd99604 100644
> --- a/package/gcc/gcc.mk
> +++ b/package/gcc/gcc.mk
> @@ -19,10 +19,12 @@ ifneq ($(GCC_SNAP_DATE),)
>   GCC_SITE = ftp://gcc.gnu.org/pub/gcc/snapshots/$(GCC_SNAP_DATE)/
>   else ifeq ($(findstring avr32,$(GCC_VERSION)),avr32)
>   GCC_SITE = ftp://www.at91.com/pub/buildroot/
> -else ifeq ($(BR2_arc),y)
> +else ifeq ($(findstring git,$(GCC_VERSION))$(BR2_arc),gity)
> +GCC_VERSION = 7466697995233cc3aab5b9427bf843e3c7fabd80
>   GCC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,gcc,$(GCC_VERSION))
>   GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
> -else ifeq ($(BR2_microblaze),y)
> +else ifeq ($(findstring git,$(GCC_VERSION))$(BR2_microblaze),gity)
> +GCC_VERSION = b93bb009e021aba64dd4b8cdb0bbc5a176c55543
>   GCC_SITE = $(call github,Xilinx,gcc,$(GCC_VERSION))
>   GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
>   else
>
Spenser Gilliland - Jan. 28, 2014, 11:34 p.m.
>  Can you explain this is bit better? I don't see the advantage at the
> moment...

The advantage of this approach is that as soon as upstream gcc
supports the microblaze or arc architecture, the only change required
is to remove depends on !BR2_microblaze or !BR2_arc for that release.

>  After this patch, the version is sometimes set in Config.in.host and
> sometimes in gcc.mk. I really don't like that...

I understand.  See below for a possible fix.  Let me know if you think
this is better.

>> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
>> ---
>>   package/gcc/gcc.mk         | 6 ++++--
>>   1 files changed, 2 insertions(+), 2 deletions(-)
>>
>>   config BR2_EXTRA_GCC_CONFIG_OPTIONS
>> diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
>> index 236297d..dd99604 100644
>> --- a/package/gcc/gcc.mk
>> +++ b/package/gcc/gcc.mk
>> @@ -19,10 +19,12 @@ ifneq ($(GCC_SNAP_DATE),)
>>   GCC_SITE = ftp://gcc.gnu.org/pub/gcc/snapshots/$(GCC_SNAP_DATE)/
>>   else ifeq ($(findstring avr32,$(GCC_VERSION)),avr32)
>>   GCC_SITE = ftp://www.at91.com/pub/buildroot/
>> -else ifeq ($(BR2_arc),y)
>> +else ifeq ($(findstring git,$(GCC_VERSION))$(BR2_arc),gity)

instead of above do something like

-else ifeq ($(BR2_arc),y)
+else ifeq (BR2_GCC_VERSION_4_8_ARC,y)

>>   GCC_SITE = $(call
>> github,foss-for-synopsys-dwc-arc-processors,gcc,$(GCC_VERSION))
>>   GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
>> -else ifeq ($(BR2_microblaze),y)
>> +else ifeq ($(findstring git,$(GCC_VERSION))$(BR2_microblaze),gity)

and instead of the above possibly

-else ifeq ($(BR2_arc),y)
+else ifeq (BR2_GCC_VERSION_4_9_MICROBLAZE,y)

>>   GCC_SITE = $(call github,Xilinx,gcc,$(GCC_VERSION))
>>   GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
>>   else

Also, updating the AVR32 code to work in the same manner would probably be best.

Thanks,
Spenser
Arnout Vandecappelle - Jan. 29, 2014, 8:58 p.m.
On 29/01/14 00:34, Spenser Gilliland wrote:
>>   Can you explain this is bit better? I don't see the advantage at the
>> moment...
>
> The advantage of this approach is that as soon as upstream gcc
> supports the microblaze or arc architecture, the only change required
> is to remove depends on !BR2_microblaze or !BR2_arc for that release.

  OK, but then there is no need to do this before upstream gcc does 
support it, right?

>
>>   After this patch, the version is sometimes set in Config.in.host and
>> sometimes in gcc.mk. I really don't like that...
>
> I understand.  See below for a possible fix.  Let me know if you think
> this is better.
>
>>> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
>>> ---
>>>    package/gcc/gcc.mk         | 6 ++++--
>>>    1 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>>    config BR2_EXTRA_GCC_CONFIG_OPTIONS
>>> diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
>>> index 236297d..dd99604 100644
>>> --- a/package/gcc/gcc.mk
>>> +++ b/package/gcc/gcc.mk
>>> @@ -19,10 +19,12 @@ ifneq ($(GCC_SNAP_DATE),)
>>>    GCC_SITE = ftp://gcc.gnu.org/pub/gcc/snapshots/$(GCC_SNAP_DATE)/
>>>    else ifeq ($(findstring avr32,$(GCC_VERSION)),avr32)
>>>    GCC_SITE = ftp://www.at91.com/pub/buildroot/
>>> -else ifeq ($(BR2_arc),y)
>>> +else ifeq ($(findstring git,$(GCC_VERSION))$(BR2_arc),gity)
>
> instead of above do something like
>
> -else ifeq ($(BR2_arc),y)
> +else ifeq (BR2_GCC_VERSION_4_8_ARC,y)

  That would be better, yes. Although, now it becomes very obvious that 
the symbol name is wrong, because it's not actually version 4.8...

>
>>>    GCC_SITE = $(call
>>> github,foss-for-synopsys-dwc-arc-processors,gcc,$(GCC_VERSION))
>>>    GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
>>> -else ifeq ($(BR2_microblaze),y)
>>> +else ifeq ($(findstring git,$(GCC_VERSION))$(BR2_microblaze),gity)
>
> and instead of the above possibly
>
> -else ifeq ($(BR2_arc),y)
> +else ifeq (BR2_GCC_VERSION_4_9_MICROBLAZE,y)
>
>>>    GCC_SITE = $(call github,Xilinx,gcc,$(GCC_VERSION))
>>>    GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
>>>    else
>
> Also, updating the AVR32 code to work in the same manner would probably be best.

  But there will never be an upstream avr32...


  Regards,
  Arnout

>
> Thanks,
> Spenser
>
Spenser Gilliland - Jan. 30, 2014, 1:25 a.m.
Arnout,

On Wed, Jan 29, 2014 at 2:58 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 29/01/14 00:34, Spenser Gilliland wrote:
>>>
>>>   Can you explain this is bit better? I don't see the advantage at the
>>> moment...
>>
>>
>> The advantage of this approach is that as soon as upstream gcc
>> supports the microblaze or arc architecture, the only change required
>> is to remove depends on !BR2_microblaze or !BR2_arc for that release.
>
>
>  OK, but then there is no need to do this before upstream gcc does support
> it, right?

Your right.

>
>>
>>>   After this patch, the version is sometimes set in Config.in.host and
>>> sometimes in gcc.mk. I really don't like that...
>>
>>
>> I understand.  See below for a possible fix.  Let me know if you think
>> this is better.
>>
>>>> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
>>>> ---
>>>>    package/gcc/gcc.mk         | 6 ++++--
>>>>    1 files changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>>    config BR2_EXTRA_GCC_CONFIG_OPTIONS
>>>> diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
>>>> index 236297d..dd99604 100644
>>>> --- a/package/gcc/gcc.mk
>>>> +++ b/package/gcc/gcc.mk
>>>> @@ -19,10 +19,12 @@ ifneq ($(GCC_SNAP_DATE),)
>>>>    GCC_SITE = ftp://gcc.gnu.org/pub/gcc/snapshots/$(GCC_SNAP_DATE)/
>>>>    else ifeq ($(findstring avr32,$(GCC_VERSION)),avr32)
>>>>    GCC_SITE = ftp://www.at91.com/pub/buildroot/
>>>> -else ifeq ($(BR2_arc),y)
>>>> +else ifeq ($(findstring git,$(GCC_VERSION))$(BR2_arc),gity)
>>
>>
>> instead of above do something like
>>
>> -else ifeq ($(BR2_arc),y)
>> +else ifeq (BR2_GCC_VERSION_4_8_ARC,y)
>
>
>  That would be better, yes. Although, now it becomes very obvious that the
> symbol name is wrong, because it's not actually version 4.8...

I'll update the symbol name to better reflect the purpose.

>
>>
>>>>    GCC_SITE = $(call
>>>> github,foss-for-synopsys-dwc-arc-processors,gcc,$(GCC_VERSION))
>>>>    GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
>>>> -else ifeq ($(BR2_microblaze),y)
>>>> +else ifeq ($(findstring git,$(GCC_VERSION))$(BR2_microblaze),gity)
>>
>>
>> and instead of the above possibly
>>
>> -else ifeq ($(BR2_arc),y)
>> +else ifeq (BR2_GCC_VERSION_4_9_MICROBLAZE,y)
>>
>>>>    GCC_SITE = $(call github,Xilinx,gcc,$(GCC_VERSION))
>>>>    GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
>>>>    else
>>
>>
>> Also, updating the AVR32 code to work in the same manner would probably be
>> best.
>
>
>  But there will never be an upstream avr32...

Yes, but it would make the rules in the file more consistant.  The
following is what I am suggesting.

ifneq ($(GCC_SNAP_DATE),)
GCC_SITE = ftp://gcc.gnu.org/pub/gcc/snapshots/$(GCC_SNAP_DATE)/
- else ifeq ($(findstring avr32,$(GCC_VERSION)),avr32)
+ else ifeq ($(BR2_GCC_VERSION_4_2_2_AVR32_2_1_5),y)
GCC_SITE = ftp://www.at91.com/pub/buildroot/

>
>  Regards,
>  Arnout
>
>>
>> Thanks,
>> Spenser
>>
>
>
> --
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

Patch

diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 186ba80..044cd0f 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -96,8 +96,8 @@  config BR2_GCC_VERSION
 	default "4.6.4"     if BR2_GCC_VERSION_4_6_X
 	default "4.7.3"     if BR2_GCC_VERSION_4_7_X
 	default "4.8.2"     if BR2_GCC_VERSION_4_8_X
-	default "7466697995233cc3aab5b9427bf843e3c7fabd80" if BR2_GCC_VERSION_4_8_ARC
-	default "b93bb009e021aba64dd4b8cdb0bbc5a176c55543" if BR2_GCC_VERSION_4_9_MICROBLAZE
+	default "arc-git"   if BR2_GCC_VERSION_4_8_ARC
+	default "mb-git"   if BR2_GCC_VERSION_4_9_MICROBLAZE
 	default BR2_GCC_SNAP_DATE if BR2_GCC_VERSION_SNAP
 
 config BR2_EXTRA_GCC_CONFIG_OPTIONS
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 236297d..dd99604 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -19,10 +19,12 @@  ifneq ($(GCC_SNAP_DATE),)
 GCC_SITE = ftp://gcc.gnu.org/pub/gcc/snapshots/$(GCC_SNAP_DATE)/
 else ifeq ($(findstring avr32,$(GCC_VERSION)),avr32)
 GCC_SITE = ftp://www.at91.com/pub/buildroot/
-else ifeq ($(BR2_arc),y)
+else ifeq ($(findstring git,$(GCC_VERSION))$(BR2_arc),gity)
+GCC_VERSION = 7466697995233cc3aab5b9427bf843e3c7fabd80
 GCC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,gcc,$(GCC_VERSION))
 GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
-else ifeq ($(BR2_microblaze),y)
+else ifeq ($(findstring git,$(GCC_VERSION))$(BR2_microblaze),gity)
+GCC_VERSION = b93bb009e021aba64dd4b8cdb0bbc5a176c55543
 GCC_SITE = $(call github,Xilinx,gcc,$(GCC_VERSION))
 GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
 else