summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2024-01-23 18:53:37 +0100
committerArmin Kuster <akuster808@gmail.com>2024-03-03 16:38:27 -0500
commit45ea2ed7593b82825e0342d5e3928f83b8e3a2ce (patch)
tree4b772735b64ef785330175fd5457d1246cec4ac6
parent47bf3be043ce100b8197051c02622494869d4bcf (diff)
downloadmeta-openembedded-45ea2ed7593b82825e0342d5e3928f83b8e3a2ce.tar.gz
linuxptp: fix do_compile error
with make 4.4, linuxptp do_compile will failed with error: In file included from clock.c:35: missing.h:61:9: error: redeclaration of enumerator 'HWTSTAMP_TX_ONESTEP_P2P' 61 | HWTSTAMP_TX_ONESTEP_P2P = 3, | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from clock.c:21: /buildarea2/WRLCD_Regression/Rerun/build_dir/11201532-build_scp_world_Feature_Test/qemux86-64-standard-std-OE/build/tmp-glibc/work/core2-64-wrs-linux/linuxptp/3.1.1-r0/recipe-sysroot/usr/include/linux/net_tstamp.h:128:9: note: previous definition of 'HWTSTAMP_TX_ONESTEP_P2P' with type 'enum hwtstamp_tx_types' 128 | HWTSTAMP_TX_ONESTEP_P2P, | Following change of make 4.4 changes behavior of shell function: * WARNING: Backward-incompatibility! Previously makefile variables marked as export were not exported to commands started by the $(shell ...) function. Now, all exported variables are exported to $(shell ...). Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Backport of commit 05c1003c4 ("linuxptp: fix do_compile error"). This is present in dunfell/kirkstone as well. If net_tstamp.h of the build host disagrees with net_tstamp.h of the OE kernel or I remove the build host's net_tstamp.h do_compile fails. Changed Upstream Status to Backport with the git sha as the commit is now applied upstream. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch42
-rw-r--r--meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.1.bb1
2 files changed, 43 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch b/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch
new file mode 100644
index 000000000..83bdae858
--- /dev/null
+++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch
@@ -0,0 +1,42 @@
1From dfd38cb29c0768692f886d3ab9158bd2b3132582 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Tue, 22 Nov 2022 15:20:48 +0800
4Subject: [PATCH] makefile: use conditional assignment for KBUILD_OUTPUT
5
6Refer [1],from make 4.4, all variables that are marked as export will
7also be passed to the shell started by the shell function. use "=" will
8make KBUILD_OUTPUT always empty for shell function, use "?=" to make
9"export KBUILD_OUTPUT" in enrironment can work.
10
11[snip of 4.4 NEWS]
12* WARNING: Backward-incompatibility!
13 Previously makefile variables marked as export were not exported to commands
14 started by the $(shell ...) function. Now, all exported variables are
15 exported to $(shell ...).
16[snip]
17
18[1] https://git.savannah.gnu.org/cgit/make.git/tree/NEWS?h=4.4&id=ed493f6c9116cc217b99c2cfa6a95f15803235a2#n74
19
20Upstream-Status: Backport [d3dd51ba611802d7cbb28631cb943cb882fa4aac]
21
22Signed-off-by: Changqing Li <changqing.li@windriver.com>
23---
24 makefile | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27diff --git a/makefile b/makefile
28index 529d8a0..3db60fa 100644
29--- a/makefile
30+++ b/makefile
31@@ -15,7 +15,7 @@
32 # with this program; if not, write to the Free Software Foundation, Inc.,
33 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
34
35-KBUILD_OUTPUT =
36+KBUILD_OUTPUT ?=
37
38 DEBUG =
39 CC ?= $(CROSS_COMPILE)gcc
40--
412.25.1
42
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.1.bb b/meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.1.bb
index 79e59a8fe..b848575e1 100644
--- a/meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.1.bb
+++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.1.bb
@@ -6,6 +6,7 @@ SRC_URI = "http://sourceforge.net/projects/linuxptp/files/v2.0/linuxptp-${PV}.tg
6 file://build-Allow-CC-and-prefix-to-be-overriden.patch \ 6 file://build-Allow-CC-and-prefix-to-be-overriden.patch \
7 file://Use-cross-cpp-in-incdefs.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 file://0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch \
9 " 10 "
10 11
11SRC_URI[sha256sum] = "6f4669db1733747427217a9e74c8b5ca25c4245947463e9cdb860ec8f5ec797a" 12SRC_URI[sha256sum] = "6f4669db1733747427217a9e74c8b5ca25c4245947463e9cdb860ec8f5ec797a"