[Crash-utility] [PATCH v3 0/4] Kdump core analysis support for PPC32

Dave Anderson anderson at redhat.com
Mon Jan 9 21:20:54 UTC 2012


Hi Suzuki,

One more fix -- you forgot to apply the implied "sticky" target
change for PPC.  If you do an initial "make target=PPC", you shouldn't
have to keep appending the "target=PPC" for all subsequent builds, i.e.,
you can just enter "make" from that point on.  I've applied this
patch to configure.c for that purpose:

--- configure.c.orig    2012-01-09 16:10:18.522195102 -0500
+++ configure.c 2012-01-09 16:14:32.869958450 -0500
@@ -411,6 +411,17 @@
                if ((target_data.target == X86) &&
                    (target_data.initial_gdb_target != X86))
                        arch_mismatch(sp);
+
+               if ((target_data.initial_gdb_target == PPC) &&
+                   (target_data.target != PPC)) {
+                       if (target_data.target == PPC64) 
+                               target_data.target = PPC;
+                       else
+                               arch_mismatch(sp);
+               }
+               if ((target_data.target == PPC) &&
+                   (target_data.initial_gdb_target != PPC))
+                       arch_mismatch(sp);
        }
 
         if ((fp = fopen("Makefile", "r")) == NULL) {

Dave

----- Original Message -----
> 
> Hi Suzuki,
> 
> Aside from the minor issues in my previous email, this feature works
> nicely for ppc32!
> 
> To avoid your having to send in another patch, I've modified your
> first
> 1/4 patch like so, where I've changed the top-level Makefile and the
> gdb-7.3.1/Makefile.in to check for uppercase "PPC64", and changed the
> define name passed to gdb from "TARGET" to "CRASH_TARGET":
> 
> --- ppc1.patch.orig  2012-01-09 11:30:43.636707000 -0500
> +++ ppc1.patch    2012-01-09 15:29:56.808811000 -0500
> @@ -6,7 +6,7 @@
>   
>   ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/
>   -e s/arm.*/arm/ -e s/sa110/arm/)
>  -ifeq ($(ARCH), ppc64)
> -+ifeq (${TARGET}, ppc64)
> ++ifeq (${TARGET}, PPC64)
>   CONF_FLAGS = -m64
>   endif
>   
> @@ -16,8 +16,8 @@
>             --with-bugurl="" --with-expat=no --with-python=no; \
>  -        make --no-print-directory; echo ${TARGET} > crash.target) \
>  -      else (cd ${GDB}/gdb; make --no-print-directory;); fi
> -+        make --no-print-directory TARGET=${TARGET}; echo ${TARGET}
> > crash.target) \
> -+      else (cd ${GDB}/gdb; make --no-print-directory
> TARGET=${TARGET};); fi
> ++        make --no-print-directory CRASH_TARGET=${TARGET}; echo
> ${TARGET} > crash.target) \
> ++      else (cd ${GDB}/gdb; make --no-print-directory
> CRASH_TARGET=${TARGET};); fi
>         @if [ ! -f ${GDB}/gdb/libgdb.a ]; then \
>           echo; echo "gdb build failed: ${GDB}/gdb/libgdb.a does not
>           exist"; \
>           echo; exit 1; fi
> @@ -74,7 +74,7 @@
>    CC_FOR_BUILD = @CC_FOR_BUILD@
>    CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
>  -+ifeq ($(shell arch), ppc64)
> -++ifeq (${TARGET}, ppc64)
> +++ifeq (${CRASH_TARGET}, PPC64)
>   +CFLAGS_FOR_BUILD += -m64 -fPIC
>   +endif
>    CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@
> @@ -83,7 +83,7 @@
>    
>    CFLAGS = @CFLAGS@
>  -+ifeq ($(shell arch), ppc64)
> -++ifeq (${TARGET}, ppc64)
> +++ifeq (${CRASH_TARGET}, PPC64)
>   +CFLAGS += -m64 -fPIC
>   +endif
>    LDFLAGS = @LDFLAGS@
> 
> Presuming it works OK for both ppc64 and ppc32, consider it queued
> for crash-6.0.3.
> 
> Thanks!
>   Dave
> 




More information about the Crash-utility mailing list