diff options
3 files changed, 32 insertions, 45 deletions
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 deleted file mode 100644 index 52d5d59a..00000000 --- a/recipes-extended/dev86/dev86/0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 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/cross.patch b/recipes-extended/dev86/dev86/cross.patch new file mode 100644 index 00000000..041a8d31 --- /dev/null +++ b/recipes-extended/dev86/dev86/cross.patch | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | Build ifdef using BUILD_CC, not CC. | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 5 | |||
| 6 | diff --git a/Makefile b/Makefile | ||
| 7 | index 8a61b65..99f41de 100644 | ||
| 8 | --- a/Makefile | ||
| 9 | +++ b/Makefile | ||
| 10 | @@ -22,6 +22,10 @@ CFLAGS= -O | ||
| 11 | IFDEFNAME= ifdef | ||
| 12 | WD=$(shell pwd) | ||
| 13 | |||
| 14 | +BUILD_CC ?= $(CC) | ||
| 15 | +BUILD_CFLAGS ?= $(CFLAGS) | ||
| 16 | +BUILD_LDFLAGS ?= $(LDFLAGS) | ||
| 17 | + | ||
| 18 | # Some makes take the last of a list as the default ... | ||
| 19 | all: make.fil | ||
| 20 | PATH="`pwd`/bin:$$PATH" $(MAKE) -f make.fil VERSION=$(VERSION) TOPDIR=`pwd` $@ | ||
| 21 | @@ -65,7 +69,7 @@ make.fil: $(IFDEFNAME) makefile.in | ||
| 22 | @rm -f tmp.mak tmp.sed | ||
| 23 | |||
| 24 | $(IFDEFNAME): ifdef.c | ||
| 25 | - $(CC) $(IFDEFARCH) $(CFLAGS) $(IFDEFFLAGS) $(LDFLAGS) -o $(IFDEFNAME) ifdef.c | ||
| 26 | + $(BUILD_CC) $(IFDEFARCH) $(BUILD_CFLAGS) $(IFDEFFLAGS) $(BUILD_LDFLAGS) -o $(IFDEFNAME) ifdef.c | ||
| 27 | |||
| 28 | uninstall: | ||
| 29 | @echo 'Sorry, no go; it was just wrong.' | ||
diff --git a/recipes-extended/dev86/dev86_git.bb b/recipes-extended/dev86/dev86_git.bb index ad7a0dfd..838918a3 100644 --- a/recipes-extended/dev86/dev86_git.bb +++ b/recipes-extended/dev86/dev86_git.bb | |||
| @@ -11,16 +11,14 @@ SRC_URI = "git://github.com/jbruchon/${BPN}.git;protocol=https \ | |||
| 11 | file://0001-cpp-Makefile-respect-LDFLAGS-when-building-bcc-cpp.patch \ | 11 | file://0001-cpp-Makefile-respect-LDFLAGS-when-building-bcc-cpp.patch \ |
| 12 | file://0003-cpp-update-token1.tok-to-make-new-gperf-happy-regen..patch \ | 12 | file://0003-cpp-update-token1.tok-to-make-new-gperf-happy-regen..patch \ |
| 13 | file://0004-regen-token2.h-token1.h-with-gperf-3.1.patch \ | 13 | file://0004-regen-token2.h-token1.h-with-gperf-3.1.patch \ |
| 14 | " | 14 | file://cross.patch \ |
| 15 | SRC_URI_append_class-target = " \ | ||
| 16 | file://0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch \ | ||
| 17 | " | 15 | " |
| 18 | 16 | ||
| 19 | S = "${WORKDIR}/git" | 17 | S = "${WORKDIR}/git" |
| 20 | 18 | ||
| 21 | DEPENDS = "gperf-native dev86-native" | 19 | DEPENDS = "gperf-native" |
| 22 | 20 | ||
| 23 | BBCLASSEXTEND = "native" | 21 | BBCLASSEXTEND = "native nativesdk" |
| 24 | EXTRA_OEMAKE = "VERSION=${BASE_PV} PREFIX=${prefix} DIST=${D} LDFLAGS='${LDFLAGS}' INEXE=''" | 22 | EXTRA_OEMAKE = "VERSION=${BASE_PV} PREFIX=${prefix} DIST=${D} LDFLAGS='${LDFLAGS}' INEXE=''" |
| 25 | 23 | ||
| 26 | do_compile() { | 24 | do_compile() { |
| @@ -41,8 +39,4 @@ do_install() { | |||
| 41 | ln -s ../lib/bcc/bcc-cc1 ${D}${prefix}/bin/bcc-cc1 | 39 | ln -s ../lib/bcc/bcc-cc1 ${D}${prefix}/bin/bcc-cc1 |
| 42 | } | 40 | } |
| 43 | 41 | ||
| 44 | do_install_append_class-native() { | ||
| 45 | install -v -m 755 ${B}/ifdefg ${D}${bindir} | ||
| 46 | } | ||
| 47 | |||
| 48 | FILES_${PN} += "${libdir}/bcc" | 42 | FILES_${PN} += "${libdir}/bcc" |
