From 7470fc63007e0e9291d3a96af88771c86fae7e52 Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Tue, 15 Mar 2011 21:03:44 +0000 Subject: [PATCH] 2011-03-15 Andreas Tobler * gdb.base/jit-main.c: Define ElfW for non glibc elf targets. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.base/jit-main.c | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5f0cb6c8bea..df52132dfd2 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-03-15 Andreas Tobler + + * gdb.base/jit-main.c: Define ElfW for non glibc elf targets. + 2011-03-15 Phil Muldoon * lib/gdb.exp (gdb_unload): Add another termination case. diff --git a/gdb/testsuite/gdb.base/jit-main.c b/gdb/testsuite/gdb.base/jit-main.c index 07ff1986769..b20c516b6bc 100644 --- a/gdb/testsuite/gdb.base/jit-main.c +++ b/gdb/testsuite/gdb.base/jit-main.c @@ -29,6 +29,19 @@ #include #include +/* ElfW is coming from linux. On other platforms it does not exist. + Let us define it here. */ +#ifndef ElfW +# if (defined (_LP64) || defined (__LP64__)) +# define WORDSIZE 64 +# else +# define WORDSIZE 32 +# endif /* _LP64 || __LP64__ */ +#define ElfW(type) _ElfW (Elf, WORDSIZE, type) +#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t) +#define _ElfW_1(e,w,t) e##w##t +#endif /* !ElfW */ + typedef enum { JIT_NOACTION = 0, -- 2.30.2