From: Ross Burton <ross.burton@intel.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] scripts/recordmcount: improve EM_METAG define checks
Date: Mon, 11 Jul 2016 20:51:27 +0100 [thread overview]
Message-ID: <1468266687-11634-1-git-send-email-ross.burton@intel.com> (raw)
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 <ross.burton@intel.com>
---
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 <string.h>
#include <unistd.h>
-#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
next reply other threads:[~2016-07-11 19:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-11 19:51 Ross Burton [this message]
2016-07-13 13:37 Ross Burton
2016-07-26 21:22 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1468266687-11634-1-git-send-email-ross.burton@intel.com \
--to=ross.burton@intel.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®