This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] bfd/rs6000-core.c


>>>>> Kevin Buettner writes:

Nick> The patch looks good to me.  Approved, unless Kevin has any objections.

Kevin> I've just looked it over and it looks good to me too.

Nick> I suggest also getting the binutils mailing list to rubber-stamp it before
Nick> committing it.  There was talk about officially giving GDB ownership of
Nick> GDB-only files in bfd, but I don't think that's happened.

Kevin> I agree that it ought to be sent to the binutils list prior to committing
Kevin> it.

	[As requested, I am resending this patch which affects configure
to the binutils mailinglist.  The original discussion begins with msg00391
in June 2001 on the gdb-patches mailinglist.]

	The new AIX 4.3+ core support assumes a field in the core_dumpx
structure defined in /usr/include/sys/core.h that only exists in AIX 4.3.3
and not earlier releases.  This prevents binutils from building on AIX
4.3.2.  Albert and I have worked out the appended patch.

David


	* rs6000-core.c: Use autoconf variable HAVE_ST_C_IMPL to guard use
	of c_impl field.
	* configure.in: Auto-configure HAVE_ST_C_IMPL.
	* configure.in: Likewise.

--- bfd/configure.in.orig	Fri Jun 22 13:09:23 2001
+++ bfd/configure.in	Fri Jun 22 13:18:11 2001
@@ -301,6 +301,15 @@
 changequote([,])dnl
         COREFILE=rs6000-core.lo
 	COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
+
+	# Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
+	# have c_impl as a member of struct core_dumpx
+	AC_MSG_CHECKING([for c_impl in struct core_dumpx])
+	AC_TRY_COMPILE([#include <core.h>],
+	  [struct core_dumpx c; c.c_impl = 0;],
+	  [AC_DEFINE(HAVE_ST_C_IMPL, 1,
+	    [Define if struct core_dumpx has member c_impl])
+	  AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
 	;;
   rs6000-*-aix4*)	COREFILE=rs6000-core.lo ;;
   rs6000-*-*)		COREFILE=rs6000-core.lo ;;
--- bfd/config.in.orig	Fri Jun 22 13:17:50 2001
+++ bfd/config.in	Fri Jun 22 13:18:31 2001
@@ -208,6 +208,9 @@
 /* Define if getenv is not declared in system header files. */
 #undef NEED_DECLARATION_GETENV
 
+/* Define if struct core_dumpx has member c_impl */
+#undef HAVE_ST_C_IMPL
+
 /* Define if <sys/procfs.h> has prstatus_t. */
 #undef HAVE_PRSTATUS_T
 
--- bfd/rs6000-core.c.orig	Fri Jun 22 13:11:09 2001
+++ bfd/rs6000-core.c	Fri Jun 22 13:11:26 2001
@@ -182,7 +182,7 @@
 
 /* Return the c_impl field from struct core_dumpx C.  */
 
-#ifdef AIX_CORE_DUMPX_CORE
+#ifdef HAVE_ST_C_IMPL
 # define CNEW_IMPL(c)	(c).c_impl
 #else
 # define CNEW_IMPL(c)	0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]