]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: fix build error for freestanding.o
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 11 Mar 2019 21:04:51 +0000 (22:04 +0100)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 14 Mar 2019 20:03:14 +0000 (21:03 +0100)
Since commit f51a226436a87 ("efi_loader: provide freestanding library") in
parallel builds errors

    lib/efi_selftest/../efi_loader/efi_freestanding.o:
    file not recognized: File truncated

occur. Obviously make cannot correctly sequence parallel builds with a
dependency like ../efi_loader/efi_freestanding.o.

Fixes: f51a226436a87 ("efi_loader: provide freestanding library")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_selftest/efi_freestanding.c [new file with mode: 0644]
scripts/Makefile.lib

diff --git a/lib/efi_selftest/efi_freestanding.c b/lib/efi_selftest/efi_freestanding.c
new file mode 100644 (file)
index 0000000..4b6c27e
--- /dev/null
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Library for freestanding binary
+ *
+ * Copyright 2019, Heinrich Schuchardt <xypron.glpk@gmx.de>
+ *
+ * GCC requires that freestanding programs provide memcpy(), memmove(),
+ * memset(), and memcmp().
+ */
+
+#include "../efi_loader/efi_freestanding.c"
index ec5c41ec561627f94878879f38e9344d79e263a9..70de9bb13a665c68de0c66193d04b0548cf0cfa2 100644 (file)
@@ -390,7 +390,7 @@ $(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcoun
        $(call cmd,force_checksrc)
        $(call if_changed_rule,cc_o_c)
 
-$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/../efi_loader/efi_freestanding.o
+$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
        $(call cmd,efi_ld)
 
 # ACPI