diff options
author | Frederic Martinsons <frederic.martinsons@gmail.com> | 2023-12-17 08:39:39 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-12-18 22:17:24 -0800 |
commit | 058f22ac2747693a32ea2a14edaa11471d67fd0a (patch) | |
tree | 937ff2bf9855621438fa7f6aa4733515a53b8e60 | |
parent | fa9122a2b8a2924ad3939db12082d74763c59034 (diff) | |
download | meta-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.inc | 92 | ||||
-rw-r--r-- | meta-oe/recipes-kernel/crash/crash/config-site.crash-7.0.9 | 1 | ||||
-rw-r--r-- | meta-oe/recipes-kernel/crash/crash_8.0.2.bb | 89 |
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 @@ | |||
1 | SUMMARY = "Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles" | ||
2 | DESCRIPTION = "The core analysis suite is a self-contained tool that can be used to\ | ||
3 | investigate either live systems, kernel core dumps created from the\ | ||
4 | netdump, diskdump and kdump packages from Red Hat Linux, the mcore kernel patch\ | ||
5 | offered by Mission Critical Linux, or the LKCD kernel patch." | ||
6 | |||
7 | HOMEPAGE = "http://people.redhat.com/anderson" | ||
8 | SECTION = "devel" | ||
9 | |||
10 | LICENSE = "GPL-3.0-only" | ||
11 | LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504" | ||
12 | |||
13 | DEPENDS = "zlib readline coreutils-native ncurses-native" | ||
14 | |||
15 | INC_PR = "r1" | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||
18 | SRC_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 | " | ||
27 | SRCREV = "f1cd581d1c4afa5b8ffdfaa6a3ea9f545fe4ec91" | ||
28 | |||
29 | SRC_URI[gdb.sha256sum] = "b33ad58d687487a821ec8d878daab0f716be60d0936f2e3ac5cf08419ce70350" | ||
30 | |||
31 | UPSTREAM_CHECK_URI = "https://github.com/crash-utility/crash/releases" | ||
32 | |||
33 | inherit gettext | ||
34 | |||
35 | TARGET_CC_ARCH:append = " ${SELECTED_OPTIMIZATION}" | ||
36 | |||
37 | # crash 7.1.3 and before don't support mips64/riscv64 | ||
38 | COMPATIBLE_HOST:riscv64 = "null" | ||
39 | COMPATIBLE_HOST:riscv32 = "null" | ||
40 | COMPATIBLE_HOST:mipsarchn64 = "null" | ||
41 | COMPATIBLE_HOST:mipsarchn32 = "null" | ||
42 | |||
43 | |||
44 | EXTRA_OEMAKE = 'RPMPKG="${PV}" \ | ||
45 | GDB_TARGET="${TARGET_SYS}" \ | ||
46 | GDB_HOST="${BUILD_SYS}" \ | ||
47 | GDB_MAKE_JOBS="${PARALLEL_MAKE}" \ | ||
48 | LDFLAGS="${LDFLAGS}" \ | ||
49 | ' | ||
50 | |||
51 | do_configure() { | ||
52 | : | ||
53 | } | ||
54 | |||
55 | do_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/>/>/g' ${S}/Makefile | ||
70 | } | ||
71 | |||
72 | do_compile() { | ||
73 | oe_runmake ${EXTRA_OEMAKE} RECIPE_SYSROOT=${RECIPE_SYSROOT} | ||
74 | } | ||
75 | |||
76 | do_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 | |||
85 | RDEPENDS:${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 - | ||
89 | ARM_INSTRUCTION_SET = "arm" | ||
90 | |||
91 | # http://errors.yoctoproject.org/Errors/Details/186964/ | ||
92 | COMPATIBLE_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 @@ | |||
1 | bash_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 @@ | |||
1 | SUMMARY = "Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles" | 1 | require crash.inc |
2 | DESCRIPTION = "The core analysis suite is a self-contained tool that can be used to\ | ||
3 | investigate either live systems, kernel core dumps created from the\ | ||
4 | netdump, diskdump and kdump packages from Red Hat Linux, the mcore kernel patch\ | ||
5 | offered by Mission Critical Linux, or the LKCD kernel patch." | ||
6 | 2 | ||
7 | HOMEPAGE = "http://people.redhat.com/anderson" | 3 | PR = "${INC_PR}.0" |
8 | SECTION = "devel" | ||
9 | |||
10 | LICENSE = "GPL-3.0-only" | ||
11 | LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504" | ||
12 | |||
13 | DEPENDS = "zlib readline coreutils-native ncurses-native" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | SRC_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 | " | ||
25 | SRCREV = "f1cd581d1c4afa5b8ffdfaa6a3ea9f545fe4ec91" | ||
26 | |||
27 | SRC_URI[gdb.sha256sum] = "b33ad58d687487a821ec8d878daab0f716be60d0936f2e3ac5cf08419ce70350" | ||
28 | |||
29 | UPSTREAM_CHECK_URI = "https://github.com/crash-utility/crash/releases" | ||
30 | |||
31 | inherit gettext | ||
32 | 4 | ||
33 | BBCLASSEXTEND = "native cross" | 5 | BBCLASSEXTEND = "native cross" |
34 | TARGET_CC_ARCH:append = " ${SELECTED_OPTIMIZATION}" | ||
35 | |||
36 | # crash 7.1.3 and before don't support mips64/riscv64 | ||
37 | COMPATIBLE_HOST:riscv64 = "null" | ||
38 | COMPATIBLE_HOST:riscv32 = "null" | ||
39 | COMPATIBLE_HOST:mipsarchn64 = "null" | ||
40 | COMPATIBLE_HOST:mipsarchn32 = "null" | ||
41 | |||
42 | |||
43 | EXTRA_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 | ||
50 | EXTRA_OEMAKE:class-cross = 'RPMPKG="${PV}" \ | 7 | EXTRA_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}" \ | |||
56 | EXTRA_OEMAKE:append:class-native = " LDFLAGS='${BUILD_LDFLAGS}'" | 13 | EXTRA_OEMAKE:append:class-native = " LDFLAGS='${BUILD_LDFLAGS}'" |
57 | EXTRA_OEMAKE:append:class-cross = " LDFLAGS='${BUILD_LDFLAGS}'" | 14 | EXTRA_OEMAKE:append:class-cross = " LDFLAGS='${BUILD_LDFLAGS}'" |
58 | 15 | ||
59 | do_configure() { | ||
60 | : | ||
61 | } | ||
62 | |||
63 | do_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/>/>/g' ${S}/Makefile | ||
78 | } | ||
79 | |||
80 | do_compile() { | ||
81 | oe_runmake ${EXTRA_OEMAKE} RECIPE_SYSROOT=${RECIPE_SYSROOT} | ||
82 | } | ||
83 | |||
84 | do_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 | |||
93 | do_install:class-target () { | 16 | do_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 | ||
105 | RDEPENDS:${PN} += "liblzma" | ||
106 | RDEPENDS:${PN}:class-native = "" | 28 | RDEPENDS:${PN}:class-native = "" |
107 | RDEPENDS:${PN}:class-cross = "" | 29 | RDEPENDS:${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 - | ||
111 | ARM_INSTRUCTION_SET = "arm" | ||
112 | |||
113 | # http://errors.yoctoproject.org/Errors/Details/186964/ | ||
114 | COMPATIBLE_HOST:libc-musl = 'null' | ||