Skip to contentSkip to conversation

crash: 7.1.2 -> 7.1.3

PATCH New [email protected] 1 participant 1 message Dec 21, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crash: 7.1.2 -> 7.1.3

From: Kai Kang <[email protected]>

Upgrade crash from 7.1.2 to 7.1.3.

Add gdb source tarball and don't fetch and extract it during do_compile. And do some format tweaks.

Exclude mips64 from COMPATIBLE_HOST which is not supported. And update ARCH setting for arm64, ppc64 and mips32.

Add patch to enable parallel make for gdb. And don't write crash.target which causes rebuild fails.

Backport patches to fix compile failures.

---
 .../donnot-extract-gdb-during-do-compile.patch     | 32 +++++++++
 ...gdb_build_jobs_and_not_write_crash_target.patch | 26 +++++++
 ...move-unrecognized-gcc-option-m32-for-mips.patch | 33 +++++++++
 ...mon-sim-arange-fix-extern-inline-handling.patch | 79 ++++++++++++++++++++++
 .../sim-ppc-drop-LIBS-from-psim-dependency.patch   | 37 ++++++++++
 .../crash/{crash_7.1.2.bb => crash_7.1.3.bb}       | 43 ++++++++----
 6 files changed, 238 insertions(+), 12 deletions(-)
 create mode 100644 meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch
 create mode 100644 meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch
 create mode 100644 meta-oe/recipes-kernel/crash/crash/remove-unrecognized-gcc-option-m32-for-mips.patch
 create mode 100644 meta-oe/recipes-kernel/crash/crash/sim-common-sim-arange-fix-extern-inline-handling.patch
 create mode 100644 meta-oe/recipes-kernel/crash/crash/sim-ppc-drop-LIBS-from-psim-dependency.patch
 rename meta-oe/recipes-kernel/crash/{crash_7.1.2.bb => crash_7.1.3.bb} (70%)
meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch new file +32 -0
new file mode 100644
index 0000000..e254fe8
@@ -0,0 +1,32 @@
+Put gdb source tarball in SRC_URI and don't fetch and extract it during
+do_compile.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Kai Kang <[email protected]>
+---
+diff --git a/Makefile b/Makefile
+index bb0a34e..5eb7604 100644
+--- a/Makefile
++++ b/Makefile
+@@ -226,7 +226,7 @@ all: make_configure
+ #	@make --no-print-directory extensions
+ 
+ gdb_merge: force
+-	@if [ ! -f ${GDB}/README ]; then \
++	@if [ ! -f ${GDB}/${GDB}.patch ]; then \
+ 	  make --no-print-directory gdb_unzip; fi
+ 	@echo "${LDFLAGS} -lz -ldl -rdynamic" > ${GDB}/gdb/mergelibs
+ 	@echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj
+@@ -253,11 +253,6 @@ gdb_unzip:
+ 	@rm -f gdb.files
+ 	@for FILE in ${GDB_FILES} dummy; do\
+ 	  echo $$FILE >> gdb.files; done
+-	@if [ ! -f ${GDB}.tar.gz ] && [ ! -f /usr/bin/wget ]; then \
+-	  echo /usr/bin/wget is required to download ${GDB}.tar.gz; echo; exit 1; fi
+-	@if [ ! -f ${GDB}.tar.gz ] && [ -f /usr/bin/wget ]; then \
+-	  wget http://ftp.gnu.org/gnu/gdb/${GDB}.tar.gz; fi
+-	@tar --exclude-from gdb.files -xvzmf ${GDB}.tar.gz
+ 	@make --no-print-directory gdb_patch
+ 
+ gdb_patch:
meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch new file +26 -0
new file mode 100644
index 0000000..3f4d1bc
@@ -0,0 +1,26 @@
+This enables parallel building (multiple jobs in gdb) by reading the
+value from GDB_MAKE_JOBS.
+
+Signed-off-by: Amy Fong <[email protected]>
+
+Upstream-Status: Pending
+
+Don't write ${TARGET} to crash.target which causes rebuild fails.
+
+Signed-off-by: Kai Kang <[email protected]>
+--
+diff --git a/Makefile b/Makefile
+index 27a1d47..bcf2d2f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -232,8 +232,8 @@ gdb_merge: force
+ 	@if [ ! -f ${GDB}/config.status ]; then \
+ 	  (cd ${GDB}; ./configure --host=${GDB_TARGET} --build=${GDB_HOST} --with-separate-debug-dir=/usr/lib/debug \
+ 	    --with-bugurl="" --with-expat=no --with-python=no; \
+-	  make --no-print-directory CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \
+-	else make --no-print-directory rebuild; fi
++	  make --no-print-directory CRASH_TARGET=${TARGET} ${GDB_MAKE_JOBS}; ) \
++	else make --no-print-directory ${GDB_MAKE_JOBS} rebuild; fi
+ 	@if [ ! -f ${PROGRAM} ]; then \
+ 	  echo; echo "${PROGRAM} build failed"; \
+ 	  echo; exit 1; fi
meta-oe/recipes-kernel/crash/crash/remove-unrecognized-gcc-option-m32-for-mips.patch new file +33 -0
new file mode 100644
index 0000000..c24db10
@@ -0,0 +1,33 @@
+Upstream-Status: Pending
+
+It fails to build crash for mips with error:
+
+| mips-wrs-linux-gcc: error: unrecognized command line option '-m32'
+| Makefile:291: recipe for target 'make_build_data' failed
+
+So remove the unrecognized option '-m32' for mips.
+
+Signed-off-by: Kai Kang <[email protected]>
+---
+diff --git a/configure.c b/configure.c
+index cf1973b..71e97b3 100644
+--- a/configure.c
++++ b/configure.c
+@@ -148,7 +148,7 @@ void add_extra_lib(char *);
+ #define TARGET_CFLAGS_PPC64_ON_X86_64  "TARGET_CFLAGS="
+ #define TARGET_CFLAGS_MIPS            "TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64"
+ #define TARGET_CFLAGS_MIPS_ON_X86     "TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64"
+-#define TARGET_CFLAGS_MIPS_ON_X86_64  "TARGET_CFLAGS=-m32 -D_FILE_OFFSET_BITS=64"
++#define TARGET_CFLAGS_MIPS_ON_X86_64  "TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64"
+ 
+ #define GDB_TARGET_DEFAULT        "GDB_CONF_FLAGS="
+ #define GDB_TARGET_ARM_ON_X86     "GDB_CONF_FLAGS=--target=arm-elf-linux"
+@@ -158,7 +158,7 @@ void add_extra_lib(char *);
+ #define GDB_TARGET_ARM64_ON_X86_64  "GDB_CONF_FLAGS=--target=aarch64-elf-linux"   /* TBD */
+ #define GDB_TARGET_PPC64_ON_X86_64  "GDB_CONF_FLAGS=--target=powerpc64le-unknown-linux-gnu"
+ #define GDB_TARGET_MIPS_ON_X86     "GDB_CONF_FLAGS=--target=mipsel-elf-linux"
+-#define GDB_TARGET_MIPS_ON_X86_64  "GDB_CONF_FLAGS=--target=mipsel-elf-linux CFLAGS=-m32"
++#define GDB_TARGET_MIPS_ON_X86_64  "GDB_CONF_FLAGS=--target=mipsel-elf-linux"
+      
+ /*
+  *  The original plan was to allow the use of a particular version
meta-oe/recipes-kernel/crash/crash/sim-common-sim-arange-fix-extern-inline-handling.patch new file +79 -0

79 lines not on this page · raw message

meta-oe/recipes-kernel/crash/crash/sim-ppc-drop-LIBS-from-psim-dependency.patch new file +37 -0
new file mode 100644
index 0000000..77a287f
@@ -0,0 +1,37 @@
+Upstream-Status: Backport
+
+https://sourceware.org/git/?p=binutils-gdb.git;h=0d8a6ab
+
+Signed-off-by: Kai Kang <[email protected]>
+---
+From 0d8a6ab7d39d28fb1557e2a62e9e4b336341ab34 Mon Sep 17 00:00:00 2001
+From: Aaro Koskinen <[email protected]>
+Date: Mon, 17 Feb 2014 17:12:59 -0500
+Subject: [PATCH] sim: ppc: drop $(LIBS) from psim dependency
+
+When cross-compiling GDB for PPC, there's a prerequisite "-lz" for psim
+that results in a build failure. With such prerequisite, GNU Make will
+try to search the library from build machine's /usr/lib which is wrong.
+On 64-bit Linux build machines the compilation will fail because of this.
+
+URL: https://sourceware.org/bugzilla/show_bug.cgi?id=12202
+---
+ sim/ppc/Makefile.in | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/gdb-7.6/sim/ppc/Makefile.in b/gdb-7.6/sim/ppc/Makefile.in
+index b811f6f..740bdb0 100644
+--- a/gdb-7.6/sim/ppc/Makefile.in
++++ b/gdb-7.6/sim/ppc/Makefile.in
+@@ -552,7 +552,7 @@ PACKAGE_SRC = @sim_pk_src@
+ PACKAGE_OBJ = @sim_pk_obj@
+ 
+ 
+-psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS) $(LIBINTL_DEP)
++psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBINTL_DEP)
+ 	$(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS)
+ 
+ run: psim
+-- 
+1.9.4
+
meta-oe/recipes-kernel/crash/crash_7.1.3.bb renamed from meta-oe/recipes-kernel/crash/crash_7.1.2.bb +31 -12

79 lines not on this page · raw message

Signature · 1 line
2.6.1