Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1445556pxb; Sun, 12 Sep 2021 19:51:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTmn7X1Jabxgg81yYMiO5cjN7xAMQACt+jrvkC/l167mfE0x2+docPyYLL4Dc2I2qAknsC X-Received: by 2002:a02:7b24:: with SMTP id q36mr7583101jac.130.1631501486918; Sun, 12 Sep 2021 19:51:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631501486; cv=none; d=google.com; s=arc-20160816; b=SbXqzJRNLJHfTfGjI2VzIDLjd4O7rHPdEd/XVJDkJHB+FOq4CdyPx4eD04PnDuD8DR kDsa2KehzJQP+33DsHNsuFEdS9bjYdZlscBUCiQsDkGly6XAzKkA3gJg8B7ucez9xvbE aVF7XqWJiSeWsqv4WkdTfxTnyKa2RPSUhDRWdrIA9KLn6hait7/NmtqC0v0eOwTlfovA +tKAMis3o0ZTtrWTMyvHfjtdYD3ZuQb2VF3T/ZT1h5sjsCazPnTX2yPc1SNGcTdmFBOs DouxoiOP4/suCb5H5B2hPBf0XAQgIBhirfQHklaVXoxZFiD7a4z4IjelJ6+W9ojpGMod oc5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:to:from:subject:message-id; bh=E5QvlRJO4bmweVVVkngpB0oarFYXkX78SyP1KEP7sgU=; b=YpjSuZiReB4q08pb+tY3mTm8ivHYsqVUZnG1rTirjwKkVmJGVlC4I/8BI4cyDUe0w7 2E75ZOVI5Qv140xOU4n8//VIjv0MjHVVZmTZ6nulHR0EjLQR62e32FmhloNNJCmCfgWm b8K8KnVvXXVAj7WW4PDvaowsMMeIepPUPnHNhJO6NZ1cTt+Ts6/YBz7BN8Nm0j6/WzKC 7CjonOMKgnKS/oHyiWECF5DB0UFi+4bEIRWGmKfI/GJUvmiCZFS72ORaTQox2NwUOnP7 FABabuJzmsNjSSPb6Tt3AIIxWNhAm12fqH2ZFpJAvUnrL50QUGYDEmCsr5BJg5qbYN4U NM2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h25si6038143ioj.39.2021.09.12.19.51.01; Sun, 12 Sep 2021 19:51:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236935AbhIMCuh (ORCPT + 99 others); Sun, 12 Sep 2021 22:50:37 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:34650 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S236902AbhIMCug (ORCPT ); Sun, 12 Sep 2021 22:50:36 -0400 X-UUID: 736645b2051b4fdc9a00226ec62e7e60-20210913 X-UUID: 736645b2051b4fdc9a00226ec62e7e60-20210913 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1364295399; Mon, 13 Sep 2021 10:49:15 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 13 Sep 2021 10:49:14 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 13 Sep 2021 10:49:14 +0800 Message-ID: <78cf3af71e035a79d021d17c6fd8a09dd1e4984d.camel@mediatek.com> Subject: Re: Build error: =?UTF-8?Q?=E2=80=98EM=5FRISCV=E2=80=99?= undeclared From: Miles Chen To: Stefan Wahren , Jisheng Zhang , open list , "Palmer Dabbelt" Date: Mon, 13 Sep 2021 10:49:14 +0800 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2021-09-12 at 12:29 +0200, Stefan Wahren wrote: > Hi, > > i tried to compile current torvalds tree > ("78e709522d2c012cb0daad2e668506637bffb7c2") for > arm/multi_v7_defconfig > and get the following build issue: > > UPD include/generated/utsrelease.h > scripts/sorttable.c: In function ‘do_file’: > scripts/sorttable.c:352:7: error: ‘EM_RISCV’ undeclared (first use in > this function) > case EM_RISCV: > ^ > scripts/sorttable.c:352:7: note: each undeclared identifier is > reported > only once for each function it appears in > > I assume this is caused by: > > 54fed35fd3939398be292e4090b0b1c5ff2238b4 ("riscv: Enable > BUILDTIME_TABLE_SORT") I hit this error too. I add the follow conditional EM_RISCV definition in sorttable.c to build pass (arm64/defconfig). I will submit a patch out. 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 + > > Best regards > Stefan > >