Any results on or s390/s390x? And is this even
supposed to support ppc64?
Hi Luc,
Here is a patch which fixes compile errors on ppc64 arch.
Thanks
-Sachin
* Fix compile error on ppc64.
Signed-off-by: Sachin Sant <[EMAIL PROTECTED]>
---
diff -Naurp crash-4.0-4.7/extensions/libsial/Makefile crash-4.0-4.7-new/extensions/libsial/Makefile
--- crash-4.0-4.7/extensions/libsial/Makefile 2007-09-25 20:31:56.000000000 +0530
+++ crash-4.0-4.7-new/extensions/libsial/Makefile 2007-09-27 12:55:06.000000000 +0530
@@ -15,7 +15,11 @@ LDIRT = lex.sial.c lex.sialpp.c sial.
LIBDIR = /usr/lib
TARGETS = libsial.a
-CFLAGS += -O3 -fPIC
+ifeq ($(TARGET), PPC64)
+ CFLAGS += -O3 -fPIC -m64
+else
+ CFLAGS += -O3 -fPIC
+endif
CFILES = sial_util.c sial_node.c sial_var.c sial_func.c sial_str.c \
sial_op.c sial_num.c sial_stat.c sial_builtin.c sial_type.c \
diff -Naurp crash-4.0-4.7/extensions/libsial/sial_api.h crash-4.0-4.7-new/extensions/libsial/sial_api.h
--- crash-4.0-4.7/extensions/libsial/sial_api.h 2007-09-27 12:56:02.000000000 +0530
+++ crash-4.0-4.7-new/extensions/libsial/sial_api.h 2007-09-27 12:54:13.000000000 +0530
@@ -15,6 +15,7 @@
#define ABI_INTEL_IA 3
#define ABI_S390 4
#define ABI_S390X 5
+#define ABI_PPC64 6
/* types of variables */
#define V_BASE 1
diff -Naurp crash-4.0-4.7/extensions/sial.c crash-4.0-4.7-new/extensions/sial.c
--- crash-4.0-4.7/extensions/sial.c 2007-09-27 10:55:40.000000000 +0530
+++ crash-4.0-4.7-new/extensions/sial.c 2007-09-27 10:53:58.000000000 +0530
@@ -494,6 +494,11 @@ struct linuxdefs_s {
{"_LONGLONG", "1"},
{"__LONG_MAX__", "9223372036854775807L"},
#endif
+#ifdef ppc64
+ {"ppc64", "1"},
+ {"__ppc64", "1"},
+ {"__ppc64__", "1"},
+#endif
};
#if 0
@@ -820,12 +825,16 @@ _init() /* Register the command set. */
#ifdef __s390x__
#define SIAL_ABI ABI_S390X
#else
+#ifdef PPC64
+#define SIAL_ABI ABI_PPC64
+#else
#error sial: Unkown ABI
#endif
#endif
#endif
#endif
#endif
+#endif
sial_apiset(&icops, SIAL_ABI, sizeof(long), 0);
sial_version();
diff -Naurp crash-4.0-4.7/extensions/sial.mk crash-4.0-4.7-new/extensions/sial.mk
--- crash-4.0-4.7/extensions/sial.mk 2007-09-25 20:31:56.000000000 +0530
+++ crash-4.0-4.7-new/extensions/sial.mk 2007-09-27 10:50:44.000000000 +0530
@@ -1,11 +1,17 @@
#
+ifeq ($(TARGET), PPC64)
+ TARGET_FLAGS = -D$(TARGET) -m64
+else
+ TARGET_FLAGS = -D$(TARGET)
+endif
+
all: sial.so
lib-sial:
cd libsial && make
sial.so: ../defs.h sial.c lib-sial
- gcc -g -I.. -Ilibsial -I../gdb-6.1/bfd -I../gdb-6.1/include -I../gdb-6.1/gdb -I../gdb-6.1/gdb/config -nostartfiles -shared -rdynamic -o sial.so sial.c -fPIC -D$(TARGET) -Llibsial -lsial
+ gcc -g -I.. -Ilibsial -I../gdb-6.1/bfd -I../gdb-6.1/include -I../gdb-6.1/gdb -I../gdb-6.1/gdb/config -nostartfiles -shared -rdynamic -o sial.so sial.c -fPIC $(TARGET_FLAGS) -Llibsial -lsial
clean:
cd libsial && make clean
--
Crash-utility mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/crash-utility