summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-05-03 17:56:00 -0400
committerArmin Kuster <akuster808@gmail.com>2021-05-14 10:03:51 -0700
commit11eae114522a6befa06c7f4021a83bc016133543 (patch)
tree93bb817898ccbd31812dc374006605b0e8a6de00
parentf81318a4f87dbb9c9f9e0e24e68163fb797930bb (diff)
downloadmeta-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>
-rw-r--r--meta-oe/recipes-connectivity/linuxptp/linuxptp/Use-cross-cpp-in-incdefs.patch26
-rw-r--r--meta-oe/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch29
-rw-r--r--meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.bb7
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 @@
1From 8a4cad5e2f2cbb6a34bdc6e877fe499502b8c4c8 Mon Sep 17 00:00:00 2001
2From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
3Date: Fri, 23 Dec 2016 18:12:29 +0100
4Subject: [PATCH] linuxptp: Use cross cpp in incdefs
5
6Use cross cpp incdefs.sh shell script since we are doing cross compiling
7we need to ensure we use correct setttings from toolchain
8
9Upstream-Status: Inappropriate [OE-Specific]
10Signed-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 @@
1From 8a4cad5e2f2cbb6a34bdc6e877fe499502b8c4c8 Mon Sep 17 00:00:00 2001
2From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
3Date: Fri, 23 Dec 2016 18:12:29 +0100
4Subject: [PATCH] linuxptp: no incdefs using host headers
5
6Avoid using host headers via incdefs.sh shell script.
7
8Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
9---
10
11 makefile | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/makefile b/makefile
15index 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--
282.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
5SRC_URI = "http://sourceforge.net/projects/linuxptp/files/v${PV}/linuxptp-${PV}.tgz \ 5SRC_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
11SRC_URI[md5sum] = "d8bb7374943bb747db7786ac26f17f11" 11SRC_URI[md5sum] = "d8bb7374943bb747db7786ac26f17f11"
12SRC_URI[sha256sum] = "0a24d9401e87d4af023d201e234d91127d82c350daad93432106284aa9459c7d" 12SRC_URI[sha256sum] = "0a24d9401e87d4af023d201e234d91127d82c350daad93432106284aa9459c7d"
13 13
14EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} \ 14EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} EXTRA_CFLAGS='${CFLAGS}'"
15 EXTRA_CFLAGS='-D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC ${CFLAGS}'" 15
16export KBUILD_OUTPUT="${RECIPE_SYSROOT}"
16 17
17do_install () { 18do_install () {
18 install -d ${D}/${bindir} 19 install -d ${D}/${bindir}