Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH V2 2/9] arch/csky: Add ck860 and -mcpu compiler options
Date: Sun, 26 May 2019 22:43:36 +0200	[thread overview]
Message-ID: <20190526224336.7cc43e96@windsurf> (raw)
In-Reply-To: <1557305915-11247-2-git-send-email-guoren@kernel.org>

Hello,

On Wed,  8 May 2019 16:58:28 +0800
guoren at kernel.org wrote:

> From: Guo Ren <ren_guo@c-sky.com>
> 
> Add ck860 support and move -mcpu into arch.mk.csky.

Adding ck860 support and moving -mcpu handling in arch.mk.csky are two
independent things. Please make the move to arch.mk.csky first without
ck860, as a cleanup, in a first patch, and then another patch does the
addition of ck860 support.

> +config BR2_ck860
> +	bool "ck860"
> +
>  endchoice
>  
>  config BR2_CSKY_FPU
>  	bool "Enable FPU coprocessor"
> -	depends on BR2_ck810 || BR2_ck807
> +	depends on BR2_ck810 || BR2_ck807 || BR2_ck860
>  	help
>  	  You can say N here if your C-SKY CPU doesn't have a
>  	  Floating-Point Coprocessor or if you don't need FPU support
> @@ -25,7 +28,7 @@ config BR2_CSKY_FPU
>  
>  config BR2_CSKY_VDSP
>  	bool "Enable VDSP 3.0 enhanced instructions Co-processor"
> -	depends on BR2_ck860
> +	depends on BR2_CSKY_FPU

So in PATCH 1, VDSP is only for CK860, but now it's for all cores that
have a FPU, which includes CK810 and CK807. It should be consistent
from the start, i.e from the point where VDSP is introduced.

> -config BR2_GCC_TARGET_CPU
> -	default "ck610"		if (BR2_ck610 && !BR2_CSKY_FPU && !BR2_CSKY_DSP)
> -	default "ck807"		if (BR2_ck807 && !BR2_CSKY_FPU && !BR2_CSKY_DSP)
> -	default "ck807e"	if (BR2_ck807 && !BR2_CSKY_FPU &&  BR2_CSKY_DSP)
> -	default "ck807f"	if (BR2_ck807 &&  BR2_CSKY_FPU && !BR2_CSKY_DSP)
> -	default "ck807ef"	if (BR2_ck807 &&  BR2_CSKY_FPU &&  BR2_CSKY_DSP)
> -	default "ck810"		if (BR2_ck810 && !BR2_CSKY_FPU && !BR2_CSKY_DSP)
> -	default "ck810e"	if (BR2_ck810 && !BR2_CSKY_FPU &&  BR2_CSKY_DSP)
> -	default "ck810f"	if (BR2_ck810 &&  BR2_CSKY_FPU && !BR2_CSKY_DSP)
> -	default "ck810ef"	if (BR2_ck810 &&  BR2_CSKY_FPU &&  BR2_CSKY_DSP)

This should go to the patch cleaning up the logic to use arch.mk.csky.


> diff --git a/arch/arch.mk.csky b/arch/arch.mk.csky
> new file mode 100644
> index 0000000..fb59ae2
> --- /dev/null
> +++ b/arch/arch.mk.csky
> @@ -0,0 +1,26 @@
> +#
> +# Configure the GCC_TARGET_ARCH variable and append the
> +# appropriate C-SKY ISA extensions.
> +#
> +
> +ifeq ($(BR2_csky),y)
> +
> +ifeq ($(BR2_ck610),y)
> +GCC_TARGET_CPU := ck610
> +else ifeq ($(BR2_ck807),y)
> +GCC_TARGET_CPU := ck807
> +else ifeq ($(BR2_ck810),y)
> +GCC_TARGET_CPU := ck810
> +else ifeq ($(BR2_ck860),y)
> +GCC_TARGET_CPU := ck860
> +endif
> +
> +ifeq ($(BR2_CSKY_FPU),y)
> +GCC_TARGET_CPU := $(GCC_TARGET_CPU)f
> +endif

Same.

> +ifeq ($(BR2_CSKY_VDSP),y)
> +GCC_TARGET_CPU := $(GCC_TARGET_CPU)v
> +endif

This should go to the patch adding the BR2_CSKY_VDSP option.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2019-05-26 20:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08  8:58 [Buildroot] [PATCH V2 1/9] arch/csky: Add VDSP and FLOAT_ABI compiler options guoren at kernel.org
2019-05-08  8:58 ` [Buildroot] [PATCH V2 2/9] arch/csky: Add ck860 and -mcpu " guoren at kernel.org
2019-05-26 20:43   ` Thomas Petazzoni [this message]
2019-05-27  6:43     ` Guo Ren
2019-05-08  8:58 ` [Buildroot] [PATCH V2 3/9] arch/csky: Add toolchain build framework guoren at kernel.org
2019-05-26 20:44   ` Thomas Petazzoni
2019-05-27  6:52     ` Guo Ren
2019-05-08  8:58 ` [Buildroot] [PATCH V2 4/9] package/binutils: Add C-SKY support guoren at kernel.org
2019-05-26 20:52   ` Thomas Petazzoni
2019-05-27  7:23     ` Guo Ren
2019-05-08  8:58 ` [Buildroot] [PATCH V2 5/9] package/gcc: " guoren at kernel.org
2019-05-26 20:53   ` Thomas Petazzoni
2019-05-27  7:27     ` Guo Ren
2019-05-08  8:58 ` [Buildroot] [PATCH V2 6/9] package/gdb: " guoren at kernel.org
2019-05-26 20:56   ` Thomas Petazzoni
2019-05-27  8:08     ` Guo Ren
2019-05-08  8:58 ` [Buildroot] [PATCH V2 7/9] package/glibc: " guoren at kernel.org
2019-05-26 20:57   ` Thomas Petazzoni
2019-05-27  8:11     ` Guo Ren
2019-05-08  8:58 ` [Buildroot] [PATCH V2 8/9] support/config.sub: " guoren at kernel.org
2019-05-27 20:30   ` Thomas Petazzoni
2019-05-27 22:00     ` Peter Korsgaard
2019-05-28  6:55       ` Thomas Petazzoni
2019-06-06 15:19     ` Peter Korsgaard
2019-05-08  8:58 ` [Buildroot] [PATCH V2 9/9] configs/qemu_cskyXXX_virt: new defconfig guoren at kernel.org
2019-05-13  5:46 ` [Buildroot] [PATCH V2 1/9] arch/csky: Add VDSP and FLOAT_ABI compiler options Guo Ren
2019-05-26 20:39 ` Thomas Petazzoni
2019-05-26 20:40 ` Thomas Petazzoni
2019-05-27 11:35   ` Guo Ren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190526224336.7cc43e96@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox