diff mbox series

[1/2] linuxptp: Drop unneeded downstream patches

Message ID 20231017133214.1562048-2-luca.fancellu@arm.com
State Under Review
Headers show
Series Updates to the linuxptp recipe | expand

Commit Message

Luca Fancellu Oct. 17, 2023, 1:32 p.m. UTC
Drop Use-cross-cpp-in-incdefs.patch which is "Inappropriate"
but can removed just by passing CROSS_COMPILE='${TARGET_PREFIX}'
into EXTRA_OEMAKE.

Drop build-Allow-CC-and-prefix-to-be-overriden.patch that can
be removed by passing CC='${CC}' in EXTRA_OEMAKE and, as already
the case, passing prefix=${prefix} in the oe_runmake command line.

While there, drop ARCH from EXTRA_OEMAKE because it's not used in
the codebase.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
---
 .../linuxptp/Use-cross-cpp-in-incdefs.patch   | 28 ---------------
 ...-Allow-CC-and-prefix-to-be-overriden.patch | 35 -------------------
 .../linuxptp/linuxptp_4.1.bb                  |  5 ++-
 3 files changed, 2 insertions(+), 66 deletions(-)
 delete mode 100644 meta-oe/recipes-connectivity/linuxptp/linuxptp/Use-cross-cpp-in-incdefs.patch
 delete mode 100644 meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch

Comments

Khem Raj Oct. 18, 2023, 4:40 a.m. UTC | #1
Seeing a build failure - https://errors.yoctoproject.org/Errors/Details/739959/

On Tue, Oct 17, 2023 at 6:32 AM luca fancellu <luca.fancellu@arm.com> wrote:
>
> Drop Use-cross-cpp-in-incdefs.patch which is "Inappropriate"
> but can removed just by passing CROSS_COMPILE='${TARGET_PREFIX}'
> into EXTRA_OEMAKE.
>
> Drop build-Allow-CC-and-prefix-to-be-overriden.patch that can
> be removed by passing CC='${CC}' in EXTRA_OEMAKE and, as already
> the case, passing prefix=${prefix} in the oe_runmake command line.
>
> While there, drop ARCH from EXTRA_OEMAKE because it's not used in
> the codebase.
>
> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
> ---
>  .../linuxptp/Use-cross-cpp-in-incdefs.patch   | 28 ---------------
>  ...-Allow-CC-and-prefix-to-be-overriden.patch | 35 -------------------
>  .../linuxptp/linuxptp_4.1.bb                  |  5 ++-
>  3 files changed, 2 insertions(+), 66 deletions(-)
>  delete mode 100644 meta-oe/recipes-connectivity/linuxptp/linuxptp/Use-cross-cpp-in-incdefs.patch
>  delete mode 100644 meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch
>
> 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 9c87851e48ef..000000000000
> --- a/meta-oe/recipes-connectivity/linuxptp/linuxptp/Use-cross-cpp-in-incdefs.patch
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -From be8808005772da48c052cf34a343a6d140541f6a 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>
> -
> ----
> - incdefs.sh | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff --git a/incdefs.sh b/incdefs.sh
> -index a9e94f7..dd1692f 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=$(${CPP} -Wp,-v -xc /dev/null 2>&1 >/dev/null | grep ^" /")
> -
> -       # Look for clock_adjtime().
> -       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 d4d6fac0ee5c..000000000000
> --- a/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -From 886bca11ff8fcc55386b6e4397b13e64950f93fb Mon Sep 17 00:00:00 2001
> -From: Otavio Salvador <otavio@ossystems.com.br>
> -Date: Tue, 1 Jul 2014 17:37:31 -0300
> -Subject: [PATCH] build: Allow CC and prefix to be overriden
> -
> -Upstream-Status: Pending
> -
> -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> -
> ----
> - makefile | 4 ++--
> - 1 file changed, 2 insertions(+), 2 deletions(-)
> -
> -diff --git a/makefile b/makefile
> -index 3e3b8b3..5c1a1f9 100644
> ---- a/makefile
> -+++ b/makefile
> -@@ -18,7 +18,7 @@
> - KBUILD_OUTPUT ?=
> -
> - DEBUG =
> --CC    = $(CROSS_COMPILE)gcc
> -+CC    ?= $(CROSS_COMPILE)gcc
> - VER     = -DVER=$(version)
> - CFLAGS        = -Wall $(VER) $(incdefs) $(DEBUG) $(EXTRA_CFLAGS)
> - LDLIBS        = -lm -lrt -pthread $(EXTRA_LDFLAGS)
> -@@ -43,7 +43,7 @@ incdefs := $(shell $(srcdir)/incdefs.sh)
> - version := $(shell $(srcdir)/version.sh $(srcdir))
> - VPATH = $(srcdir)
> -
> --prefix        = /usr/local
> -+prefix        ?= /usr/local
> - sbindir       = $(prefix)/sbin
> - mandir        = $(prefix)/man
> - 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 95ed76e621e6..d362eaa004a0 100644
> --- a/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb
> +++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb
> @@ -8,8 +8,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
>  LINUXPTP_SRC_URI = "http://sourceforge.net/projects/linuxptp"
>
>  SRC_URI = "${LINUXPTP_SRC_URI}/files/v4.1/linuxptp-${PV}.tgz \
> -           file://build-Allow-CC-and-prefix-to-be-overriden.patch \
> -           file://Use-cross-cpp-in-incdefs.patch \
>             file://0001-include-string.h-for-strncpy.patch \
>             file://systemd/phc2sys@.service \
>             file://systemd/ptp4l@.service \
> @@ -23,7 +21,8 @@ inherit systemd
>  UPSTREAM_CHECK_URI = "${LINUXPTP_SRC_URI}/files/"
>  UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
>
> -EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} EXTRA_CFLAGS='${CFLAGS}' mandir=${mandir}"
> +EXTRA_OEMAKE = "CC='${CC}' CROSS_COMPILE='${TARGET_PREFIX}' \
> +    EXTRA_CFLAGS='${CFLAGS}' mandir='${mandir}'"
>
>  export KBUILD_OUTPUT="${RECIPE_SYSROOT}"
>
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#105553): https://lists.openembedded.org/g/openembedded-devel/message/105553
> Mute This Topic: https://lists.openembedded.org/mt/102017520/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Luca Fancellu Oct. 18, 2023, 8:28 a.m. UTC | #2
> On 18 Oct 2023, at 05:40, Khem Raj <raj.khem@gmail.com> wrote:
> 
> Seeing a build failure - https://errors.yoctoproject.org/Errors/Details/739959/

