82ff1fb
From 4196017cd0e50e434ee72ca706742804f75c8827 Mon Sep 17 00:00:00 2001
82ff1fb
From: Laura Abbott <labbott@fedoraproject.org>
82ff1fb
Date: Fri, 8 Jul 2016 11:15:43 -0700
82ff1fb
Subject: [PATCH] Work around for addition of metag def but not relocations
82ff1fb
82ff1fb
Caused by commit in sync up from
82ff1fb
http://pkgs.fedoraproject.org/cgit/rpms/glibc.git/commit/?id=9a78be1808600ca5e66eab741542447a29cfbeb3
82ff1fb
82ff1fb
Fixes build errors like:
82ff1fb
82ff1fb
scripts/recordmcount.c: In function 'do_file':
82ff1fb
scripts/recordmcount.c:466:28: error: 'R_METAG_ADDR32' undeclared (first use in this function)
82ff1fb
  case EM_METAG:  reltype = R_METAG_ADDR32;
82ff1fb
                            ^~~~~~~~~~~~~~
82ff1fb
scripts/recordmcount.c:466:28: note: each undeclared identifier is reported only once for each function it appears in
82ff1fb
scripts/recordmcount.c:468:20: error: 'R_METAG_NONE' undeclared (first use in this function)
82ff1fb
     rel_type_nop = R_METAG_NONE;
82ff1fb
                    ^~~~~~~~~~~~
82ff1fb
82ff1fb
Signed-off-by: Laura Abbott <labbott@fedoraproject.org>
82ff1fb
---
82ff1fb
 scripts/recordmcount.c | 9 ++++++++-
82ff1fb
 1 file changed, 8 insertions(+), 1 deletion(-)
82ff1fb
82ff1fb
diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c
82ff1fb
index e1675927..42396a7 100644
82ff1fb
--- a/scripts/recordmcount.c
82ff1fb
+++ b/scripts/recordmcount.c
82ff1fb
@@ -33,10 +33,17 @@
82ff1fb
 #include <string.h>
82ff1fb
 #include <unistd.h>
82ff1fb
 
82ff1fb
+/*
82ff1fb
+ * glibc synced up and added the metag number but didn't add the relocations.
82ff1fb
+ * Work around this in a crude manner for now.
82ff1fb
+ */
82ff1fb
 #ifndef EM_METAG
82ff1fb
-/* Remove this when these make it to the standard system elf.h. */
82ff1fb
 #define EM_METAG      174
82ff1fb
+#endif
82ff1fb
+#ifndef R_METAG_ADDR32
82ff1fb
 #define R_METAG_ADDR32                   2
82ff1fb
+#endif
82ff1fb
+#ifndef R_METAG_NONE
82ff1fb
 #define R_METAG_NONE                     3
82ff1fb
 #endif
82ff1fb
 
82ff1fb
-- 
82ff1fb
2.9.0
82ff1fb