From patchwork Fri Sep 24 22:43:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12516965 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56587C433F5 for ; Fri, 24 Sep 2021 22:43:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 084E161265 for ; Fri, 24 Sep 2021 22:43:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 084E161265 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id A5BC96B007D; Fri, 24 Sep 2021 18:43:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A0B3C6B007E; Fri, 24 Sep 2021 18:43:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8FA0C6B0080; Fri, 24 Sep 2021 18:43:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0114.hostedemail.com [216.40.44.114]) by kanga.kvack.org (Postfix) with ESMTP id 7FFEE6B007D for ; Fri, 24 Sep 2021 18:43:40 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 4FEE38249980 for ; Fri, 24 Sep 2021 22:43:40 +0000 (UTC) X-FDA: 78623945400.21.9F6A0A1 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf18.hostedemail.com (Postfix) with ESMTP id 0A9B14002088 for ; Fri, 24 Sep 2021 22:43:39 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id D71B56125F; Fri, 24 Sep 2021 22:43:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1632523419; bh=HzKdeZV8Mh/bu9P5zZcHBxV6NxADl9v994DHcueykNY=; h=Date:From:To:Subject:In-Reply-To:From; b=MWX/RQJjTsXaJg2nQuwitvKxWsdFPbywDyspDiKp6MrTzNpN60+4epTyMHP2N3JAj vqrU3dwo45XEtcowlexKCklvoUo2N0n3vaZICZUk0ckKLM4EoeMMnxuTOa7Dcn4aZN YGjhrXr5rKWOELuF2UhN+3O9OT6kxHCht6EB4kIs= Date: Fri, 24 Sep 2021 15:43:38 -0700 From: Andrew Morton To: akpm@linux-foundation.org, aou@eecs.berkeley.edu, jszhang@kernel.org, linux-mm@kvack.org, miles.chen@mediatek.com, mkubecek@suse.cz, mm-commits@vger.kernel.org, mmayer@broadcom.com, palmer@dabbelt.com, paul.walmsley@sifive.com, stefan.wahren@i2se.com, torvalds@linux-foundation.org Subject: [patch 07/16] scripts/sorttable: riscv: fix undeclared identifier 'EM_RISCV' error Message-ID: <20210924224338.8vuOlQPWr%akpm@linux-foundation.org> In-Reply-To: <20210924154257.1dbf6699ab8d88c0460f924f@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 0A9B14002088 X-Stat-Signature: opxyht1pmac7qnetkmeyqrr4e74owryd Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b="MWX/RQJj"; dmarc=none; spf=pass (imf18.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1632523419-63091 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Miles Chen Subject: scripts/sorttable: riscv: fix undeclared identifier 'EM_RISCV' error 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/ EM_RISCV was added to in glibc 2.24 so builds on systems with glibc headers < 2.24 should show this error. [mkubecek@suse.cz: changelog addition] Link: https://lkml.kernel.org/r/20210913030625.4525-1-miles.chen@mediatek.com Fixes: 54fed35fd393 ("riscv: Enable BUILDTIME_TABLE_SORT") Signed-off-by: Miles Chen Reported-by: Stefan Wahren Tested-by: Stefan Wahren Reviewed-by: Jisheng Zhang Cc: Michal Kubecek Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: Markus Mayer Signed-off-by: Andrew Morton --- scripts/sorttable.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/scripts/sorttable.c~scripts-sorttable-riscv-fix-undelcred-identifier-em_riscv-error +++ a/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 *);