public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
* arc build failures in -next due to ARCv2 patch
@ 2015-06-26 23:58 Guenter Roeck
  2015-06-27 11:42 ` Vineet Gupta
  0 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2015-06-26 23:58 UTC (permalink / raw)
  To: linux-next@vger.kernel.org; +Cc: Vineet Gupta

Hi,

my arc test builds in -next now fail with

cc1: error: unrecognized command line option "-mno-ll64"
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
cc1: error: unrecognized command line option "-mno-ll64"
make[1]: *** [kernel/bounds.s] Error 1

due to commit 'ARCv2: Support for ARCv2 ISA and HS38x cores'.

This is with gcc 4.8.3 built from buildroot.

Do I now need a new compiler / toolchain to build the kernel ?
Any chance to make this change compatible to work with older
compilers ?

Thanks,
Guenter

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

* RE: arc build failures in -next due to ARCv2 patch
  2015-06-26 23:58 arc build failures in -next due to ARCv2 patch Guenter Roeck
@ 2015-06-27 11:42 ` Vineet Gupta
  2015-06-27 14:16   ` Guenter Roeck
  0 siblings, 1 reply; 6+ messages in thread
From: Vineet Gupta @ 2015-06-27 11:42 UTC (permalink / raw)
  To: Guenter Roeck, linux-next@vger.kernel.org; +Cc: arc-linux-dev@synopsys.com

[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]

hi,

Sorry for top posting / html - web client access from home.
Thx for reporting the issue - I have pushed a fix (also attached) which shd cure it (don't have exactly similar oldish gcc at hand).
This slipped thru the cracks as newer gcc for legacy ARCompact can still tolerate the new toggles.

I will get back to you on Monday about how to go about including support for a newer gcc for ARCv2 build test as well.

Thx,
-Vineet
________________________________________
From: Guenter Roeck [private@roeck-us.net]
Sent: Saturday, June 27, 2015 5:28 AM
To: linux-next@vger.kernel.org
Cc: Vineet Gupta
Subject: arc build failures in -next due to ARCv2 patch

Hi,

my arc test builds in -next now fail with

cc1: error: unrecognized command line option "-mno-ll64"
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
cc1: error: unrecognized command line option "-mno-ll64"
make[1]: *** [kernel/bounds.s] Error 1

due to commit 'ARCv2: Support for ARCv2 ISA and HS38x cores'.

This is with gcc 4.8.3 built from buildroot.

Do I now need a new compiler / toolchain to build the kernel ?
Any chance to make this change compatible to work with older
compilers ?

Thanks,
Guenter


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ARCv2-Allow-older-gcc-to-cope-with-new-regime-of-ARC.patch --]
[-- Type: text/x-patch; name="0001-ARCv2-Allow-older-gcc-to-cope-with-new-regime-of-ARC.patch", Size: 1080 bytes --]

From 21000721af5bd65a2d77725c0d7ffc9ef62c0e3b Mon Sep 17 00:00:00 2001
From: Vineet Gupta <vgupta@synopsys.com>
Date: Sat, 27 Jun 2015 16:56:41 +0530
Subject: [PATCH] ARCv2: Allow older gcc to cope with new regime of
 ARCv2/ARCompact support

-no-ll64 is specific to ARCv2 ISA, and is obviously not supported by
older ARC gcc - in this case the one hosted by linux-next sanity build
service.

Ensure that toggle only gets included for ISA_ARCOMPACT which is default
for now.

Reported-by: Guenter Roeck <private@roeck-us.net>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 arch/arc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index bf68dc5a08be..dfcf2569966c 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -37,7 +37,7 @@ cflags-$(CONFIG_ARC_HAS_LLSC)		+= -mlock
 cflags-$(CONFIG_ARC_HAS_SWAPE)		+= -mswape
 
 ifndef CONFIG_ARC_HAS_LL64
-cflags-y				+= -mno-ll64
+cflags-${CONFIG_ISA_ARCV2}		+= -mno-ll64
 endif
 
 cflags-$(CONFIG_ARC_DW2_UNWIND)		+= -fasynchronous-unwind-tables
-- 
1.9.1


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

* Re: arc build failures in -next due to ARCv2 patch
  2015-06-27 11:42 ` Vineet Gupta
@ 2015-06-27 14:16   ` Guenter Roeck
  2015-06-28 15:16     ` Vineet Gupta
  0 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2015-06-27 14:16 UTC (permalink / raw)
  To: Vineet Gupta, linux-next@vger.kernel.org; +Cc: arc-linux-dev@synopsys.com

Hi Vineet,

On 06/27/2015 04:42 AM, Vineet Gupta wrote:
> hi,
>
> Sorry for top posting / html - web client access from home.
Another Microsoft victim ? That is why I dislike sending e-mail
from my company account.

