From patchwork Wed Jul 13 13:37:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 71922 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1011719qga; Wed, 13 Jul 2016 06:41:48 -0700 (PDT) X-Received: by 10.66.86.103 with SMTP id o7mr13771947paz.5.1468417307760; Wed, 13 Jul 2016 06:41:47 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2si699581pfg.111.2016.07.13.06.41.47; Wed, 13 Jul 2016 06:41:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752707AbcGMNij (ORCPT + 30 others); Wed, 13 Jul 2016 09:38:39 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:38343 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751270AbcGMNi3 (ORCPT ); Wed, 13 Jul 2016 09:38:29 -0400 Received: by mail-wm0-f49.google.com with SMTP id o80so69719062wme.1 for ; Wed, 13 Jul 2016 06:38:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=UzU1ZSW/JT1JOFUbsxceCh/mFIlJ7lVQFE16FErb6dM=; b=b5qJgPPtmivIU1WP1ZAgeoc3c+TfL2DiSdU78RoS8+aXMkimmCpMoLPTNTiepRKyWJ t+KXol4bSykZLVmwg6surN5fzlbVvzS9x2xBb8hMci8+ftNALGU9ZBJ5FGTny2AXhawE tYmaRjG5tscxxBg5zqgYLQZXHLnge6hQ/ch6CJMMHIE+P35qQgbfONr/kxdVakwufD4N TPpHQ5cvrsir5keM+xyL4fDExxhso81S9AoEkHJr6XIdZq5yvNX+zjS9datSsxRViDQq VcM9FWgPBtFGGg36B75kVmZ2HUNLvV8LLzmvswEkRW+Kif0DFcbntqBjcgLcsLATqbTm V9DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UzU1ZSW/JT1JOFUbsxceCh/mFIlJ7lVQFE16FErb6dM=; b=G2MEquMiNA3mTt4UCZAjg0dC7CYSvob/X0qxaN0k4QgfB3LNP7CaVUdUaSZcgMhtfo N02MWSs23vpEUjrdgH/SMSl0CiPgvXNOsytKkRCtdR5NDrTWVNrxJa0Jg37yKDeFn7OZ l1n737ghiKCcqCITGa9VHOGJC2Sc2ejQHjXzBL5ayayv53ycaeXyiA0+nkol2tswhLvY qa6ah8pw+fgaxYs5MmBCedOZit6ZYoqagMdX9I77jdEefRkb485LdgAFx5FtcRYa3Z9Q T4p599p91Wppbgq0KkukxgwW7bcSnO4cpVqK8vGGwltHjFmPG6x5yHKUZuIkyuvCDQAD 8MrQ== X-Gm-Message-State: ALyK8tK1hKOH4ZnfkZa8jIMn8MIxwKEaQR7RgkO6cOlSRNDj6MgrT2geGTFalx3ZVIbZN/gq X-Received: by 10.194.101.69 with SMTP id fe5mr1003750wjb.139.1468417070921; Wed, 13 Jul 2016 06:37:50 -0700 (PDT) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id t6sm973717wji.30.2016.07.13.06.37.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Jul 2016 06:37:50 -0700 (PDT) From: Ross Burton To: rostedt@goodmis.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] scripts/recordmcount: improve EM_METAG define checks Date: Wed, 13 Jul 2016 14:37:46 +0100 Message-Id: <1468417066-13566-1-git-send-email-ross.burton@intel.com> X-Mailer: git-send-email 2.8.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Current glibc (as of c10f90, soon to be 2.24) has an elf.h which defines EM_METAG but doesn't also define R_METAG_ADDR32 and _NONE. This results in recordmcount not defining any of the META symbols, and the compile failing. Handle this by checking each #define individually instead of assuming the presence. Signed-off-by: Ross Burton --- scripts/recordmcount.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.8.1 diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c index e1675927..44ce050 100644 --- a/scripts/recordmcount.c +++ b/scripts/recordmcount.c @@ -33,10 +33,14 @@ #include #include -#ifndef EM_METAG /* Remove this when these make it to the standard system elf.h. */ +#ifndef EM_METAG #define EM_METAG 174 +#endif +#ifndef R_METAG_ADDR32 #define R_METAG_ADDR32 2 +#endif +#ifndef R_METAG_NONE #define R_METAG_NONE 3 #endif