- The 0001-Makefile-Allow-for-CC-and-AR-to-be-overridden.patch changed
  upstream's 'CC =' / 'AR =' to '?=' so OE's toolchain would take effect.
  Passing CC/AR via EXTRA_OEMAKE overrides the makefile assignments on the
  command line instead, so the local patch is no longer needed

- Verified by building qemux86-64 and qemuarm64: both do_compile and do_install
  use the cross CC/AR (e.g. aarch64-oe-linux-gcc)

Signed-off-by: Jaipaul Cheernam <[email protected]>
---
 ...Allow-for-CC-and-AR-to-be-overridden.patch | 33 -------------------
 meta/recipes-rt/rt-tests/rt-tests_git.bb      |  6 +++-
 2 files changed, 5 insertions(+), 34 deletions(-)
 delete mode 100644 
meta/recipes-rt/rt-tests/files/0001-Makefile-Allow-for-CC-and-AR-to-be-overridden.patch

diff --git 
a/meta/recipes-rt/rt-tests/files/0001-Makefile-Allow-for-CC-and-AR-to-be-overridden.patch
 
b/meta/recipes-rt/rt-tests/files/0001-Makefile-Allow-for-CC-and-AR-to-be-overridden.patch
deleted file mode 100644
index a39781908ec..00000000000
--- 
a/meta/recipes-rt/rt-tests/files/0001-Makefile-Allow-for-CC-and-AR-to-be-overridden.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 7cf4cf097895bd4c3f3d3a6f783c766b3173cf1a Mon Sep 17 00:00:00 2001
-From: Randy Witt <[email protected]>
-Date: Fri, 16 Oct 2020 16:54:30 -0700
-Subject: [PATCH] Makefile: Allow for CC and AR to be overridden
-
-The Makefile previously allowed for this but it was removed upstream in
-commit 7763cf316d7896fa05b816a46998f0827ab6e6eb.
-
-Signed-off-by: Randy Witt <[email protected]>
-
-Upstream-Status: Inappropriate [other]
----
- Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 83d2a33..e757839 100644
---- a/Makefile
-+++ b/Makefile
-@@ -2,8 +2,8 @@
- include feature/test-feature.mak
- 
- VERSION = 2.10
--CC = $(CROSS_COMPILE)gcc
--AR = $(CROSS_COMPILE)ar
-+CC ?= $(CROSS_COMPILE)gcc
-+AR ?= $(CROSS_COMPILE)ar
- 
- OBJDIR = bld
- 
--- 
-2.43.0
-
diff --git a/meta/recipes-rt/rt-tests/rt-tests_git.bb 
b/meta/recipes-rt/rt-tests/rt-tests_git.bb
index aea3d82e202..d722755f522 100644
--- a/meta/recipes-rt/rt-tests/rt-tests_git.bb
+++ b/meta/recipes-rt/rt-tests/rt-tests_git.bb
@@ -12,7 +12,6 @@ inherit ptest
 SRC_URI += " \
             file://run-ptest \
             file://rt_bmark.py \
-            file://0001-Makefile-Allow-for-CC-and-AR-to-be-overridden.patch \
            "
 
 # rt-tests needs PI mutex support in libc
@@ -21,6 +20,11 @@ COMPATIBLE_HOST:libc-musl = 'null'
 # Do not install hwlatdetect
 EXTRA_OEMAKE += "PYLIB=''"
 
+# Upstream Makefile hardcodes CC/AR with '=' (git.kernel.org rt-tests commit
+# 7763cf316d78). Pass them as make command-line args so they override those
+# assignments, avoiding a local Makefile patch.
+EXTRA_OEMAKE += "CC='${CC}' AR='${AR}'"
+
 do_install() {
         oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
                            INCLUDEDIR=${includedir}
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#246606): 
https://lists.openembedded.org/g/openembedded-core/message/246606
Mute This Topic: https://lists.openembedded.org/mt/121423253/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to