mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scripts/recordmcount: improve EM_METAG define checks
@ 2016-07-11 19:51 Ross Burton
  0 siblings, 0 replies; 3+ messages in thread
From: Ross Burton @ 2016-07-11 19:51 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scripts/recordmcount: improve EM_METAG define checks
  2016-07-13 13:37 Ross Burton
@ 2016-07-26 21:22 ` Steven Rostedt
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2016-07-26 21:22 UTC (permalink / raw)
  To: Ross Burton; +Cc: linux-kernel, Laura Abbott

On Wed, 13 Jul 2016 14:37:46 +0100
Ross Burton <ross.burton@intel.com> wrote:

> 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>

Actually, Laura beat you to it:

 http://lkml.kernel.org/r/1468005530-14757-1-git-send-email-labbott@redhat.com

I'll be applying her patch. I'll also mark it as stable, as it's come
up a few times on IRC as well.

I'll still add a Reported-by from you.

Thanks!

-- Steve

> ---
>  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
>  

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] scripts/recordmcount: improve EM_METAG define checks
@ 2016-07-13 13:37 Ross Burton
  2016-07-26 21:22 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Ross Burton @ 2016-07-13 13:37 UTC (permalink / raw)
  To: rostedt; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-26 21:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-11 19:51 [PATCH] scripts/recordmcount: improve EM_METAG define checks Ross Burton
2016-07-13 13:37 Ross Burton
2016-07-26 21:22 ` Steven Rostedt

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®