From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752704AbcGMNii (ORCPT ); Wed, 13 Jul 2016 09:38:38 -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 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 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(-) 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 -- 2.8.1