> Thx for reporting the issue - I have pushed a fix (also attached) which shd cure it (don't have exactly similar oldish gcc at hand).

Not that old, really, it just isn't configured for ARCv2. Question is if I need two
separate compilers or if I can configure it to support both v1 and v2.

> This slipped thru the cracks as newer gcc for legacy ARCompact can still tolerate the new toggles.

Something like the following would avoid the ifdef in the Makefile and also check if the option
is supported by the compiler.

config ARC_NO_LL64
     default y
     depends on !ARC_HAS_LL64 && ISA_ARCV2

...

cflags-$(CONFIG_ARC_NO_LL64) += $(call cc-option, -mno-ll64)


Your patch uses ${} instead of $() - does the make command accept/understand that ?

> I will get back to you on Monday about how to go about including support for a newer gcc for ARCv2 build test as well.
Looking forward to it, though I hope I can just built a toolchain for HS38.

After applying your patch, I get

arch/arc/kernel/process.c: In function ‘arch_cpu_idle’:
arch/arc/kernel/process.c:51:26: error: ‘ARCV2_IRQ_DEF_PRIO’ undeclared (first use in this function)
    const int arg = 0x10 | ARCV2_IRQ_DEF_PRIO;
                                       ^

Thanks,
Guenter

> Thx,
> -Vineet
> ________________________________________
> From: Guenter Roeck [private@roeck-us.net]
> Sent: Saturday, June 27, 2015 5:28 AM
> To: linux-next@vger.kernel.org
> Cc: Vineet Gupta
> Subject: arc build failures in -next due to ARCv2 patch
>
> Hi,
>
> my arc test builds in -next now fail with
>
> cc1: error: unrecognized command line option "-mno-ll64"
> make[2]: *** [scripts/mod/empty.o] Error 1
> make[1]: *** [scripts/mod] Error 2
> make[1]: *** Waiting for unfinished jobs....
> cc1: error: unrecognized command line option "-mno-ll64"
> make[1]: *** [kernel/bounds.s] Error 1
>
> due to commit 'ARCv2: Support for ARCv2 ISA and HS38x cores'.
>
> This is with gcc 4.8.3 built from buildroot.
>
> Do I now need a new compiler / toolchain to build the kernel ?
> Any chance to make this change compatible to work with older
> compilers ?
>
> Thanks,
> Guenter
>

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

* Re: arc build failures in -next due to ARCv2 patch
  2015-06-27 14:16   ` Guenter Roeck
@ 2015-06-28 15:16     ` Vineet Gupta
  2015-08-31 10:35       ` ARCv2 testing exposure (Re: arc build failures in -next due to ARCv2 patch) Vineet Gupta
  0 siblings, 1 reply; 6+ messages in thread
From: Vineet Gupta @ 2015-06-28 15:16 UTC (permalink / raw)
  To: Guenter Roeck, linux-next@vger.kernel.org; +Cc: arc-linux-dev@synopsys.com

On Saturday 27 June 2015 07:46 PM, Guenter Roeck wrote:
> Hi Vineet,
> 
> On 06/27/2015 04:42 AM, Vineet Gupta wrote:
>> hi,
>>
>> Sorry for top posting / html - web client access from home.
> Another Microsoft victim ? That is why I dislike sending e-mail
> from my company account.

Now trying personal email - hopefully this comes out ok.


>> Thx for reporting the issue - I have pushed a fix (also attached) which shd cure
>> it (don't have exactly similar oldish gcc at hand).
> 
> Not that old, really, it just isn't configured for ARCv2. Question is if I need two
> separate compilers or if I can configure it to support both v1 and v2.

The compiler itself can support both - however issue is multilib'ing / libgcc. The
elf32 compiler is multilib'ed - but we've been using the uclibc compiler (with
just the right toggles) to build the kernel as well (to avoid having to use 2
toolchains for kernel / user etc).

long story short - ATM, we need 2 different compilers to build legacy ARCompact,
and newer ARCv2.


>> This slipped thru the cracks as newer gcc for legacy ARCompact can still
>> tolerate the new toggles.
> 
> Something like the following would avoid the ifdef in the Makefile and also check
> if the option
> is supported by the compiler.
> 
> config ARC_NO_LL64
>     default y
>     depends on !ARC_HAS_LL64 && ISA_ARCV2
> 
> ...
> 
> cflags-$(CONFIG_ARC_NO_LL64) += $(call cc-option, -mno-ll64)

OK - we can do a future sweep of makefile to change other such ifdefs.
For now please use a simpler fix.

> 
> 
> Your patch uses ${} instead of $() - does the make command accept/understand that ?


/me slaps myself - I mindlessly applied an existing broken pattern to fix this.
That is now fixed as well 2 other makefile constructs which were broken in similar
way.

> 
>> I will get back to you on Monday about how to go about including support for a
>> newer gcc for ARCv2 build test as well.
> Looking forward to it, though I hope I can just built a toolchain for HS38.
> 
> After applying your patch, I get
> 
> arch/arc/kernel/process.c: In function ‘arch_cpu_idle’:
> arch/arc/kernel/process.c:51:26: error: ‘ARCV2_IRQ_DEF_PRIO’ undeclared (first use
> in this function)
>    const int arg = 0x10 | ARCV2_IRQ_DEF_PRIO;
>                 

Yep, sorry for lousy work, there are bits n pieces moved from our internal 3.18 to
4.1-X for upstreaming - hence the wreckage of transition.

Fixed that and 2 commits pushed after verifying both configs build and boot on
simulator.

Thx,
-Vineet

                      ^
> 
> Thanks,
> Guenter
> 
>> Thx,
>> -Vineet
>> ________________________________________
>> From: Guenter Roeck [private@roeck-us.net]
>> Sent: Saturday, June 27, 2015 5:28 AM
>> To: linux-next@vger.kernel.org
>> Cc: Vineet Gupta
>> Subject: arc build failures in -next due to ARCv2 patch
>>
>> Hi,
>>
>> my arc test builds in -next now fail with
>>
>> cc1: error: unrecognized command line option "-mno-ll64"
>> make[2]: *** [scripts/mod/empty.o] Error 1
>> make[1]: *** [scripts/mod] Error 2
>> make[1]: *** Waiting for unfinished jobs....
>> cc1: error: unrecognized command line option "-mno-ll64"
>> make[1]: *** [kernel/bounds.s] Error 1
>>
>> due to commit 'ARCv2: Support for ARCv2 ISA and HS38x cores'.
>>
>> This is with gcc 4.8.3 built from buildroot.
>>
>> Do I now need a new compiler / toolchain to build the kernel ?
>> Any chance to make this change compatible to work with older
>> compilers ?
>>
>> Thanks,
>> Guenter
>>
> 

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

* ARCv2 testing exposure (Re: arc build failures in -next due to ARCv2 patch)
  2015-06-28 15:16     ` Vineet Gupta
@ 2015-08-31 10:35       ` Vineet Gupta
  2015-08-31 13:58         ` Guenter Roeck
  0 siblings, 1 reply; 6+ messages in thread
From: Vineet Gupta @ 2015-08-31 10:35 UTC (permalink / raw)
  To: Guenter Roeck, linux-next@vger.kernel.org
  Cc: arc-linux-dev@synopsys.com, lkml, Alexey Brodkin

Hi Guenter,

On Sunday 28 June 2015 08:46 PM, Vineet Gupta wrote:
> On Saturday 27 June 2015 07:46 PM, Guenter Roeck wrote:

>>> >> Thx for reporting the issue - I have pushed a fix (also attached) which shd cure
>>> >> it (don't have exactly similar oldish gcc at hand).
>> > 
>> > Not that old, really, it just isn't configured for ARCv2. Question is if I need two
>> > separate compilers or if I can configure it to support both v1 and v2.
>
> The compiler itself can support both - however issue is multilib'ing / libgcc. The
> elf32 compiler is multilib'ed - but we've been using the uclibc compiler (with
> just the right toggles) to build the kernel as well (to avoid having to use 2
> toolchains for kernel / user etc).
> 
> long story short - ATM, we need 2 different compilers to build legacy ARCompact,
> and newer ARCv2.

I was wondering about ARCv2 coverage in your build service. Do you have the needed
2nd toolchain for ARCv2 as well. If not can u add it please.

To build one, you could use upstream buildroot or the legacy scripts at

git@github.com:foss-for-synopsys-dwc-arc-processors/toolchain.git

Or if you so prefer, we also have prebuilt toolchains in github releases.

Thx,
-Vineet

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

* Re: ARCv2 testing exposure (Re: arc build failures in -next due to ARCv2 patch)
  2015-08-31 10:35       ` ARCv2 testing exposure (Re: arc build failures in -next due to ARCv2 patch) Vineet Gupta
@ 2015-08-31 13:58         ` Guenter Roeck
  0 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2015-08-31 13:58 UTC (permalink / raw)
  To: Vineet Gupta, linux-next@vger.kernel.org
  Cc: arc-linux-dev@synopsys.com, lkml, Alexey Brodkin

Hi Vineet,

On 08/31/2015 03:35 AM, Vineet Gupta wrote:
> I was wondering about ARCv2 coverage in your build service. Do you have the needed 2nd toolchain for ARCv2 as well. If not can u add it please. To build one, you could use upstream buildroot or the legacy scripts at git@github.com:foss-for-synopsys-dwc-arc-processors/toolchain.git Or if you so prefer, we also have prebuilt toolchains in github releases. Thx, -Vineet 

Thanks for the information.

I created a toolchain using buildroot, and the build service already covers arcv2.

Guenter

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

end of thread, other threads:[~2015-08-31 13:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-26 23:58 arc build failures in -next due to ARCv2 patch Guenter Roeck
2015-06-27 11:42 ` Vineet Gupta
2015-06-27 14:16   ` Guenter Roeck
2015-06-28 15:16     ` Vineet Gupta
2015-08-31 10:35       ` ARCv2 testing exposure (Re: arc build failures in -next due to ARCv2 patch) Vineet Gupta
2015-08-31 13:58         ` Guenter Roeck

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