summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch26
-rw-r--r--meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch48
-rw-r--r--meta-oe/recipes-connectivity/linuxptp/linuxptp_4.4.bb (renamed from meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb)12
3 files changed, 2 insertions, 84 deletions
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch b/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch
deleted file mode 100644
index b117dcf670..0000000000
--- a/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From 6120cee594c543d17ae015bc601012debcf57177 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 23 Oct 2023 10:43:42 +0100
4Subject: [PATCH] include string.h for strncpy()
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7Upstream-Status: Backport [master: 6120cee594c543d17ae015bc601012debcf57177]
8---
9 interface.c | 1 +
10 1 file changed, 1 insertion(+)
11
12diff --git a/interface.c b/interface.c
13index 29229ad6f53d..9a83c36933e7 100644
14--- a/interface.c
15+++ b/interface.c
16@@ -5,6 +5,7 @@
17 * @note SPDX-License-Identifier: GPL-2.0+
18 */
19 #include <stdlib.h>
20+#include <string.h>
21 #include "interface.h"
22
23 struct interface {
24--
252.34.1
26
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
deleted file mode 100644
index 3cf3a63b94..0000000000
--- a/meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From cffb4807ac0b9ff7aea2aa4f3842985b5363d184 Mon Sep 17 00:00:00 2001
2From: Luca Fancellu <luca.fancellu@arm.com>
3Date: Mon, 23 Oct 2023 10:43:43 +0100
4Subject: [PATCH] linuxptp: Use ${CC} in incdefs.sh
5
6The Makefile is defining CC and incdefs.sh is using
7${CROSS_COMPILE}cpp inside it, allowing both to use different
8compilers depending on what the user pass during make invocation
9as CC.
10
11Align them using ${CC} also inside incdefs.sh.
12
13Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
14Upstream-Status: Backport [master: cffb4807ac0b9ff7aea2aa4f3842985b5363d184]
15---
16 incdefs.sh | 2 +-
17 makefile | 2 +-
18 2 files changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/incdefs.sh b/incdefs.sh
21index a9e94f777f6b..391e63c7fac6 100755
22--- a/incdefs.sh
23+++ b/incdefs.sh
24@@ -27,7 +27,7 @@ user_flags()
25 printf " -D_GNU_SOURCE"
26
27 # Get list of directories searched for header files.
28- dirs=$(echo "" | ${CROSS_COMPILE}cpp -Wp,-v 2>&1 >/dev/null | grep ^" /")
29+ dirs=$(${CC} -E -Wp,-v -xc /dev/null 2>&1 >/dev/null | grep ^" /")
30
31 # Look for clock_adjtime().
32 for d in $dirs; do
33diff --git a/makefile b/makefile
34index 3e3b8b35fc96..7fc5f6fb8fa8 100644
35--- a/makefile
36+++ b/makefile
37@@ -39,7 +39,7 @@ OBJECTS = $(OBJ) hwstamp_ctl.o nsm.o phc2sys.o phc_ctl.o pmc.o pmc_agent.o \
38 SRC = $(OBJECTS:.o=.c)
39 DEPEND = $(OBJECTS:.o=.d)
40 srcdir := $(dir $(lastword $(MAKEFILE_LIST)))
41-incdefs := $(shell $(srcdir)/incdefs.sh)
42+incdefs := $(shell CC="$(CC)" $(srcdir)/incdefs.sh)
43 version := $(shell $(srcdir)/version.sh $(srcdir))
44 VPATH = $(srcdir)
45
46--
472.34.1
48
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb b/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.4.bb
index d1a73841a1..84b3af8c56 100644
--- a/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb
+++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.4.bb
@@ -5,23 +5,15 @@ HOMEPAGE = "http://linuxptp.sourceforge.net/"
5LICENSE = "GPL-2.0-only" 5LICENSE = "GPL-2.0-only"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
7 7
8LINUXPTP_SRC_URI = "http://sourceforge.net/projects/linuxptp" 8SRC_URI = "https://downloads.nwtime.org/linuxptp/linuxptp-${PV}.tgz \
9
10SRC_URI = "${LINUXPTP_SRC_URI}/files/v4.1/linuxptp-${PV}.tgz \
11 file://0001-include-string.h-for-strncpy.patch \
12 file://0002-linuxptp-Use-CC-in-incdefs.sh.patch \
13 file://systemd/phc2sys@.service.in \ 9 file://systemd/phc2sys@.service.in \
14 file://systemd/ptp4l@.service.in \ 10 file://systemd/ptp4l@.service.in \
15 " 11 "
16 12
17SRC_URI[md5sum] = "1db8699fc155965341759be5e5aad938" 13SRC_URI[sha256sum] = "61757bc0a58d789b8fcbdddf56c88a0230597184a70dcb2ac05b4c6b619f7d5c"
18SRC_URI[sha256sum] = "e1743d44f8208897e30895da3579e670ff919b914feb4b5a949f3e421ddde535"
19 14
20inherit systemd 15inherit systemd
21 16
22UPSTREAM_CHECK_URI = "${LINUXPTP_SRC_URI}/files/"
23UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
24
25EXTRA_OEMAKE = "CC='${CC}' EXTRA_CFLAGS='${CFLAGS}' mandir='${mandir}' \ 17EXTRA_OEMAKE = "CC='${CC}' EXTRA_CFLAGS='${CFLAGS}' mandir='${mandir}' \
26 sbindir='${sbindir}'" 18 sbindir='${sbindir}'"
27 19