diff options
Diffstat (limited to 'meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch')
-rw-r--r-- | meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch | 48 |
1 files changed, 48 insertions, 0 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..3cf3a63b94 --- /dev/null +++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch @@ -0,0 +1,48 @@ +From cffb4807ac0b9ff7aea2aa4f3842985b5363d184 Mon Sep 17 00:00:00 2001 +From: Luca Fancellu <luca.fancellu@arm.com> +Date: Mon, 23 Oct 2023 10:43:43 +0100 +Subject: [PATCH] linuxptp: Use ${CC} in incdefs.sh + +The Makefile is defining CC and incdefs.sh is using +${CROSS_COMPILE}cpp inside it, allowing both to use different +compilers depending on what the user pass during make invocation +as CC. + +Align them using ${CC} also inside incdefs.sh. + +Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> +Upstream-Status: Backport [master: cffb4807ac0b9ff7aea2aa4f3842985b5363d184] +--- + incdefs.sh | 2 +- + makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/incdefs.sh b/incdefs.sh +index a9e94f777f6b..391e63c7fac6 100755 +--- 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=$(${CC} -E -Wp,-v -xc /dev/null 2>&1 >/dev/null | grep ^" /") + + # Look for clock_adjtime(). + for d in $dirs; do +diff --git a/makefile b/makefile +index 3e3b8b35fc96..7fc5f6fb8fa8 100644 +--- a/makefile ++++ b/makefile +@@ -39,7 +39,7 @@ OBJECTS = $(OBJ) hwstamp_ctl.o nsm.o phc2sys.o phc_ctl.o pmc.o pmc_agent.o \ + SRC = $(OBJECTS:.o=.c) + DEPEND = $(OBJECTS:.o=.d) + srcdir := $(dir $(lastword $(MAKEFILE_LIST))) +-incdefs := $(shell $(srcdir)/incdefs.sh) ++incdefs := $(shell CC="$(CC)" $(srcdir)/incdefs.sh) + version := $(shell $(srcdir)/version.sh $(srcdir)) + VPATH = $(srcdir) + +-- +2.34.1 + |