diff options
4 files changed, 36 insertions, 66 deletions
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch b/meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch new file mode 100644 index 0000000000..e6a3386df0 --- /dev/null +++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | From 2cc19a679ec37715df546dd9f00d8d9b0ab20059 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Luca Fancellu <luca.fancellu@arm.com> | ||
| 3 | Date: Wed, 18 Oct 2023 11:10:18 +0100 | ||
| 4 | Subject: [PATCH] linuxptp: Use ${CC} in incdefs.sh | ||
| 5 | |||
| 6 | The Makefile is defining CC and incdefs.sh is using | ||
| 7 | ${CROSS_COMPILE}cpp inside it, allowing both to use different | ||
| 8 | compilers depending on what the user pass during make invocation | ||
| 9 | as CC. | ||
| 10 | |||
| 11 | Align them using ${CC} also inside incdefs.sh | ||
| 12 | |||
| 13 | Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> | ||
| 14 | Upstream-Status: Pending | ||
| 15 | --- | ||
| 16 | incdefs.sh | 2 +- | ||
| 17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 18 | |||
| 19 | diff --git a/incdefs.sh b/incdefs.sh | ||
| 20 | index a9e94f777f6b..391e63c7fac6 100755 | ||
| 21 | --- a/incdefs.sh | ||
| 22 | +++ b/incdefs.sh | ||
| 23 | @@ -27,7 +27,7 @@ user_flags() | ||
| 24 | printf " -D_GNU_SOURCE" | ||
| 25 | |||
| 26 | # Get list of directories searched for header files. | ||
| 27 | - dirs=$(echo "" | ${CROSS_COMPILE}cpp -Wp,-v 2>&1 >/dev/null | grep ^" /") | ||
| 28 | + dirs=$(${CC} -E -Wp,-v -xc /dev/null 2>&1 >/dev/null | grep ^" /") | ||
| 29 | |||
| 30 | # Look for clock_adjtime(). | ||
| 31 | for d in $dirs; do | ||
| 32 | -- | ||
| 33 | 2.34.1 | ||
| 34 | |||
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 deleted file mode 100644 index 9c87851e48..0000000000 --- a/meta-oe/recipes-connectivity/linuxptp/linuxptp/Use-cross-cpp-in-incdefs.patch +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | From be8808005772da48c052cf34a343a6d140541f6a 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 | incdefs.sh | 2 +- | ||
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/incdefs.sh b/incdefs.sh | ||
| 17 | index a9e94f7..dd1692f 100755 | ||
| 18 | --- a/incdefs.sh | ||
| 19 | +++ b/incdefs.sh | ||
| 20 | @@ -27,7 +27,7 @@ user_flags() | ||
| 21 | printf " -D_GNU_SOURCE" | ||
| 22 | |||
| 23 | # Get list of directories searched for header files. | ||
| 24 | - dirs=$(echo "" | ${CROSS_COMPILE}cpp -Wp,-v 2>&1 >/dev/null | grep ^" /") | ||
| 25 | + dirs=$(${CPP} -Wp,-v -xc /dev/null 2>&1 >/dev/null | grep ^" /") | ||
| 26 | |||
| 27 | # Look for clock_adjtime(). | ||
| 28 | for d in $dirs; do | ||
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch b/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch deleted file mode 100644 index d4d6fac0ee..0000000000 --- a/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | From 886bca11ff8fcc55386b6e4397b13e64950f93fb Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Otavio Salvador <otavio@ossystems.com.br> | ||
| 3 | Date: Tue, 1 Jul 2014 17:37:31 -0300 | ||
| 4 | Subject: [PATCH] build: Allow CC and prefix to be overriden | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
| 9 | |||
| 10 | --- | ||
| 11 | makefile | 4 ++-- | ||
| 12 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/makefile b/makefile | ||
| 15 | index 3e3b8b3..5c1a1f9 100644 | ||
| 16 | --- a/makefile | ||
| 17 | +++ b/makefile | ||
| 18 | @@ -18,7 +18,7 @@ | ||
| 19 | KBUILD_OUTPUT ?= | ||
| 20 | |||
| 21 | DEBUG = | ||
| 22 | -CC = $(CROSS_COMPILE)gcc | ||
| 23 | +CC ?= $(CROSS_COMPILE)gcc | ||
| 24 | VER = -DVER=$(version) | ||
| 25 | CFLAGS = -Wall $(VER) $(incdefs) $(DEBUG) $(EXTRA_CFLAGS) | ||
| 26 | LDLIBS = -lm -lrt -pthread $(EXTRA_LDFLAGS) | ||
| 27 | @@ -43,7 +43,7 @@ incdefs := $(shell $(srcdir)/incdefs.sh) | ||
| 28 | version := $(shell $(srcdir)/version.sh $(srcdir)) | ||
| 29 | VPATH = $(srcdir) | ||
| 30 | |||
| 31 | -prefix = /usr/local | ||
| 32 | +prefix ?= /usr/local | ||
| 33 | sbindir = $(prefix)/sbin | ||
| 34 | mandir = $(prefix)/man | ||
| 35 | man8dir = $(mandir)/man8 | ||
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb b/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb index 95ed76e621..a92434385d 100644 --- a/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb +++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb | |||
| @@ -8,9 +8,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | |||
| 8 | LINUXPTP_SRC_URI = "http://sourceforge.net/projects/linuxptp" | 8 | LINUXPTP_SRC_URI = "http://sourceforge.net/projects/linuxptp" |
| 9 | 9 | ||
| 10 | SRC_URI = "${LINUXPTP_SRC_URI}/files/v4.1/linuxptp-${PV}.tgz \ | 10 | SRC_URI = "${LINUXPTP_SRC_URI}/files/v4.1/linuxptp-${PV}.tgz \ |
| 11 | file://build-Allow-CC-and-prefix-to-be-overriden.patch \ | ||
| 12 | file://Use-cross-cpp-in-incdefs.patch \ | ||
| 13 | file://0001-include-string.h-for-strncpy.patch \ | 11 | file://0001-include-string.h-for-strncpy.patch \ |
| 12 | file://0002-linuxptp-Use-CC-in-incdefs.sh.patch \ | ||
| 14 | file://systemd/phc2sys@.service \ | 13 | file://systemd/phc2sys@.service \ |
| 15 | file://systemd/ptp4l@.service \ | 14 | file://systemd/ptp4l@.service \ |
| 16 | " | 15 | " |
| @@ -23,7 +22,7 @@ inherit systemd | |||
| 23 | UPSTREAM_CHECK_URI = "${LINUXPTP_SRC_URI}/files/" | 22 | UPSTREAM_CHECK_URI = "${LINUXPTP_SRC_URI}/files/" |
| 24 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/" | 23 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/" |
| 25 | 24 | ||
| 26 | EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} EXTRA_CFLAGS='${CFLAGS}' mandir=${mandir}" | 25 | EXTRA_OEMAKE = "CC='${CC}' EXTRA_CFLAGS='${CFLAGS}' mandir='${mandir}'" |
| 27 | 26 | ||
| 28 | export KBUILD_OUTPUT="${RECIPE_SYSROOT}" | 27 | export KBUILD_OUTPUT="${RECIPE_SYSROOT}" |
| 29 | 28 | ||
