summaryrefslogtreecommitdiffstats
path: root/external/meta-virtualization/recipes-extended/kvmtool/files/external-crosscompiler.patch
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-virtualization/recipes-extended/kvmtool/files/external-crosscompiler.patch')
-rw-r--r--external/meta-virtualization/recipes-extended/kvmtool/files/external-crosscompiler.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/external/meta-virtualization/recipes-extended/kvmtool/files/external-crosscompiler.patch b/external/meta-virtualization/recipes-extended/kvmtool/files/external-crosscompiler.patch
new file mode 100644
index 00000000..75cef3b1
--- /dev/null
+++ b/external/meta-virtualization/recipes-extended/kvmtool/files/external-crosscompiler.patch
@@ -0,0 +1,31 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+This allows OpenEmbedded to pass in cross compiler configuration using
+the default envirnment variables. It is required so that kvmtool can
+be linked against the cross-compiled libfdt library.
+
+diff --git a/Makefile b/Makefile
+index 1f0196f..8bfb068 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,11 +14,6 @@ export E Q
+ include config/utilities.mak
+ include config/feature-tests.mak
+
+-CC := $(CROSS_COMPILE)gcc
+-CFLAGS :=
+-LD := $(CROSS_COMPILE)ld
+-LDFLAGS :=
+-
+ FIND := find
+ CSCOPE := cscope
+ TAGS := ctags
+@@ -297,7 +292,7 @@ $(warning No static libc found. Skipping guest init)
+ endif
+
+ ifeq (y,$(ARCH_WANT_LIBFDT))
+- ifneq ($(call try-build,$(SOURCE_LIBFDT),$(CFLAGS),-lfdt),y)
++ ifneq ($(call try-build,$(SOURCE_LIBFDT),$(CPPFLAGS) $(CFLAGS),-lfdt),y)
+ $(error No libfdt found. Please install libfdt-dev package)
+ else
+ CFLAGS_DYNOPT += -DCONFIG_HAS_LIBFDT