Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1453610pxb; Sun, 12 Sep 2021 20:08:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyukIGbmFaIowDP/XNFKvlOCCgOpYFQHUtjD3M8r9DvhiHZKD9iXMBf6deJMlwWZBUjftBg X-Received: by 2002:a92:cb8e:: with SMTP id z14mr6610297ilo.318.1631502506999; Sun, 12 Sep 2021 20:08:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631502506; cv=none; d=google.com; s=arc-20160816; b=pDBYA9nH5kOEPtGwR+qnkXKyYoG4nQ9kBGIbaWSPUNOv7Uev/bRzqhIgviJsTXsntO NvZcrtPEeMHkAfGihNdbyP9dZ6M0l2GkdTgUMoNd99F6MHzYxD+uC3Yyy/9PzxF05Qjm 32ZiVA9mkTGOR1UfQMKDqZh//azwlZEqOzCjBWpzfdOZWLD4Ux+tAFAQuZi/JcZPzbXt YBaHUeZaIXef/NyXl7/QY/CDw0J1pXixj2AnFFuXV201qoCpVADUdaz68o/6RxksiFc2 ljnNayW04hPF+Wdk4xQzOhEztIn113yKVxXyrt/ZLqG965tPi1h24zfcKNvrgkVaLKEr aflA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=eOXIGBIEGrfnSMhtdzgKg1L/FG60vZob/ftN2FeCQu0=; b=jbLHy9zJjPmBn5oMuLZq4S/uHhxR7qdITe5PJgeV/UURndXXt3ClprR7adfWrniKfS aAHDETQeyB6SvlIavC77pTQOmPgkSFe901qEKM+iOip74Uic78vPSIDPiHyrRVblOC2b xPYj0F446TSHMV+wGy5F9sFw9Ng6pf0T9BmzjssBtNwQWFBeAOxVII7Gil/E4/6t8V1t 3Hna2aUKzWi/qxqOUTe14gGT0QmJYbHXPNOSft2WITQR1SwtwNF6HnYQgDtjkbfSGMlT nm0dQ3CgtOKSZo6Xg7fS6RFxbQ51zdvthPCsJJJTi9MeqRRP3FAyhGAkrSq+q2/w73f3 PwWA== 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 q17si5591068ilj.164.2021.09.12.20.08.15; Sun, 12 Sep 2021 20:08: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 S237570AbhIMDHu (ORCPT + 99 others); Sun, 12 Sep 2021 23:07:50 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:32940 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S237561AbhIMDHq (ORCPT ); Sun, 12 Sep 2021 23:07:46 -0400 X-UUID: 411b20b6823d4893b7019c28facb89d7-20210913 X-UUID: 411b20b6823d4893b7019c28facb89d7-20210913 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 775770715; Mon, 13 Sep 2021 11:06:27 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs06n1.mediatek.inc (172.21.101.129) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 13 Sep 2021 11:06:26 +0800 Received: from mtksdccf07.mediatek.inc (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 11:06:26 +0800 From: Miles Chen To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang CC: , , , , Miles Chen Subject: [PATCH] scripts/sorttable: riscv: fix undelcred identifier 'EM_RISCV' error Date: Mon, 13 Sep 2021 11:06:25 +0800 Message-ID: <20210913030625.4525-1-miles.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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' [1] https://lore.kernel.org/lkml/e8965b25-f15b-c7b4-748c-d207dda9c8e8@i2se.com/ Cc: Jisheng Zhang Reported-by: Stefan Wahren Fixes: 54fed35fd393 ("riscv: Enable BUILDTIME_TABLE_SORT") Signed-off-by: Miles Chen --- 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 *); -- 2.18.0