diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2021-05-14 06:39:52 -0700 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-05-14 10:06:02 -0400 |
commit | d1e08a20d169b8cbcca20987d709ae4eb25a3be8 (patch) | |
tree | bf02fbb12c25fd5c60d6ad5f33ee86c1e6a05eb0 | |
parent | b67e57e54effb7c18261732c7e00763c9d92cf90 (diff) | |
download | meta-virtualization-d1e08a20d169b8cbcca20987d709ae4eb25a3be8.tar.gz |
dev86: depend on dev86-native for ifdefg
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
3 files changed, 71 insertions, 5 deletions
diff --git a/recipes-extended/dev86/dev86/0001-cpp-Makefile-respect-LDFLAGS-when-building-bcc-cpp.patch b/recipes-extended/dev86/dev86/0001-cpp-Makefile-respect-LDFLAGS-when-building-bcc-cpp.patch new file mode 100644 index 00000000..fc7fdd59 --- /dev/null +++ b/recipes-extended/dev86/dev86/0001-cpp-Makefile-respect-LDFLAGS-when-building-bcc-cpp.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | From 12f3a54801e15f3bdd5222ca1487f2fe36141c5d Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Fri, 14 May 2021 06:30:18 -0700 | ||
4 | Subject: [PATCH] cpp/Makefile: respect LDFLAGS when building bcc-cpp | ||
5 | |||
6 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
7 | --- | ||
8 | cpp/Makefile | 2 +- | ||
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/cpp/Makefile b/cpp/Makefile | ||
12 | index 0ea43cc..303b43c 100644 | ||
13 | --- a/cpp/Makefile | ||
14 | +++ b/cpp/Makefile | ||
15 | @@ -3,7 +3,7 @@ CFLAGS=-Wall -Wstrict-prototypes | ||
16 | all: bcc-cpp | ||
17 | |||
18 | bcc-cpp: main.o cpp.o hash.o token1.o token2.o | ||
19 | - $(CC) $(CFLAGS) -o bcc-cpp main.o cpp.o hash.o token1.o token2.o | ||
20 | + $(CC) $(CFLAGS) $(LDFLAGS) -o bcc-cpp main.o cpp.o hash.o token1.o token2.o | ||
21 | |||
22 | clean realclean: | ||
23 | rm -f bcc-cpp main.o cpp.o hash.o token1.o token2.o tmp.h | ||
diff --git a/recipes-extended/dev86/dev86/0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch b/recipes-extended/dev86/dev86/0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch new file mode 100644 index 00000000..52d5d59a --- /dev/null +++ b/recipes-extended/dev86/dev86/0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 9b347a5ee9604d4ec972506328ee44a0d8eb1bf0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Fri, 14 May 2021 06:32:02 -0700 | ||
4 | Subject: [PATCH] Makefile: use ifdefg from dev86-native instead of target | ||
5 | |||
6 | * recipe is restricted to: | ||
7 | COMPATIBLE_HOST = "(i.86|x86_64).*-linux" | ||
8 | so it's less likely to reproduce invalid combination of | ||
9 | host and target, but I guess if you have aarch64 build | ||
10 | machine and build for x86 then it might fail as for Bruce: | ||
11 | |||
12 | | ./ifdefg -MU makefile.in >tmp.mak | ||
13 | | /bin/sh: 1: ./ifdefg: not found | ||
14 | | make[1]: *** [Makefile:46: make.fil] Error 127 | ||
15 | |||
16 | use ifdefg from native build to increase chances that it | ||
17 | will be compatible with your host system | ||
18 | |||
19 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
20 | --- | ||
21 | Makefile | 2 +- | ||
22 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/Makefile b/Makefile | ||
25 | index 8a61b65..7fdf861 100644 | ||
26 | --- a/Makefile | ||
27 | +++ b/Makefile | ||
28 | @@ -43,7 +43,7 @@ realclean: | ||
29 | -for X in */; do cd $$X && make clean; cd $(WD); done | ||
30 | |||
31 | make.fil: $(IFDEFNAME) makefile.in | ||
32 | - ./$(IFDEFNAME) -MU $(IFDEFOPTS) makefile.in >tmp.mak | ||
33 | + $(IFDEFNAME) -MU $(IFDEFOPTS) makefile.in >tmp.mak | ||
34 | echo > tmp.sed | ||
35 | [ "$(BINDIR)" != "//bin" ] || echo >> tmp.sed "s:%BINDIR%:/bin:" | ||
36 | [ "$(LIBDIR)" != "//lib/bcc" ] || echo >> tmp.sed "s:%LIBDIR%:/lib/bcc:" | ||
diff --git a/recipes-extended/dev86/dev86_git.bb b/recipes-extended/dev86/dev86_git.bb index 476bf38f..c987342b 100644 --- a/recipes-extended/dev86/dev86_git.bb +++ b/recipes-extended/dev86/dev86_git.bb | |||
@@ -7,21 +7,23 @@ SECTION = "console/tools" | |||
7 | BASE_PV="0.16.21" | 7 | BASE_PV="0.16.21" |
8 | PV = "${BASE_PV}+git${SRCPV}" | 8 | PV = "${BASE_PV}+git${SRCPV}" |
9 | SRCREV = "e254e0b19651d3b8a20225b40281c9974a95dec4" | 9 | SRCREV = "e254e0b19651d3b8a20225b40281c9974a95dec4" |
10 | SRC_URI = "git://github.com/jbruchon/${BPN}.git;protocol=https" | 10 | SRC_URI = "git://github.com/jbruchon/${BPN}.git;protocol=https \ |
11 | file://0001-cpp-Makefile-respect-LDFLAGS-when-building-bcc-cpp.patch \ | ||
12 | " | ||
13 | SRC_URI_append_class-target = " \ | ||
14 | file://0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch \ | ||
15 | " | ||
11 | 16 | ||
12 | S = "${WORKDIR}/git" | 17 | S = "${WORKDIR}/git" |
13 | 18 | ||
14 | DEPENDS = "gperf-native" | 19 | DEPENDS = "gperf-native dev86-native" |
15 | 20 | ||
16 | BBCLASSEXTEND = "native" | 21 | BBCLASSEXTEND = "native" |
17 | EXTRA_OEMAKE = "VERSION=${BASE_PV} PREFIX=${prefix} DIST=${D} LDFLAGS='${LDFLAGS}'" | 22 | EXTRA_OEMAKE = "VERSION=${BASE_PV} PREFIX=${prefix} DIST=${D} LDFLAGS='${LDFLAGS}'" |
18 | 23 | ||
19 | do_compile() { | 24 | do_compile() { |
20 | # ${S}/Makefile does respect LDFLAGS, but ${S}/cpp/Makefile doesn't when building bcc-cpp | ||
21 | sed -i 's#$(CC) $(CFLAGS) -o bcc-cpp#$(CC) $(CFLAGS) $(LDFLAGS) -o bcc-cpp#g' ${S}/cpp/Makefile | ||
22 | oe_runmake make.fil | 25 | oe_runmake make.fil |
23 | oe_runmake -f make.fil bcc86 as86 ld86 | 26 | oe_runmake -f make.fil bcc86 as86 ld86 |
24 | |||
25 | } | 27 | } |
26 | 28 | ||
27 | do_install() { | 29 | do_install() { |
@@ -33,8 +35,13 @@ do_install() { | |||
33 | oe_runmake install-bcc | 35 | oe_runmake install-bcc |
34 | ln -s ../lib/bcc/bcc-cpp ${D}${prefix}/bin/bcc-cpp | 36 | ln -s ../lib/bcc/bcc-cpp ${D}${prefix}/bin/bcc-cpp |
35 | ln -s ../lib/bcc/bcc-cc1 ${D}${prefix}/bin/bcc-cc1 | 37 | ln -s ../lib/bcc/bcc-cc1 ${D}${prefix}/bin/bcc-cc1 |
38 | } | ||
36 | 39 | ||
40 | do_install_append_class-native() { | ||
41 | install -v -m 755 ${B}/ifdefg ${D}${bindir} | ||
37 | } | 42 | } |
43 | |||
38 | COMPATIBLE_HOST = "(i.86|x86_64).*-linux" | 44 | COMPATIBLE_HOST = "(i.86|x86_64).*-linux" |
39 | FILES_${PN} += "${libdir}/bcc" | 45 | FILES_${PN} += "${libdir}/bcc" |
46 | |||
40 | INSANE_SKIP_${PN} = "already-stripped" | 47 | INSANE_SKIP_${PN} = "already-stripped" |