diff options
-rw-r--r-- | meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch | 32 | ||||
-rw-r--r-- | meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch | 26 | ||||
-rw-r--r-- | meta-oe/recipes-kernel/crash/crash/remove-unrecognized-gcc-option-m32-for-mips.patch | 33 | ||||
-rw-r--r-- | meta-oe/recipes-kernel/crash/crash/sim-common-sim-arange-fix-extern-inline-handling.patch | 79 | ||||
-rw-r--r-- | meta-oe/recipes-kernel/crash/crash/sim-ppc-drop-LIBS-from-psim-dependency.patch | 37 | ||||
-rw-r--r-- | meta-oe/recipes-kernel/crash/crash_7.1.3.bb (renamed from meta-oe/recipes-kernel/crash/crash_7.1.2.bb) | 43 |
6 files changed, 238 insertions, 12 deletions
diff --git a/meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch b/meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch new file mode 100644 index 0000000000..e254fe8772 --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Put gdb source tarball in SRC_URI and don't fetch and extract it during | ||
2 | do_compile. | ||
3 | |||
4 | Upstream-Status: Inappropriate [embedded specific] | ||
5 | |||
6 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
7 | --- | ||
8 | diff --git a/Makefile b/Makefile | ||
9 | index bb0a34e..5eb7604 100644 | ||
10 | --- a/Makefile | ||
11 | +++ b/Makefile | ||
12 | @@ -226,7 +226,7 @@ all: make_configure | ||
13 | # @make --no-print-directory extensions | ||
14 | |||
15 | gdb_merge: force | ||
16 | - @if [ ! -f ${GDB}/README ]; then \ | ||
17 | + @if [ ! -f ${GDB}/${GDB}.patch ]; then \ | ||
18 | make --no-print-directory gdb_unzip; fi | ||
19 | @echo "${LDFLAGS} -lz -ldl -rdynamic" > ${GDB}/gdb/mergelibs | ||
20 | @echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj | ||
21 | @@ -253,11 +253,6 @@ gdb_unzip: | ||
22 | @rm -f gdb.files | ||
23 | @for FILE in ${GDB_FILES} dummy; do\ | ||
24 | echo $$FILE >> gdb.files; done | ||
25 | - @if [ ! -f ${GDB}.tar.gz ] && [ ! -f /usr/bin/wget ]; then \ | ||
26 | - echo /usr/bin/wget is required to download ${GDB}.tar.gz; echo; exit 1; fi | ||
27 | - @if [ ! -f ${GDB}.tar.gz ] && [ -f /usr/bin/wget ]; then \ | ||
28 | - wget http://ftp.gnu.org/gnu/gdb/${GDB}.tar.gz; fi | ||
29 | - @tar --exclude-from gdb.files -xvzmf ${GDB}.tar.gz | ||
30 | @make --no-print-directory gdb_patch | ||
31 | |||
32 | gdb_patch: | ||
diff --git a/meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch b/meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch new file mode 100644 index 0000000000..3f4d1bc30e --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | This enables parallel building (multiple jobs in gdb) by reading the | ||
2 | value from GDB_MAKE_JOBS. | ||
3 | |||
4 | Signed-off-by: Amy Fong <amy.fong@windriver.com> | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Don't write ${TARGET} to crash.target which causes rebuild fails. | ||
9 | |||
10 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
11 | -- | ||
12 | diff --git a/Makefile b/Makefile | ||
13 | index 27a1d47..bcf2d2f 100644 | ||
14 | --- a/Makefile | ||
15 | +++ b/Makefile | ||
16 | @@ -232,8 +232,8 @@ gdb_merge: force | ||
17 | @if [ ! -f ${GDB}/config.status ]; then \ | ||
18 | (cd ${GDB}; ./configure --host=${GDB_TARGET} --build=${GDB_HOST} --with-separate-debug-dir=/usr/lib/debug \ | ||
19 | --with-bugurl="" --with-expat=no --with-python=no; \ | ||
20 | - make --no-print-directory CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \ | ||
21 | - else make --no-print-directory rebuild; fi | ||
22 | + make --no-print-directory CRASH_TARGET=${TARGET} ${GDB_MAKE_JOBS}; ) \ | ||
23 | + else make --no-print-directory ${GDB_MAKE_JOBS} rebuild; fi | ||
24 | @if [ ! -f ${PROGRAM} ]; then \ | ||
25 | echo; echo "${PROGRAM} build failed"; \ | ||
26 | echo; exit 1; fi | ||
diff --git a/meta-oe/recipes-kernel/crash/crash/remove-unrecognized-gcc-option-m32-for-mips.patch b/meta-oe/recipes-kernel/crash/crash/remove-unrecognized-gcc-option-m32-for-mips.patch new file mode 100644 index 0000000000..c24db1042c --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash/remove-unrecognized-gcc-option-m32-for-mips.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | It fails to build crash for mips with error: | ||
4 | |||
5 | | mips-wrs-linux-gcc: error: unrecognized command line option '-m32' | ||
6 | | Makefile:291: recipe for target 'make_build_data' failed | ||
7 | |||
8 | So remove the unrecognized option '-m32' for mips. | ||
9 | |||
10 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
11 | --- | ||
12 | diff --git a/configure.c b/configure.c | ||
13 | index cf1973b..71e97b3 100644 | ||
14 | --- a/configure.c | ||
15 | +++ b/configure.c | ||
16 | @@ -148,7 +148,7 @@ void add_extra_lib(char *); | ||
17 | #define TARGET_CFLAGS_PPC64_ON_X86_64 "TARGET_CFLAGS=" | ||
18 | #define TARGET_CFLAGS_MIPS "TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64" | ||
19 | #define TARGET_CFLAGS_MIPS_ON_X86 "TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64" | ||
20 | -#define TARGET_CFLAGS_MIPS_ON_X86_64 "TARGET_CFLAGS=-m32 -D_FILE_OFFSET_BITS=64" | ||
21 | +#define TARGET_CFLAGS_MIPS_ON_X86_64 "TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64" | ||
22 | |||
23 | #define GDB_TARGET_DEFAULT "GDB_CONF_FLAGS=" | ||
24 | #define GDB_TARGET_ARM_ON_X86 "GDB_CONF_FLAGS=--target=arm-elf-linux" | ||
25 | @@ -158,7 +158,7 @@ void add_extra_lib(char *); | ||
26 | #define GDB_TARGET_ARM64_ON_X86_64 "GDB_CONF_FLAGS=--target=aarch64-elf-linux" /* TBD */ | ||
27 | #define GDB_TARGET_PPC64_ON_X86_64 "GDB_CONF_FLAGS=--target=powerpc64le-unknown-linux-gnu" | ||
28 | #define GDB_TARGET_MIPS_ON_X86 "GDB_CONF_FLAGS=--target=mipsel-elf-linux" | ||
29 | -#define GDB_TARGET_MIPS_ON_X86_64 "GDB_CONF_FLAGS=--target=mipsel-elf-linux CFLAGS=-m32" | ||
30 | +#define GDB_TARGET_MIPS_ON_X86_64 "GDB_CONF_FLAGS=--target=mipsel-elf-linux" | ||
31 | |||
32 | /* | ||
33 | * The original plan was to allow the use of a particular version | ||
diff --git a/meta-oe/recipes-kernel/crash/crash/sim-common-sim-arange-fix-extern-inline-handling.patch b/meta-oe/recipes-kernel/crash/crash/sim-common-sim-arange-fix-extern-inline-handling.patch new file mode 100644 index 0000000000..0185b57045 --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash/sim-common-sim-arange-fix-extern-inline-handling.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=92fc615 | ||
4 | |||
5 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
6 | -- | ||
7 | From 92fc6153a6fdf2a027d9780f5945712aafad4a9e Mon Sep 17 00:00:00 2001 | ||
8 | From: Mike Frysinger <vapier@gentoo.org> | ||
9 | Date: Sun, 29 Mar 2015 15:59:01 -0400 | ||
10 | Subject: [PATCH] sim: common: sim-arange: fix extern inline handling | ||
11 | |||
12 | With newer versions of gcc (5.x), the extern inline we're using with the | ||
13 | sim-arange module no longer works. Since this code really wants the gnu | ||
14 | inline semantics, use that attribute explicitly. | ||
15 | |||
16 | Reported-by: DJ Delorie <dj@redhat.com> | ||
17 | Reported-by: Joel Sherrill <joel.sherrill@oarcorp.com> | ||
18 | --- | ||
19 | gdb-7.6/sim/common/sim-arange.h | 20 ++++++++++++-------- | ||
20 | gdb-7.6/sim/common/sim-inline.h | 4 +++- | ||
21 | 2 files changed, 15 insertions(+), 9 deletions(-) | ||
22 | |||
23 | diff --git a/gdb-7.6/sim/common/sim-arange.h b/gdb-7.6/sim/common/sim-arange.h | ||
24 | index 73117f3..de842c9 100644 | ||
25 | --- a/gdb-7.6/sim/common/sim-arange.h | ||
26 | +++ b/gdb-7.6/sim/common/sim-arange.h | ||
27 | @@ -60,22 +60,26 @@ extern void sim_addr_range_delete (ADDR_RANGE * /*ar*/, | ||
28 | address_word /*start*/, | ||
29 | address_word /*end*/); | ||
30 | |||
31 | +/* TODO: This should get moved into sim-inline.h. */ | ||
32 | +#ifdef HAVE_INLINE | ||
33 | +#ifdef SIM_ARANGE_C | ||
34 | +#define SIM_ARANGE_INLINE INLINE | ||
35 | +#else | ||
36 | +#define SIM_ARANGE_INLINE EXTERN_INLINE | ||
37 | +#endif | ||
38 | +#else | ||
39 | +#define SIM_ARANGE_INLINE EXTERN | ||
40 | +#endif | ||
41 | + | ||
42 | /* Return non-zero if ADDR is in range AR, traversing the entire tree. | ||
43 | If no range is specified, that is defined to mean "everything". */ | ||
44 | -extern INLINE int | ||
45 | +SIM_ARANGE_INLINE int | ||
46 | sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/); | ||
47 | #define ADDR_RANGE_HIT_P(ar, addr) \ | ||
48 | ((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr))) | ||
49 | |||
50 | #ifdef HAVE_INLINE | ||
51 | -#ifdef SIM_ARANGE_C | ||
52 | -#define SIM_ARANGE_INLINE INLINE | ||
53 | -#else | ||
54 | -#define SIM_ARANGE_INLINE EXTERN_INLINE | ||
55 | -#endif | ||
56 | #include "sim-arange.c" | ||
57 | -#else | ||
58 | -#define SIM_ARANGE_INLINE | ||
59 | #endif | ||
60 | #define SIM_ARANGE_C_INCLUDED | ||
61 | |||
62 | diff --git a/gdb-7.6/sim/common/sim-inline.h b/gdb-7.6/sim/common/sim-inline.h | ||
63 | index af75562..8a9c286 100644 | ||
64 | --- a/gdb-7.6/sim/common/sim-inline.h | ||
65 | +++ b/gdb-7.6/sim/common/sim-inline.h | ||
66 | @@ -303,7 +303,9 @@ | ||
67 | /* ??? Temporary, pending decision to always use extern inline and do a vast | ||
68 | cleanup of inline support. */ | ||
69 | #ifndef INLINE2 | ||
70 | -#if defined (__GNUC__) | ||
71 | +#if defined (__GNUC_GNU_INLINE__) || defined (__GNUC_STDC_INLINE__) | ||
72 | +#define INLINE2 __inline__ __attribute__ ((__gnu_inline__)) | ||
73 | +#elif defined (__GNUC__) | ||
74 | #define INLINE2 __inline__ | ||
75 | #else | ||
76 | #define INLINE2 /*inline*/ | ||
77 | -- | ||
78 | 2.6.1 | ||
79 | |||
diff --git a/meta-oe/recipes-kernel/crash/crash/sim-ppc-drop-LIBS-from-psim-dependency.patch b/meta-oe/recipes-kernel/crash/crash/sim-ppc-drop-LIBS-from-psim-dependency.patch new file mode 100644 index 0000000000..77a287f146 --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash/sim-ppc-drop-LIBS-from-psim-dependency.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | https://sourceware.org/git/?p=binutils-gdb.git;h=0d8a6ab | ||
4 | |||
5 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
6 | --- | ||
7 | From 0d8a6ab7d39d28fb1557e2a62e9e4b336341ab34 Mon Sep 17 00:00:00 2001 | ||
8 | From: Aaro Koskinen <aaro.koskinen@iki.fi> | ||
9 | Date: Mon, 17 Feb 2014 17:12:59 -0500 | ||
10 | Subject: [PATCH] sim: ppc: drop $(LIBS) from psim dependency | ||
11 | |||
12 | When cross-compiling GDB for PPC, there's a prerequisite "-lz" for psim | ||
13 | that results in a build failure. With such prerequisite, GNU Make will | ||
14 | try to search the library from build machine's /usr/lib which is wrong. | ||
15 | On 64-bit Linux build machines the compilation will fail because of this. | ||
16 | |||
17 | URL: https://sourceware.org/bugzilla/show_bug.cgi?id=12202 | ||
18 | --- | ||
19 | sim/ppc/Makefile.in | 2 +- | ||
20 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
21 | |||
22 | diff --git a/gdb-7.6/sim/ppc/Makefile.in b/gdb-7.6/sim/ppc/Makefile.in | ||
23 | index b811f6f..740bdb0 100644 | ||
24 | --- a/gdb-7.6/sim/ppc/Makefile.in | ||
25 | +++ b/gdb-7.6/sim/ppc/Makefile.in | ||
26 | @@ -552,7 +552,7 @@ PACKAGE_SRC = @sim_pk_src@ | ||
27 | PACKAGE_OBJ = @sim_pk_obj@ | ||
28 | |||
29 | |||
30 | -psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS) $(LIBINTL_DEP) | ||
31 | +psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBINTL_DEP) | ||
32 | $(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS) | ||
33 | |||
34 | run: psim | ||
35 | -- | ||
36 | 1.9.4 | ||
37 | |||
diff --git a/meta-oe/recipes-kernel/crash/crash_7.1.2.bb b/meta-oe/recipes-kernel/crash/crash_7.1.3.bb index f1e02e9e4b..f6934f7467 100644 --- a/meta-oe/recipes-kernel/crash/crash_7.1.2.bb +++ b/meta-oe/recipes-kernel/crash/crash_7.1.3.bb | |||
@@ -7,42 +7,60 @@ offered by Mission Critical Linux, or the LKCD kernel patch." | |||
7 | HOMEPAGE = "http://people.redhat.com/anderson" | 7 | HOMEPAGE = "http://people.redhat.com/anderson" |
8 | SECTION = "devel" | 8 | SECTION = "devel" |
9 | 9 | ||
10 | inherit gettext | 10 | LICENSE = "GPLv3" |
11 | LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504" | ||
11 | 12 | ||
12 | DEPENDS = "zlib readline" | 13 | DEPENDS = "zlib readline" |
13 | 14 | ||
14 | SRC_URI = "https://github.com/crash-utility/${BPN}/archive/${PV}.tar.gz \ | 15 | SRC_URI = "https://github.com/crash-utility/${BPN}/archive/${PV}.tar.gz;downloadfilename=${BP}.tar.gz \ |
16 | http://ftp.gnu.org/gnu/gdb/gdb-7.6.tar.gz;name=gdb;subdir=${BP} \ | ||
15 | file://7001force_define_architecture.patch \ | 17 | file://7001force_define_architecture.patch \ |
16 | file://7003cross_ranlib.patch \ | 18 | file://7003cross_ranlib.patch \ |
17 | file://0001-cross_add_configure_option.patch \ | 19 | file://0001-cross_add_configure_option.patch \ |
20 | file://sim-ppc-drop-LIBS-from-psim-dependency.patch \ | ||
21 | file://sim-common-sim-arange-fix-extern-inline-handling.patch \ | ||
22 | file://donnot-extract-gdb-during-do-compile.patch \ | ||
23 | file://gdb_build_jobs_and_not_write_crash_target.patch \ | ||
24 | file://remove-unrecognized-gcc-option-m32-for-mips.patch \ | ||
18 | " | 25 | " |
19 | 26 | ||
20 | SRC_URI[md5sum] = "04db2dde0d5e1dacbe3b820df3957742" | 27 | SRC_URI[md5sum] = "155889a233c5230ef1d387858091d294" |
21 | SRC_URI[sha256sum] = "630664a00cbf5d7357f8dcdfc45e73ea62a2a517bd349ab73f0d704d10b01c55" | 28 | SRC_URI[sha256sum] = "ae98529d42b843f07d795b86b8f8529f64cc607ee3c58affc5a8aa8a506e183d" |
22 | 29 | ||
23 | LICENSE = "GPLv3" | 30 | SRC_URI[gdb.md5sum] = "a9836707337e5f7bf76a009a8904f470" |
24 | LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504" | 31 | SRC_URI[gdb.sha256sum] = "8070389a5dcc104eb0be483d582729f98ed4d761ad19cedd3f17b5d2502faa36" |
32 | |||
33 | inherit gettext | ||
34 | |||
35 | # crash 7.1.3 and before don't support mips64 | ||
36 | COMPATIBLE_HOST = "^(?!mips64).*" | ||
25 | 37 | ||
26 | EXTRA_OEMAKE = 'RPMPKG="${PV}" \ | 38 | EXTRA_OEMAKE = 'RPMPKG="${PV}" \ |
27 | GDB_TARGET="${TARGET_SYS}" \ | 39 | GDB_TARGET="${TARGET_SYS}" \ |
28 | GDB_HOST="${BUILD_SYS}" \ | 40 | GDB_HOST="${BUILD_SYS}" \ |
41 | GDB_MAKE_JOBS="${PARALLEL_MAKE}" \ | ||
29 | ' | 42 | ' |
43 | |||
30 | do_configure() { | 44 | do_configure() { |
31 | : | 45 | : |
32 | } | 46 | } |
33 | 47 | ||
34 | do_compile_prepend() { | 48 | do_compile_prepend() { |
35 | case ${TARGET_ARCH} in | 49 | case ${TARGET_ARCH} in |
36 | arm*) ARCH=ARM ;; | 50 | aarch64*) ARCH=ARM64 ;; |
37 | i*86*) ARCH=X86 ;; | 51 | arm*) ARCH=ARM ;; |
38 | powerpc*) ARCH=PPC ;; | 52 | i*86*) ARCH=X86 ;; |
39 | x86_64*) ARCH=X86_64 ;; | 53 | x86_64*) ARCH=X86_64 ;; |
40 | esac | 54 | powerpc64*) ARCH=PPC64 ;; |
55 | powerpc*) ARCH=PPC ;; | ||
56 | mips*) ARCH=MIPS ;; | ||
57 | esac | ||
41 | 58 | ||
42 | sed -i s/FORCE_DEFINE_ARCH/"${ARCH}"/g ${S}/configure.c | 59 | sed -i s/FORCE_DEFINE_ARCH/"${ARCH}"/g ${S}/configure.c |
43 | sed -i -e 's/#define TARGET_CFLAGS_ARM_ON_X86_64.*/#define TARGET_CFLAGS_ARM_ON_X86_64\t\"TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64\"/g' ${S}/configure.c | 60 | sed -i -e 's/#define TARGET_CFLAGS_ARM_ON_X86_64.*/#define TARGET_CFLAGS_ARM_ON_X86_64\t\"TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64\"/g' ${S}/configure.c |
44 | sed -i 's/>/>/g' ${S}/Makefile | 61 | sed -i 's/>/>/g' ${S}/Makefile |
45 | } | 62 | } |
63 | |||
46 | do_compile() { | 64 | do_compile() { |
47 | oe_runmake ${EXTRA_OEMAKE} | 65 | oe_runmake ${EXTRA_OEMAKE} |
48 | } | 66 | } |
@@ -56,6 +74,7 @@ do_install () { | |||
56 | install -m 0644 ${S}/crash.8 ${D}/${mandir}/man8/ | 74 | install -m 0644 ${S}/crash.8 ${D}/${mandir}/man8/ |
57 | install -m 0644 ${S}/defs.h ${D}${includedir}/crash | 75 | install -m 0644 ${S}/defs.h ${D}${includedir}/crash |
58 | } | 76 | } |
77 | |||
59 | RDEPENDS_${PN} += "liblzma" | 78 | RDEPENDS_${PN} += "liblzma" |
60 | 79 | ||
61 | # Causes gcc to get stuck and eat all available memory in qemuarm builds | 80 | # Causes gcc to get stuck and eat all available memory in qemuarm builds |