nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0134-Fix-undefined-references-for-fdt-when-building-with-.patch

8e15ce
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8e15ce
From: Javier Martinez Canillas <javierm@redhat.com>
8e15ce
Date: Wed, 1 May 2019 00:36:19 +0200
8e15ce
Subject: [PATCH] Fix undefined references for fdt when building with platform
8e15ce
 emu
8e15ce
8e15ce
The fdt module isn't build for this platform, so adding the declarations
8e15ce
with platform emu will lead to the following undefined reference errors:
8e15ce
8e15ce
BUILDSTDERR: /usr/bin/ld: grub_emu_lite-symlist.o:(.data+0x500): undefined reference to `grub_fdt_add_subnode'
8e15ce
BUILDSTDERR: /usr/bin/ld: grub_emu_lite-symlist.o:(.data+0x518): undefined reference to `grub_fdt_check_header'
8e15ce
BUILDSTDERR: /usr/bin/ld: grub_emu_lite-symlist.o:(.data+0x530): undefined reference to `grub_fdt_check_header_nosize'
8e15ce
BUILDSTDERR: /usr/bin/ld: grub_emu_lite-symlist.o:(.data+0x548): undefined reference to `grub_fdt_create_empty_tree'
8e15ce
BUILDSTDERR: /usr/bin/ld: grub_emu_lite-symlist.o:(.data+0x560): undefined reference to `grub_fdt_find_subnode'
8e15ce
BUILDSTDERR: /usr/bin/ld: grub_emu_lite-symlist.o:(.data+0x578): undefined reference to `grub_fdt_first_node'
8e15ce
BUILDSTDERR: /usr/bin/ld: grub_emu_lite-symlist.o:(.data+0x590): undefined reference to `grub_fdt_get_nodename'
8e15ce
BUILDSTDERR: /usr/bin/ld: grub_emu_lite-symlist.o:(.data+0x5a8): undefined reference to `grub_fdt_get_prop'
8e15ce
BUILDSTDERR: /usr/bin/ld: grub_emu_lite-symlist.o:(.data+0x5c0): undefined reference to `grub_fdt_next_node'
8e15ce
BUILDSTDERR: /usr/bin/ld: grub_emu_lite-symlist.o:(.data+0x5d8): undefined reference to `grub_fdt_set_prop'
8e15ce
BUILDSTDERR: collect2: error: ld returned 1 exit status
8e15ce
BUILDSTDERR: make[1]: *** [Makefile:27093: grub-emu-lite] Error 1
8e15ce
BUILDSTDERR: make[1]: *** Waiting for unfinished jobs....
8e15ce
8e15ce
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
8e15ce
---
8e15ce
 include/grub/fdt.h | 2 +-
8e15ce
 1 file changed, 1 insertion(+), 1 deletion(-)
8e15ce
8e15ce
diff --git a/include/grub/fdt.h b/include/grub/fdt.h
8e15ce
index 22b7c5463fc..2041341fd68 100644
8e15ce
--- a/include/grub/fdt.h
8e15ce
+++ b/include/grub/fdt.h
8e15ce
@@ -19,7 +19,7 @@
8e15ce
 #ifndef GRUB_FDT_HEADER
8e15ce
 #define GRUB_FDT_HEADER	1
8e15ce
 
8e15ce
-#if defined(__arm__) || defined(__aarch64__)
8e15ce
+#if !defined(GRUB_MACHINE_EMU) && (defined(__arm__) || defined(__aarch64__))
8e15ce
 
8e15ce
 #include <grub/types.h>
8e15ce
 #include <grub/symbol.h>