summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Martinsons <frederic.martinsons@gmail.com>2023-12-17 08:39:39 +0100
committerKhem Raj <raj.khem@gmail.com>2023-12-18 22:17:24 -0800
commit058f22ac2747693a32ea2a14edaa11471d67fd0a (patch)
tree937ff2bf9855621438fa7f6aa4733515a53b8e60
parentfa9122a2b8a2924ad3939db12082d74763c59034 (diff)
downloadmeta-openembedded-058f22ac2747693a32ea2a14edaa11471d67fd0a.tar.gz
crash: factorize recipe with inc file to prepare cross-canadian version
Suppress unused config-site.crash-7.0.9 Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-kernel/crash/crash.inc92
-rw-r--r--meta-oe/recipes-kernel/crash/crash/config-site.crash-7.0.91
-rw-r--r--meta-oe/recipes-kernel/crash/crash_8.0.2.bb89
3 files changed, 94 insertions, 88 deletions
diff --git a/meta-oe/recipes-kernel/crash/crash.inc b/meta-oe/recipes-kernel/crash/crash.inc
new file mode 100644
index 0000000000..8d700ed484
--- /dev/null
+++ b/meta-oe/recipes-kernel/crash/crash.inc
@@ -0,0 +1,92 @@
1SUMMARY = "Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles"
2DESCRIPTION = "The core analysis suite is a self-contained tool that can be used to\
3investigate either live systems, kernel core dumps created from the\
4netdump, diskdump and kdump packages from Red Hat Linux, the mcore kernel patch\
5offered by Mission Critical Linux, or the LKCD kernel patch."
6
7HOMEPAGE = "http://people.redhat.com/anderson"
8SECTION = "devel"
9
10LICENSE = "GPL-3.0-only"
11LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504"
12
13DEPENDS = "zlib readline coreutils-native ncurses-native"
14
15INC_PR = "r1"
16
17S = "${WORKDIR}/git"
18SRC_URI = "git://github.com/crash-utility/${BPN}.git;branch=master;protocol=https \
19 ${GNU_MIRROR}/gdb/gdb-10.2.tar.gz;name=gdb;subdir=git \
20 file://7001force_define_architecture.patch \
21 file://7003cross_ranlib.patch \
22 file://0001-cross_add_configure_option.patch \
23 file://donnot-extract-gdb-during-do-compile.patch \
24 file://gdb_build_jobs_and_not_write_crash_target.patch \
25 file://0001-make-src-string-const-in-strlcpy.patch \
26 "
27SRCREV = "f1cd581d1c4afa5b8ffdfaa6a3ea9f545fe4ec91"
28
29SRC_URI[gdb.sha256sum] = "b33ad58d687487a821ec8d878daab0f716be60d0936f2e3ac5cf08419ce70350"
30
31UPSTREAM_CHECK_URI = "https://github.com/crash-utility/crash/releases"
32
33inherit gettext
34
35TARGET_CC_ARCH:append = " ${SELECTED_OPTIMIZATION}"
36
37# crash 7.1.3 and before don't support mips64/riscv64
38COMPATIBLE_HOST:riscv64 = "null"
39COMPATIBLE_HOST:riscv32 = "null"
40COMPATIBLE_HOST:mipsarchn64 = "null"
41COMPATIBLE_HOST:mipsarchn32 = "null"
42
43
44EXTRA_OEMAKE = 'RPMPKG="${PV}" \
45 GDB_TARGET="${TARGET_SYS}" \
46 GDB_HOST="${BUILD_SYS}" \
47 GDB_MAKE_JOBS="${PARALLEL_MAKE}" \
48 LDFLAGS="${LDFLAGS}" \
49 '
50
51do_configure() {
52 :
53}
54
55do_compile:prepend() {
56 case ${TARGET_ARCH} in
57 aarch64*) ARCH=ARM64 ;;
58 arm*) ARCH=ARM ;;
59 i*86*) ARCH=X86 ;;
60 x86_64*) ARCH=X86_64 ;;
61 powerpc64*) ARCH=PPC64 ;;
62 powerpc*) ARCH=PPC ;;
63 mips*) ARCH=MIPS ;;
64 esac
65
66 sed -i s/FORCE_DEFINE_ARCH/"${ARCH}"/g ${S}/configure.c
67 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
68 sed -i -e 's/#define TARGET_CFLAGS_MIPS_ON_X86_64.*/#define TARGET_CFLAGS_MIPS_ON_X86_64\t\"TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64\"/g' ${S}/configure.c
69 sed -i 's/&gt;/>/g' ${S}/Makefile
70}
71
72do_compile() {
73 oe_runmake ${EXTRA_OEMAKE} RECIPE_SYSROOT=${RECIPE_SYSROOT}
74}
75
76do_install:prepend () {
77 install -d ${D}${bindir}
78 install -d ${D}/${mandir}/man8
79 install -d ${D}${includedir}/crash
80
81 install -m 0644 ${S}/crash.8 ${D}/${mandir}/man8/
82 install -m 0644 ${S}/defs.h ${D}${includedir}/crash
83}
84
85RDEPENDS:${PN} += "liblzma"
86
87# Causes gcc to get stuck and eat all available memory in qemuarm builds
88# jenkins 15161 100 12.5 10389596 10321284 ? R 11:40 28:17 /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/x86_64-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.2/cc1 -quiet -I . -I . -I ./common -I ./config -I ./../include/opcode -I ./../opcodes/.. -I ./../readline/.. -I ../bfd -I ./../bfd -I ./../include -I ../libdecnumber -I ./../libdecnumber -I ./gnulib/import -I build-gnulib/import -isysroot /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemuarm -MMD eval.d -MF .deps/eval.Tpo -MP -MT eval.o -D LOCALEDIR="/usr/local/share/locale" -D CRASH_MERGE -D HAVE_CONFIG_H -D TUI=1 eval.c -quiet -dumpbase eval.c -march=armv5te -mthumb -mthumb-interwork -mtls-dialect=gnu -auxbase-strip eval.o -g -O2 -Wall -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -feliminate-unused-debug-types -o -
89ARM_INSTRUCTION_SET = "arm"
90
91# http://errors.yoctoproject.org/Errors/Details/186964/
92COMPATIBLE_HOST:libc-musl = 'null'
diff --git a/meta-oe/recipes-kernel/crash/crash/config-site.crash-7.0.9 b/meta-oe/recipes-kernel/crash/crash/config-site.crash-7.0.9
deleted file mode 100644
index d6fc22fb34..0000000000
--- a/meta-oe/recipes-kernel/crash/crash/config-site.crash-7.0.9
+++ /dev/null
@@ -1 +0,0 @@
1bash_cv_have_mbstate_t=yes
diff --git a/meta-oe/recipes-kernel/crash/crash_8.0.2.bb b/meta-oe/recipes-kernel/crash/crash_8.0.2.bb
index f8a460b8ce..cc46ab9ea7 100644
--- a/meta-oe/recipes-kernel/crash/crash_8.0.2.bb
+++ b/meta-oe/recipes-kernel/crash/crash_8.0.2.bb
@@ -1,51 +1,8 @@
1SUMMARY = "Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles" 1require crash.inc
2DESCRIPTION = "The core analysis suite is a self-contained tool that can be used to\
3investigate either live systems, kernel core dumps created from the\
4netdump, diskdump and kdump packages from Red Hat Linux, the mcore kernel patch\
5offered by Mission Critical Linux, or the LKCD kernel patch."
6 2
7HOMEPAGE = "http://people.redhat.com/anderson" 3PR = "${INC_PR}.0"
8SECTION = "devel"
9
10LICENSE = "GPL-3.0-only"
11LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504"
12
13DEPENDS = "zlib readline coreutils-native ncurses-native"
14
15S = "${WORKDIR}/git"
16SRC_URI = "git://github.com/crash-utility/${BPN}.git;branch=master;protocol=https \
17 ${GNU_MIRROR}/gdb/gdb-10.2.tar.gz;name=gdb;subdir=git \
18 file://7001force_define_architecture.patch \
19 file://7003cross_ranlib.patch \
20 file://0001-cross_add_configure_option.patch \
21 file://donnot-extract-gdb-during-do-compile.patch \
22 file://gdb_build_jobs_and_not_write_crash_target.patch \
23 file://0001-make-src-string-const-in-strlcpy.patch \
24 "
25SRCREV = "f1cd581d1c4afa5b8ffdfaa6a3ea9f545fe4ec91"
26
27SRC_URI[gdb.sha256sum] = "b33ad58d687487a821ec8d878daab0f716be60d0936f2e3ac5cf08419ce70350"
28
29UPSTREAM_CHECK_URI = "https://github.com/crash-utility/crash/releases"
30
31inherit gettext
32 4
33BBCLASSEXTEND = "native cross" 5BBCLASSEXTEND = "native cross"
34TARGET_CC_ARCH:append = " ${SELECTED_OPTIMIZATION}"
35
36# crash 7.1.3 and before don't support mips64/riscv64
37COMPATIBLE_HOST:riscv64 = "null"
38COMPATIBLE_HOST:riscv32 = "null"
39COMPATIBLE_HOST:mipsarchn64 = "null"
40COMPATIBLE_HOST:mipsarchn32 = "null"
41
42
43EXTRA_OEMAKE = 'RPMPKG="${PV}" \
44 GDB_TARGET="${TARGET_SYS}" \
45 GDB_HOST="${BUILD_SYS}" \
46 GDB_MAKE_JOBS="${PARALLEL_MAKE}" \
47 LDFLAGS="${LDFLAGS}" \
48 '
49 6
50EXTRA_OEMAKE:class-cross = 'RPMPKG="${PV}" \ 7EXTRA_OEMAKE:class-cross = 'RPMPKG="${PV}" \
51 GDB_TARGET="${BUILD_SYS} --target=${TARGET_SYS}" \ 8 GDB_TARGET="${BUILD_SYS} --target=${TARGET_SYS}" \
@@ -56,40 +13,6 @@ EXTRA_OEMAKE:class-cross = 'RPMPKG="${PV}" \
56EXTRA_OEMAKE:append:class-native = " LDFLAGS='${BUILD_LDFLAGS}'" 13EXTRA_OEMAKE:append:class-native = " LDFLAGS='${BUILD_LDFLAGS}'"
57EXTRA_OEMAKE:append:class-cross = " LDFLAGS='${BUILD_LDFLAGS}'" 14EXTRA_OEMAKE:append:class-cross = " LDFLAGS='${BUILD_LDFLAGS}'"
58 15
59do_configure() {
60 :
61}
62
63do_compile:prepend() {
64 case ${TARGET_ARCH} in
65 aarch64*) ARCH=ARM64 ;;
66 arm*) ARCH=ARM ;;
67 i*86*) ARCH=X86 ;;
68 x86_64*) ARCH=X86_64 ;;
69 powerpc64*) ARCH=PPC64 ;;
70 powerpc*) ARCH=PPC ;;
71 mips*) ARCH=MIPS ;;
72 esac
73
74 sed -i s/FORCE_DEFINE_ARCH/"${ARCH}"/g ${S}/configure.c
75 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
76 sed -i -e 's/#define TARGET_CFLAGS_MIPS_ON_X86_64.*/#define TARGET_CFLAGS_MIPS_ON_X86_64\t\"TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64\"/g' ${S}/configure.c
77 sed -i 's/&gt;/>/g' ${S}/Makefile
78}
79
80do_compile() {
81 oe_runmake ${EXTRA_OEMAKE} RECIPE_SYSROOT=${RECIPE_SYSROOT}
82}
83
84do_install:prepend () {
85 install -d ${D}${bindir}
86 install -d ${D}/${mandir}/man8
87 install -d ${D}${includedir}/crash
88
89 install -m 0644 ${S}/crash.8 ${D}/${mandir}/man8/
90 install -m 0644 ${S}/defs.h ${D}${includedir}/crash
91}
92
93do_install:class-target () { 16do_install:class-target () {
94 oe_runmake DESTDIR=${D} install 17 oe_runmake DESTDIR=${D} install
95} 18}
@@ -102,13 +25,5 @@ do_install:class-cross () {
102 install -m 0755 ${S}/crash ${D}/${bindir} 25 install -m 0755 ${S}/crash ${D}/${bindir}
103} 26}
104 27
105RDEPENDS:${PN} += "liblzma"
106RDEPENDS:${PN}:class-native = "" 28RDEPENDS:${PN}:class-native = ""
107RDEPENDS:${PN}:class-cross = "" 29RDEPENDS:${PN}:class-cross = ""
108
109# Causes gcc to get stuck and eat all available memory in qemuarm builds
110# jenkins 15161 100 12.5 10389596 10321284 ? R 11:40 28:17 /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/x86_64-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.2/cc1 -quiet -I . -I . -I ./common -I ./config -I ./../include/opcode -I ./../opcodes/.. -I ./../readline/.. -I ../bfd -I ./../bfd -I ./../include -I ../libdecnumber -I ./../libdecnumber -I ./gnulib/import -I build-gnulib/import -isysroot /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemuarm -MMD eval.d -MF .deps/eval.Tpo -MP -MT eval.o -D LOCALEDIR="/usr/local/share/locale" -D CRASH_MERGE -D HAVE_CONFIG_H -D TUI=1 eval.c -quiet -dumpbase eval.c -march=armv5te -mthumb -mthumb-interwork -mtls-dialect=gnu -auxbase-strip eval.o -g -O2 -Wall -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -feliminate-unused-debug-types -o -
111ARM_INSTRUCTION_SET = "arm"
112
113# http://errors.yoctoproject.org/Errors/Details/186964/
114COMPATIBLE_HOST:libc-musl = 'null'