[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Crash-utility] [ANNOUNCE] crash gcore command version 1.3.0-rc2 is released




----- Original Message -----
> This is the release of crash gcore command, version 1.3.0-rc2.
> 
> The version 1.3.0 is going to newly add ARM64 support, including
> compat mode, and PPC64 support, and the purpose of this serise of rc
> version releases is for verification by other architecture
> maintainers. Please give me a verfication result as a reply to this
> mail.

Hello Daisuke,

We have successfully tested the support for the ARM64 and PPC64 architectures.
Thanks very much for accepting them.

However, I have attached one small patch to the gcore.mk file that is required
for ARM64 in order to build the module in the "extensions" subdirectory
of the crash source tree.

The standalone package builds OK on an ARM64 host:

# make -f gcore.mk
make[1]: Entering directory `/root/crash-gcore-command-1.3.0-rc2'
gcc   -D_SYS_UCONTEXT_H=1 -Wall -I/usr/include/crash -I./libgcore -fPIC -DARM64 -DVERSION='"1.3.0-rc2"' -DRELEASE_DATE='"24 Oct 2014"' -DPERIOD='"2010, 2011, 2012, 2013, 2014"' -c -o libgcore/gcore_coredump.o libgcore/gcore_coredump.c
gcc   -D_SYS_UCONTEXT_H=1 -Wall -I/usr/include/crash -I./libgcore -fPIC -DARM64 -DVERSION='"1.3.0-rc2"' -DRELEASE_DATE='"24 Oct 2014"' -DPERIOD='"2010, 2011, 2012, 2013, 2014"' -c -o libgcore/gcore_coredump_table.o libgcore/gcore_coredump_table.c
gcc   -D_SYS_UCONTEXT_H=1 -Wall -I/usr/include/crash -I./libgcore -fPIC -DARM64 -DVERSION='"1.3.0-rc2"' -DRELEASE_DATE='"24 Oct 2014"' -DPERIOD='"2010, 2011, 2012, 2013, 2014"' -c -o libgcore/gcore_dumpfilter.o libgcore/gcore_dumpfilter.c
gcc   -D_SYS_UCONTEXT_H=1 -Wall -I/usr/include/crash -I./libgcore -fPIC -DARM64 -DVERSION='"1.3.0-rc2"' -DRELEASE_DATE='"24 Oct 2014"' -DPERIOD='"2010, 2011, 2012, 2013, 2014"' -c -o libgcore/gcore_elf_struct.o libgcore/gcore_elf_struct.c
gcc   -D_SYS_UCONTEXT_H=1 -Wall -I/usr/include/crash -I./libgcore -fPIC -DARM64 -DVERSION='"1.3.0-rc2"' -DRELEASE_DATE='"24 Oct 2014"' -DPERIOD='"2010, 2011, 2012, 2013, 2014"' -c -o libgcore/gcore_global_data.o libgcore/gcore_global_data.c
gcc   -D_SYS_UCONTEXT_H=1 -Wall -I/usr/include/crash -I./libgcore -fPIC -DARM64 -DVERSION='"1.3.0-rc2"' -DRELEASE_DATE='"24 Oct 2014"' -DPERIOD='"2010, 2011, 2012, 2013, 2014"' -c -o libgcore/gcore_regset.o libgcore/gcore_regset.c
gcc   -D_SYS_UCONTEXT_H=1 -Wall -I/usr/include/crash -I./libgcore -fPIC -DARM64 -DVERSION='"1.3.0-rc2"' -DRELEASE_DATE='"24 Oct 2014"' -DPERIOD='"2010, 2011, 2012, 2013, 2014"' -c -o libgcore/gcore_verbose.o libgcore/gcore_verbose.c
gcc   -D_SYS_UCONTEXT_H=1 -Wall -I/usr/include/crash -I./libgcore -fPIC -DARM64 -DVERSION='"1.3.0-rc2"' -DRELEASE_DATE='"24 Oct 2014"' -DPERIOD='"2010, 2011, 2012, 2013, 2014"' -c -o libgcore/gcore_arm64.o libgcore/gcore_arm64.c
Make[1]: Leaving directory `/root/crash-gcore-command-1.3.0-rc2'
# 

Note that the compile lines above contain -D_SYS_UCONTEXT_H=1 because
of this "(shell arch)" section of the gcore.mk file:

  ifeq ($(shell arch), aarch64)
    TARGET=ARM64
    TARGET_CFLAGS=-D_SYS_UCONTEXT_H=1
    ARCH=SUPPORTED
  endif
  
However, when building the package from within a crash source tree in its 
"extensions" subdirectory, the package fails to compile because the 
-D_SYS_UCONTEXT_H=1 gets dropped.  That is because the top-level Makefile
issues the make command with TARGET_CFLAGS defined on the command line, 
which overrides the "(shell arch)" TARGET_CFLAGS setting in gcore.mk:
  
  (cd extensions; make -i TARGET=ARM64 TARGET_CFLAGS="" GDB=gdb-7.6 GDB_FLAGS=-DGDB_7_6)

In order to build both standalone and from within the crash source tree,
I've modified the gcore.mk file to use a new "ARCH_CFLAGS" definition,
and added $(ARCH_CFLAGS) to both compile lines below it:

  ifeq ($(shell arch), aarch64)
    TARGET=ARM64
    ARCH_CFLAGS=-D_SYS_UCONTEXT_H=1
    ARCH=SUPPORTED
  endif

Note that if the ARM64 gcore.so is compiled from an x86_64 host that
was built with "make target=ARM64", the "(shell arch), aarch64" section
is not used (and not necessary).

Thanks,
  Dave
--- crash-gcore-command-1.3.0-rc2/gcore.mk.orig
+++ crash-gcore-command-1.3.0-rc2/gcore.mk
@@ -38,7 +38,7 @@ endif
 
 ifeq ($(shell arch), aarch64)
   TARGET=ARM64
-  TARGET_CFLAGS=-D_SYS_UCONTEXT_H=1
+  ARCH_CFLAGS=-D_SYS_UCONTEXT_H=1
   ARCH=SUPPORTED
 endif
 
@@ -102,11 +102,11 @@ gcore.so: gcore.c $(INCDIR)/defs.h
 		echo "gcore: architecture not supported"; \
 	else \
 		make -f gcore.mk $(GCORE_OFILES) && \
-		gcc $(RPM_OPT_FLAGS) $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) -nostartfiles -shared -rdynamic $(GCORE_OFILES) -o $@ $< ; \
+		gcc $(RPM_OPT_FLAGS) $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) $(ARCH_CFLAGS) -nostartfiles -shared -rdynamic $(GCORE_OFILES) -o $@ $< ; \
 	fi;
 
 %.o: %.c $(INCDIR)/defs.h
-	gcc $(RPM_OPT_FLAGS) $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) -c -o $@ $<
+	gcc $(RPM_OPT_FLAGS) $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) $(ARCH_CFLAGS) -c -o $@ $<
 
 clean:
 	find ./libgcore -regex ".+\(o\|so\)" -exec rm -f {} \;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]