Skip to contentSkip to conversation

arc build failures in -next due to ARCv2 patch

DISCUSSION Guenter Roeck 3 participants 6 messages Jun 26, 2015 – Aug 31, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

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 [[email protected]]
Sent: Saturday, June 27, 2015 5:28 AM
To: [email protected]
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

From 21000721af5bd65a2d77725c0d7ffc9ef62c0e3b Mon Sep 17 00:00:00 2001
From: Vineet Gupta <[email protected]>
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.

---
 arch/arc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arc/Makefile +1 -1
index bf68dc5a08be..dfcf2569966c 100644
@@ -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
Signature · 1 line
1.9.1
#2 lore raw

Hi Vineet,

Quoted 3 lines · Vineet Gupta

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.

Quoted 1 line

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.

Quoted 1 line

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 ?

Quoted 1 line

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

Quoted 31 lines

Thx,
-Vineet
________________________________________
From: Guenter Roeck [[email protected]]
Sent: Saturday, June 27, 2015 5:28 AM
To: [email protected]
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

#3 lore raw
Quoted 8 lines · Guenter Roeck

Hi Vineet,

Quoted 3 lines · Vineet Gupta

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.

Quoted 5 lines
Quoted 2 lines

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.

Quoted 7 lines
Quoted 2 lines

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.

Quoted 7 lines

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.

Quoted 3 lines

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.

Quoted 12 lines
Quoted 3 lines

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

                      ^
Quoted 36 lines

Thanks,
Guenter

Quoted 31 lines

Thx,
-Vineet
________________________________________
From: Guenter Roeck [[email protected]]
Sent: Saturday, June 27, 2015 5:28 AM
To: [email protected]
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

#4 lore raw

ARCv2 testing exposure (Re: arc build failures in -next due to ARCv2 patch)

Hi Guenter,

Quoted 8 lines · Vineet Gupta
Quoted 5 lines · Guenter Roeck
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

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.

Quoted 7 lines

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

[email protected]:foss-for-synopsys-dwc-arc-processors/toolchain.git

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

Thx,
-Vineet

#5 lore raw

Re: ARCv2 testing exposure (Re: arc build failures in -next due to ARCv2 patch)

Hi Vineet,

Quoted 1 line · Vineet Gupta

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 [email protected]: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