Hi Khem,

Thanks I’ll investigate on them and I’ll let you	know.
Luca Fancellu Oct. 18, 2023, 11:23 a.m. UTC | #3
> On 18 Oct 2023, at 09:28, luca fancellu via lists.openembedded.org <luca.fancellu=arm.com@lists.openembedded.org> wrote:
> 
> 
> 
>> On 18 Oct 2023, at 05:40, Khem Raj <raj.khem@gmail.com> wrote:
>> 
>> Seeing a build failure - https://errors.yoctoproject.org/Errors/Details/739959/
> 
> Hi Khem,
> 
> Thanks I’ll investigate on them and I’ll let you know.


Hi Khem,

I was able to reproduce the issue building with clang, I’ve pushed a v2, I’ve tested with both clang and gcc.

Hope this one works!

Cheers,
Luca
diff mbox series

Patch

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 9c87851e48ef..000000000000
--- a/meta-oe/recipes-connectivity/linuxptp/linuxptp/Use-cross-cpp-in-incdefs.patch
+++ /dev/null
@@ -1,28 +0,0 @@ 
-From be8808005772da48c052cf34a343a6d140541f6a 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>
-
----
- incdefs.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/incdefs.sh b/incdefs.sh
-index a9e94f7..dd1692f 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=$(${CPP} -Wp,-v -xc /dev/null 2>&1 >/dev/null | grep ^" /")
- 
- 	# Look for clock_adjtime().
- 	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 d4d6fac0ee5c..000000000000
--- a/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch
+++ /dev/null
@@ -1,35 +0,0 @@ 
-From 886bca11ff8fcc55386b6e4397b13e64950f93fb Mon Sep 17 00:00:00 2001
-From: Otavio Salvador <otavio@ossystems.com.br>
-Date: Tue, 1 Jul 2014 17:37:31 -0300
-Subject: [PATCH] build: Allow CC and prefix to be overriden
-
-Upstream-Status: Pending
-
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-
----
- makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/makefile b/makefile
-index 3e3b8b3..5c1a1f9 100644
---- a/makefile
-+++ b/makefile
-@@ -18,7 +18,7 @@
- KBUILD_OUTPUT ?=
- 
- DEBUG	=
--CC	= $(CROSS_COMPILE)gcc
-+CC	?= $(CROSS_COMPILE)gcc
- VER     = -DVER=$(version)
- CFLAGS	= -Wall $(VER) $(incdefs) $(DEBUG) $(EXTRA_CFLAGS)
- LDLIBS	= -lm -lrt -pthread $(EXTRA_LDFLAGS)
-@@ -43,7 +43,7 @@ incdefs := $(shell $(srcdir)/incdefs.sh)
- version := $(shell $(srcdir)/version.sh $(srcdir))
- VPATH	= $(srcdir)
- 
--prefix	= /usr/local
-+prefix	?= /usr/local
- sbindir	= $(prefix)/sbin
- mandir	= $(prefix)/man
- 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 95ed76e621e6..d362eaa004a0 100644
--- a/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb
+++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb
@@ -8,8 +8,6 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 LINUXPTP_SRC_URI = "http://sourceforge.net/projects/linuxptp"
 
 SRC_URI = "${LINUXPTP_SRC_URI}/files/v4.1/linuxptp-${PV}.tgz \
-           file://build-Allow-CC-and-prefix-to-be-overriden.patch \
-           file://Use-cross-cpp-in-incdefs.patch \
            file://0001-include-string.h-for-strncpy.patch \
            file://systemd/phc2sys@.service \
            file://systemd/ptp4l@.service \
@@ -23,7 +21,8 @@  inherit systemd
 UPSTREAM_CHECK_URI = "${LINUXPTP_SRC_URI}/files/"
 UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
 
-EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} EXTRA_CFLAGS='${CFLAGS}' mandir=${mandir}"
+EXTRA_OEMAKE = "CC='${CC}' CROSS_COMPILE='${TARGET_PREFIX}' \
+    EXTRA_CFLAGS='${CFLAGS}' mandir='${mandir}'"
 
 export KBUILD_OUTPUT="${RECIPE_SYSROOT}"