All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] arch/csky: restrict ck610 to the C-SKY gcc port
Date: Mon, 15 Jul 2019 18:53:28 +0200	[thread overview]
Message-ID: <20190715165328.GL29941@scaer> (raw)
In-Reply-To: <CAJF2gTQJV0rDrN4GU6pza7J-Rp0JnXZ6XeTh23qbn_x_Z+RZUA@mail.gmail.com>

Guo, All,

On 2019-07-16 00:02 +0800, Guo Ren spake thusly:
> On Sun, Jul 14, 2019 at 5:54 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> >
> > As Guo explained, upstream gcc does not support abi-v1 (only abi-v2), but
> > ck610 needs abi-v1 [0] [1]
> >
> > To simplify things, we make the whole C-SKY architecture require gcc-9
> > or later, and add a single exception in gcc to force the ck610 to use
> > the C-SKY port.
> >
> > [0] http://lists.busybox.net/pipermail/buildroot/2019-July/254386.html
> > [1] package/Makefile.in#73
> >
> > Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> > Cc: Guo Ren <guoren@kernel.org>
> > Cc: Arnout Vandecappelle <arnout@mind.be>
> > Cc: Romain Naour <romain.naour@gmail.com>
> > ---
> >  arch/Config.in             | 3 +++
> >  arch/Config.in.csky        | 2 ++
> >  package/gcc/Config.in.host | 3 +++
> >  3 files changed, 8 insertions(+)
> >
> > diff --git a/arch/Config.in b/arch/Config.in
> > index d8d841b1a2..9d1a06872d 100644
> > --- a/arch/Config.in
> > +++ b/arch/Config.in
> > @@ -78,6 +78,9 @@ config BR2_aarch64_be
> >  config BR2_csky
> >         bool "csky"
> >         select BR2_ARCH_HAS_MMU_MANDATORY
> > +       # Most variants are support by gcc-9+, except one that is handled as a
> > +       # special exception in package/gcc/Config.in.host
> > +       select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
> We recommand using  BR2_GCC_VERSION_CSKY not BR2_GCC_VERSION_9_X. I
> don't want GCC_9 as default for buildroot user and they could select
> it by themself.

This new 'select' does not change the pereferred gcc version. It just
limits which ones are available.

By selecting BR2_ARCH_NEEDS_GCC_AT_LEAST_9, we ensure that any version
of gcc below 9.x are not visible.

But the C-SKY specific gcc version, BR2_GCC_VERSION_CSKY, is not
impacted by this restriction.

So, with this patch, when BR2_csky=y:

  - with ck610, only BR2_GCC_VERSION_CSKY is available, labelled "gcc
    csky" in the gcc version selection, in menuconfig;

  - with any other variant, BR2_GCC_VERSION_CSKY and BR2_GCC_VERSION_9_X
    are both available, and BR2_GCC_VERSION_CSKY is the dfault.

Does that explanations address your concerns? If so, I can respin the
series with an expanded commit log.

Thanks for the review! :-)

Regards,
Yann E. MORIN.

> >         help
> >           csky is processor IP from china.
> >           http://www.c-sky.com/
> > diff --git a/arch/Config.in.csky b/arch/Config.in.csky
> > index 4bdfbfae4b..2cf31c88c6 100644
> > --- a/arch/Config.in.csky
> > +++ b/arch/Config.in.csky
> > @@ -5,6 +5,8 @@ choice
> >           Specific CPU variant to use
> >
> >  config BR2_ck610
> > +       # Not supported by upstream gc <= 9, and handled as a special
> > +       # exception in package/gcc/Config.in.host
> Acked.
> 
> >         bool "ck610"
> >
> >  config BR2_ck807
> > diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
> > index 8b563c8f27..adc12e95ea 100644
> > --- a/package/gcc/Config.in.host
> > +++ b/package/gcc/Config.in.host
> > @@ -89,6 +89,9 @@ config BR2_GCC_VERSION_9_X
> >         # powerpc spe support has been deprecated since gcc 8.x.
> >         # https://gcc.gnu.org/ml/gcc/2018-04/msg00102.html
> >         depends on !BR2_powerpc_SPE
> > +       # C-SKY sk610 needs abiv1, which is not supported in
> > +       # upstream gcc
> > +       depends on !BR2_ck610
> Acked.
> 
> >         select BR2_TOOLCHAIN_GCC_AT_LEAST_9
> >
> >  endchoice
> > --
> > 2.20.1
> >
> 
> 
> -- 
> Best Regards
>  Guo Ren
> 
> ML: https://lore.kernel.org/linux-csky/

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2019-07-15 16:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-14  9:54 [Buildroot] [PATCH 0/2] arch/csky: clean up conditions on gcc verssion (branch yem/arch-csky) Yann E. MORIN
2019-07-14  9:54 ` [Buildroot] [PATCH 1/2] arch/csky: restrict ck610 to the C-SKY gcc port Yann E. MORIN
2019-07-15 16:02   ` Guo Ren
2019-07-15 16:53     ` Yann E. MORIN [this message]
2019-07-15 23:06       ` Guo Ren
2019-07-15 23:08   ` Guo Ren
2019-07-14  9:54 ` [Buildroot] [PATCH 2/2] package/gcc: drop negative conditions on C-SKY for older versions Yann E. MORIN
2019-07-15 15:52   ` Guo Ren
2019-07-15 19:57     ` Yann E. MORIN
2019-07-15 23:07   ` 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=20190715165328.GL29941@scaer \
    --to=yann.morin.1998@free.fr \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.