diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-05-03 17:56:00 -0400 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2021-05-14 10:03:51 -0700 |
commit | 11eae114522a6befa06c7f4021a83bc016133543 (patch) | |
tree | 93bb817898ccbd31812dc374006605b0e8a6de00 | |
parent | f81318a4f87dbb9c9f9e0e24e68163fb797930bb (diff) | |
download | meta-openembedded-11eae114522a6befa06c7f4021a83bc016133543.tar.gz |
linuxptp: Fix cross build
Adjust incdefs.sh to use cross tools to poke for system functionality
Re-enable using incdefs.sh
export KBUILD_OUTPUT to point to recipe sysroot
(From meta-oe rev: b6022761d6880382c5e6ffa4b3dc6f1ec2ae1e73)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
3 files changed, 30 insertions, 32 deletions
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp/Use-cross-cpp-in-incdefs.patch b/meta-oe/recipes-connectivity/linuxptp/linuxptp/Use-cross-cpp-in-incdefs.patch new file mode 100644 index 000000000..876088649 --- /dev/null +++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp/Use-cross-cpp-in-incdefs.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From 8a4cad5e2f2cbb6a34bdc6e877fe499502b8c4c8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Marcel Ziswiler <marcel.ziswiler@toradex.com> | ||
3 | Date: Fri, 23 Dec 2016 18:12:29 +0100 | ||
4 | Subject: [PATCH] linuxptp: Use cross cpp in incdefs | ||
5 | |||
6 | Use cross cpp incdefs.sh shell script since we are doing cross compiling | ||
7 | we need to ensure we use correct setttings from toolchain | ||
8 | |||
9 | Upstream-Status: Inappropriate [OE-Specific] | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | |||
13 | makefile | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | --- a/incdefs.sh | ||
17 | +++ b/incdefs.sh | ||
18 | @@ -27,7 +27,7 @@ user_flags() | ||
19 | printf " -D_GNU_SOURCE" | ||
20 | |||
21 | # Get list of directories searched for header files. | ||
22 | - dirs=$(echo "" | ${CROSS_COMPILE}cpp -Wp,-v 2>&1 >/dev/null | grep ^" /") | ||
23 | + dirs=$(${CPP} -Wp,-v -xc /dev/null 2>&1 >/dev/null | grep ^" /") | ||
24 | |||
25 | # Look for clock_adjtime(). | ||
26 | for d in $dirs; do | ||
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch b/meta-oe/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch deleted file mode 100644 index 02dbb2346..000000000 --- a/meta-oe/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 8a4cad5e2f2cbb6a34bdc6e877fe499502b8c4c8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Marcel Ziswiler <marcel.ziswiler@toradex.com> | ||
3 | Date: Fri, 23 Dec 2016 18:12:29 +0100 | ||
4 | Subject: [PATCH] linuxptp: no incdefs using host headers | ||
5 | |||
6 | Avoid using host headers via incdefs.sh shell script. | ||
7 | |||
8 | Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> | ||
9 | --- | ||
10 | |||
11 | makefile | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/makefile b/makefile | ||
15 | index 8cdbd15..85174b8 100644 | ||
16 | --- a/makefile | ||
17 | +++ b/makefile | ||
18 | @@ -33,7 +33,7 @@ OBJECTS = $(OBJ) hwstamp_ctl.o phc2sys.o phc_ctl.o pmc.o pmc_common.o \ | ||
19 | SRC = $(OBJECTS:.o=.c) | ||
20 | DEPEND = $(OBJECTS:.o=.d) | ||
21 | srcdir := $(dir $(lastword $(MAKEFILE_LIST))) | ||
22 | -incdefs := $(shell $(srcdir)/incdefs.sh) | ||
23 | +#incdefs := $(shell $(srcdir)/incdefs.sh) | ||
24 | version := $(shell $(srcdir)/version.sh $(srcdir)) | ||
25 | VPATH = $(srcdir) | ||
26 | |||
27 | -- | ||
28 | 2.9.3 | ||
29 | |||
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.bb b/meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.bb index 930c6673d..c98976779 100644 --- a/meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.bb +++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.bb | |||
@@ -4,15 +4,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | |||
4 | 4 | ||
5 | SRC_URI = "http://sourceforge.net/projects/linuxptp/files/v${PV}/linuxptp-${PV}.tgz \ | 5 | SRC_URI = "http://sourceforge.net/projects/linuxptp/files/v${PV}/linuxptp-${PV}.tgz \ |
6 | file://build-Allow-CC-and-prefix-to-be-overriden.patch \ | 6 | file://build-Allow-CC-and-prefix-to-be-overriden.patch \ |
7 | file://no-incdefs-using-host-headers.patch \ | 7 | file://Use-cross-cpp-in-incdefs.patch \ |
8 | file://time_t_maybe_long_long.patch \ | 8 | file://time_t_maybe_long_long.patch \ |
9 | " | 9 | " |
10 | 10 | ||
11 | SRC_URI[md5sum] = "d8bb7374943bb747db7786ac26f17f11" | 11 | SRC_URI[md5sum] = "d8bb7374943bb747db7786ac26f17f11" |
12 | SRC_URI[sha256sum] = "0a24d9401e87d4af023d201e234d91127d82c350daad93432106284aa9459c7d" | 12 | SRC_URI[sha256sum] = "0a24d9401e87d4af023d201e234d91127d82c350daad93432106284aa9459c7d" |
13 | 13 | ||
14 | EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} \ | 14 | EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} EXTRA_CFLAGS='${CFLAGS}'" |
15 | EXTRA_CFLAGS='-D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC ${CFLAGS}'" | 15 | |
16 | export KBUILD_OUTPUT="${RECIPE_SYSROOT}" | ||
16 | 17 | ||
17 | do_install () { | 18 | do_install () { |
18 | install -d ${D}/${bindir} | 19 | install -d ${D}/${bindir} |