Linux-csky Archive on lore.kernel.org
 help / color / Atom feed
* Re: [PATCH] csky: Fix build with upstream gcc
@ 2020-07-21 13:21 Guenter Roeck
  2020-07-21 16:05 ` Guo Ren
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2020-07-21 13:21 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: Guo Ren, linux-csky, linux-kernel, Joerg Roedel

On Tue, Jul 21, 2020 at 01:23:14PM +0200, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
> 
> Building a kernel for the CSKY architecture with CONFIG_FRAME_POINTER
> set requires a gcc supporting the non-upstream '-mbacktrace' option.
> Check for the '-mbacktrace' option before enabling CONFIG_FRAMEPOINTER
> and fix building CSKY with an upstream gcc compiler.
> 
> Signed-off-by: Joerg Roedel <jroedel@suse.de>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  arch/csky/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
> index bd31ab12f77d..1622e1c56026 100644
> --- a/arch/csky/Kconfig
> +++ b/arch/csky/Kconfig
> @@ -8,7 +8,7 @@ config CSKY
>  	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
>  	select ARCH_USE_BUILTIN_BSWAP
>  	select ARCH_USE_QUEUED_RWLOCKS if NR_CPUS>2
> -	select ARCH_WANT_FRAME_POINTERS if !CPU_CK610
> +	select ARCH_WANT_FRAME_POINTERS if (!CPU_CK610 && STACKTRACE_SUPPORT)
>  	select COMMON_CLK
>  	select CLKSRC_MMIO
>  	select CSKY_MPINTC if CPU_CK860
> @@ -125,7 +125,7 @@ config MMU
>  	def_bool y
>  
>  config STACKTRACE_SUPPORT
> -	def_bool y
> +	def_bool $(success,echo 'int foo(void) { return 0; }' | $(CC) -mbacktrace -x c - -c -o /dev/null)
>  
>  config TIME_LOW_RES
>  	def_bool y
> -- 
> 2.27.0
> 

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

* Re: [PATCH] csky: Fix build with upstream gcc
  2020-07-21 13:21 [PATCH] csky: Fix build with upstream gcc Guenter Roeck
@ 2020-07-21 16:05 ` Guo Ren
  0 siblings, 0 replies; 3+ messages in thread
From: Guo Ren @ 2020-07-21 16:05 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Joerg Roedel, linux-csky, Linux Kernel Mailing List, Joerg Roedel

Thx Joerg & Guenter,

Cool work!

Acked-by: Guo Ren <guoren@kernel.org>

Approve to next branch.

On Tue, Jul 21, 2020 at 9:21 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> On Tue, Jul 21, 2020 at 01:23:14PM +0200, Joerg Roedel wrote:
> > From: Joerg Roedel <jroedel@suse.de>
> >
> > Building a kernel for the CSKY architecture with CONFIG_FRAME_POINTER
> > set requires a gcc supporting the non-upstream '-mbacktrace' option.
> > Check for the '-mbacktrace' option before enabling CONFIG_FRAMEPOINTER
> > and fix building CSKY with an upstream gcc compiler.
> >
> > Signed-off-by: Joerg Roedel <jroedel@suse.de>
>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> Tested-by: Guenter Roeck <linux@roeck-us.net>
>
> > ---
> >  arch/csky/Kconfig | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
> > index bd31ab12f77d..1622e1c56026 100644
> > --- a/arch/csky/Kconfig
> > +++ b/arch/csky/Kconfig
> > @@ -8,7 +8,7 @@ config CSKY
> >       select ARCH_HAS_SYNC_DMA_FOR_DEVICE
> >       select ARCH_USE_BUILTIN_BSWAP
> >       select ARCH_USE_QUEUED_RWLOCKS if NR_CPUS>2
> > -     select ARCH_WANT_FRAME_POINTERS if !CPU_CK610
> > +     select ARCH_WANT_FRAME_POINTERS if (!CPU_CK610 && STACKTRACE_SUPPORT)
> >       select COMMON_CLK
> >       select CLKSRC_MMIO
> >       select CSKY_MPINTC if CPU_CK860
> > @@ -125,7 +125,7 @@ config MMU
> >       def_bool y
> >
> >  config STACKTRACE_SUPPORT
> > -     def_bool y
> > +     def_bool $(success,echo 'int foo(void) { return 0; }' | $(CC) -mbacktrace -x c - -c -o /dev/null)
> >
> >  config TIME_LOW_RES
> >       def_bool y
> > --
> > 2.27.0
> >



-- 
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/

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

* [PATCH] csky: Fix build with upstream gcc
@ 2020-07-21 11:23 Joerg Roedel
  0 siblings, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2020-07-21 11:23 UTC (permalink / raw)
  To: Guo Ren; +Cc: Guenter Roeck, linux-csky, linux-kernel, Joerg Roedel

From: Joerg Roedel <jroedel@suse.de>

Building a kernel for the CSKY architecture with CONFIG_FRAME_POINTER
set requires a gcc supporting the non-upstream '-mbacktrace' option.
Check for the '-mbacktrace' option before enabling CONFIG_FRAMEPOINTER
and fix building CSKY with an upstream gcc compiler.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 arch/csky/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
index bd31ab12f77d..1622e1c56026 100644
--- a/arch/csky/Kconfig
+++ b/arch/csky/Kconfig
@@ -8,7 +8,7 @@ config CSKY
 	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
 	select ARCH_USE_BUILTIN_BSWAP
 	select ARCH_USE_QUEUED_RWLOCKS if NR_CPUS>2
-	select ARCH_WANT_FRAME_POINTERS if !CPU_CK610
+	select ARCH_WANT_FRAME_POINTERS if (!CPU_CK610 && STACKTRACE_SUPPORT)
 	select COMMON_CLK
 	select CLKSRC_MMIO
 	select CSKY_MPINTC if CPU_CK860
@@ -125,7 +125,7 @@ config MMU
 	def_bool y
 
 config STACKTRACE_SUPPORT
-	def_bool y
+	def_bool $(success,echo 'int foo(void) { return 0; }' | $(CC) -mbacktrace -x c - -c -o /dev/null)
 
 config TIME_LOW_RES
 	def_bool y
-- 
2.27.0


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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21 13:21 [PATCH] csky: Fix build with upstream gcc Guenter Roeck
2020-07-21 16:05 ` Guo Ren
  -- strict thread matches above, loose matches on Subject: below --
2020-07-21 11:23 Joerg Roedel

Linux-csky Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-csky/0 linux-csky/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-csky linux-csky/ https://lore.kernel.org/linux-csky \
		linux-csky@vger.kernel.org
	public-inbox-index linux-csky

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-csky


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git