linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jisheng Zhang <jszhang3@mail.ustc.edu.cn>
To: Miles Chen <miles.chen@mediatek.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Jisheng Zhang <jszhang@kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>, <wsd_upstream@mediatek.com>
Subject: Re: [PATCH] scripts/sorttable: riscv: fix undelcred identifier 'EM_RISCV' error
Date: Wed, 15 Sep 2021 21:54:32 +0800	[thread overview]
Message-ID: <20210915215432.02a5e08e@xhacker> (raw)
In-Reply-To: <20210913030625.4525-1-miles.chen@mediatek.com>

On Mon, 13 Sep 2021 11:06:25 +0800
Miles Chen <miles.chen@mediatek.com> wrote:

> Fix the following build break by adding a conditional definition
> of EM_RISCV in order to allow cross-compilation on machines
> which do not have EM_RISCV definition in their host.
> 
> build break log from [1]:
> scripts/sorttable.c:352:7: error: use of undeclared identifier 'EM_RISCV'

Looks strange I can't reproduce it. FWICT, this may be seen with some old
toolchains.

> 
> [1] https://lore.kernel.org/lkml/e8965b25-f15b-c7b4-748c-d207dda9c8e8@i2se.com/
> 
> Cc: Jisheng Zhang <jszhang@kernel.org>
> Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
> Fixes: 54fed35fd393 ("riscv: Enable BUILDTIME_TABLE_SORT")
> Signed-off-by: Miles Chen <miles.chen@mediatek.com>

Reviewed-by: Jisheng Zhang <jszhang@kernel.org>

> ---
>  scripts/sorttable.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/scripts/sorttable.c b/scripts/sorttable.c
> index f355869c65cd..6ee4fa882919 100644
> --- a/scripts/sorttable.c
> +++ b/scripts/sorttable.c
> @@ -54,6 +54,10 @@
>  #define EM_ARCV2	195
>  #endif
>  
> +#ifndef EM_RISCV
> +#define EM_RISCV	243
> +#endif
> +
>  static uint32_t (*r)(const uint32_t *);
>  static uint16_t (*r2)(const uint16_t *);
>  static uint64_t (*r8)(const uint64_t *);



_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2021-09-15 14:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13  3:06 [PATCH] scripts/sorttable: riscv: fix undelcred identifier 'EM_RISCV' error Miles Chen
2021-09-13  5:19 ` Stefan Wahren
2021-09-15 13:54 ` Jisheng Zhang [this message]
2021-09-15 16:05   ` Michal Kubecek
2021-09-17  4:27     ` Miles Chen
2021-09-21 20:06       ` Markus Mayer

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=20210915215432.02a5e08e@xhacker \
    --to=jszhang3@mail.ustc.edu.cn \
    --cc=aou@eecs.berkeley.edu \
    --cc=jszhang@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=miles.chen@mediatek.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=wsd_upstream@mediatek.com \
    /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;
as well as URLs for NNTP newsgroup(s).