]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
authorThiago Jung Bauermann <bauerman@br.ibm.com>
Fri, 30 Mar 2012 20:23:16 +0000 (20:23 +0000)
committerThiago Jung Bauermann <bauerman@br.ibm.com>
Fri, 30 Mar 2012 20:23:16 +0000 (20:23 +0000)
are available.
* linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
[HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
* config.in: Regenerate.
* configure: Likewise.

gdb/gdbserver/ChangeLog
gdb/gdbserver/config.in
gdb/gdbserver/configure
gdb/gdbserver/configure.ac
gdb/gdbserver/linux-low.c

index 63df5b08c786afac1d6c1ad65c03ad0f7453a5e5..cd53c66d971edffe8b5536ac417ad8bf45372333 100644 (file)
@@ -1,3 +1,12 @@
+2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
+
+       * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
+       are available.
+       * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
+       [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
+       * config.in: Regenerate.
+       * configure: Likewise.
+
 2012-03-29  Pedro Alves  <palves@redhat.com>
 
        * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
index 1d61c13579c0564b83611339a6a21a9751c88666..912b6ae7d7eef6449cfea0a2898be82e4e18105c 100644 (file)
 /* Define to 1 if you have the `dladdr' function. */
 #undef HAVE_DLADDR
 
+/* Define to 1 if the system has the type `Elf32_auxv_t'. */
+#undef HAVE_ELF32_AUXV_T
+
+/* Define to 1 if the system has the type `Elf64_auxv_t'. */
+#undef HAVE_ELF64_AUXV_T
+
 /* Define if <sys/procfs.h> has elf_fpregset_t. */
 #undef HAVE_ELF_FPREGSET_T
 
index 2b0aeb806bcb5ba0c98eed7bf95db7d825b9bab3..9a6f6df8a3382eeeba568f642cd2eb2cb698e311 100755 (executable)
@@ -4474,6 +4474,30 @@ _ACEOF
 fi
 
 
+ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h>
+
+"
+if test "x$ac_cv_type_Elf32_auxv_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ELF32_AUXV_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h>
+
+"
+if test "x$ac_cv_type_Elf64_auxv_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ELF64_AUXV_T 1
+_ACEOF
+
+
+fi
+
+
 
 
 # Check whether --with-pkgversion was given.
index d2f22bd62a269a6fe817633f14b4031bb4456e19..9ac4232f0df33ac44ef2f547b3ca144bbba8207d 100644 (file)
@@ -168,6 +168,10 @@ AC_CHECK_TYPES(socklen_t, [], [],
 #include <sys/socket.h>
 ])
 
+AC_CHECK_TYPES([Elf32_auxv_t, Elf64_auxv_t], [], [],
+#include <elf.h>
+)
+
 ACX_PKGVERSION([GDB])
 ACX_BUGURL([http://www.gnu.org/software/gdb/bugs/])
 AC_DEFINE_UNQUOTED([PKGVERSION], ["$PKGVERSION"], [Additional package description])
index ab875704ea84f9ad7d0e2d5e4385c9975b158a91..043451d8578deeac66fb8399b99420cb7f4f57d4 100644 (file)
 #endif
 #endif
 
+#ifndef HAVE_ELF32_AUXV_T
+/* Copied from glibc's elf.h.  */
+typedef struct
+{
+  uint32_t a_type;             /* Entry type */
+  union
+    {
+      uint32_t a_val;          /* Integer value */
+      /* We use to have pointer elements added here.  We cannot do that,
+        though, since it does not work when using 32-bit definitions
+        on 64-bit platforms and vice versa.  */
+    } a_un;
+} Elf32_auxv_t;
+#endif
+
+#ifndef HAVE_ELF64_AUXV_T
+/* Copied from glibc's elf.h.  */
+typedef struct
+{
+  uint64_t a_type;             /* Entry type */
+  union
+    {
+      uint64_t a_val;          /* Integer value */
+      /* We use to have pointer elements added here.  We cannot do that,
+        though, since it does not work when using 32-bit definitions
+        on 64-bit platforms and vice versa.  */
+    } a_un;
+} Elf64_auxv_t;
+#endif
+
 /* ``all_threads'' is keyed by the LWP ID, which we use as the GDB protocol
    representation of the thread ID.