diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-08-20 12:53:59 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-08-20 12:56:31 -0700 |
commit | b6022761d6880382c5e6ffa4b3dc6f1ec2ae1e73 (patch) | |
tree | e072addc2e4230a62a87b6d2c0e468de71761588 | |
parent | b752946ed1cca14f4bf8560df67a0f8abe123024 (diff) | |
download | meta-openembedded-b6022761d6880382c5e6ffa4b3dc6f1ec2ae1e73.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
Signed-off-by: Khem Raj <raj.khem@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 0000000000..876088649e --- /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 02dbb23465..0000000000 --- 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_3.0.bb b/meta-oe/recipes-connectivity/linuxptp/linuxptp_3.0.bb index 69dee1a2f1..1472a671a7 100644 --- a/meta-oe/recipes-connectivity/linuxptp/linuxptp_3.0.bb +++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp_3.0.bb | |||
@@ -4,14 +4,15 @@ 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 | " | 8 | " |
9 | 9 | ||
10 | SRC_URI[md5sum] = "1318805702eb6d59f9f247e1dd5ce12a" | 10 | SRC_URI[md5sum] = "1318805702eb6d59f9f247e1dd5ce12a" |
11 | SRC_URI[sha256sum] = "d74ceca722c75bfff53c633425f926dd48eb04f4a089451b855155c016d15785" | 11 | SRC_URI[sha256sum] = "d74ceca722c75bfff53c633425f926dd48eb04f4a089451b855155c016d15785" |
12 | 12 | ||
13 | EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} \ | 13 | EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} EXTRA_CFLAGS='${CFLAGS}'" |
14 | EXTRA_CFLAGS='-D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC ${CFLAGS}'" | 14 | |
15 | export KBUILD_OUTPUT="${RECIPE_SYSROOT}" | ||
15 | 16 | ||
16 | do_install () { | 17 | do_install () { |
17 | install -d ${D}/${bindir} | 18 | install -d ${D}/${bindir} |