mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-08 16:00:32 +00:00
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>
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
From 8a4cad5e2f2cbb6a34bdc6e877fe499502b8c4c8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
||||||
|
Date: Fri, 23 Dec 2016 18:12:29 +0100
|
||||||
|
Subject: [PATCH] linuxptp: Use cross cpp in incdefs
|
||||||
|
|
||||||
|
Use cross cpp incdefs.sh shell script since we are doing cross compiling
|
||||||
|
we need to ensure we use correct setttings from toolchain
|
||||||
|
|
||||||
|
Upstream-Status: Inappropriate [OE-Specific]
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
|
||||||
|
makefile | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/incdefs.sh
|
||||||
|
+++ b/incdefs.sh
|
||||||
|
@@ -27,7 +27,7 @@ user_flags()
|
||||||
|
printf " -D_GNU_SOURCE"
|
||||||
|
|
||||||
|
# Get list of directories searched for header files.
|
||||||
|
- dirs=$(echo "" | ${CROSS_COMPILE}cpp -Wp,-v 2>&1 >/dev/null | grep ^" /")
|
||||||
|
+ dirs=$(${CPP} -Wp,-v -xc /dev/null 2>&1 >/dev/null | grep ^" /")
|
||||||
|
|
||||||
|
# Look for clock_adjtime().
|
||||||
|
for d in $dirs; do
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
From 8a4cad5e2f2cbb6a34bdc6e877fe499502b8c4c8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
||||||
Date: Fri, 23 Dec 2016 18:12:29 +0100
|
|
||||||
Subject: [PATCH] linuxptp: no incdefs using host headers
|
|
||||||
|
|
||||||
Avoid using host headers via incdefs.sh shell script.
|
|
||||||
|
|
||||||
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
||||||
---
|
|
||||||
|
|
||||||
makefile | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/makefile b/makefile
|
|
||||||
index 8cdbd15..85174b8 100644
|
|
||||||
--- a/makefile
|
|
||||||
+++ b/makefile
|
|
||||||
@@ -33,7 +33,7 @@ OBJECTS = $(OBJ) hwstamp_ctl.o phc2sys.o phc_ctl.o pmc.o pmc_common.o \
|
|
||||||
SRC = $(OBJECTS:.o=.c)
|
|
||||||
DEPEND = $(OBJECTS:.o=.d)
|
|
||||||
srcdir := $(dir $(lastword $(MAKEFILE_LIST)))
|
|
||||||
-incdefs := $(shell $(srcdir)/incdefs.sh)
|
|
||||||
+#incdefs := $(shell $(srcdir)/incdefs.sh)
|
|
||||||
version := $(shell $(srcdir)/version.sh $(srcdir))
|
|
||||||
VPATH = $(srcdir)
|
|
||||||
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
||||||
@@ -4,14 +4,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
|||||||
|
|
||||||
SRC_URI = "http://sourceforge.net/projects/linuxptp/files/v${PV}/linuxptp-${PV}.tgz \
|
SRC_URI = "http://sourceforge.net/projects/linuxptp/files/v${PV}/linuxptp-${PV}.tgz \
|
||||||
file://build-Allow-CC-and-prefix-to-be-overriden.patch \
|
file://build-Allow-CC-and-prefix-to-be-overriden.patch \
|
||||||
file://no-incdefs-using-host-headers.patch \
|
file://Use-cross-cpp-in-incdefs.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI[md5sum] = "1318805702eb6d59f9f247e1dd5ce12a"
|
SRC_URI[md5sum] = "1318805702eb6d59f9f247e1dd5ce12a"
|
||||||
SRC_URI[sha256sum] = "d74ceca722c75bfff53c633425f926dd48eb04f4a089451b855155c016d15785"
|
SRC_URI[sha256sum] = "d74ceca722c75bfff53c633425f926dd48eb04f4a089451b855155c016d15785"
|
||||||
|
|
||||||
EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} \
|
EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} EXTRA_CFLAGS='${CFLAGS}'"
|
||||||
EXTRA_CFLAGS='-D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC ${CFLAGS}'"
|
|
||||||
|
export KBUILD_OUTPUT="${RECIPE_SYSROOT}"
|
||||||
|
|
||||||
do_install () {
|
do_install () {
|
||||||
install -d ${D}/${bindir}
|
install -d ${D}/${bindir}
|
||||||
|
|||||||
Reference in New Issue
Block a user