All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/1] efi_loader: fix build error for freestanding.o
@ 2019-03-14 20:13 Heinrich Schuchardt
  2019-03-14 20:16 ` Tom Rini
  2019-03-14 21:20 ` Andy Shevchenko
  0 siblings, 2 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2019-03-14 20:13 UTC (permalink / raw)
  To: u-boot

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>
---
v2
	use #include instead of symbolic link as suggested by Andy
---
 lib/efi_selftest/efi_freestanding.c | 11 +++++++++++
 scripts/Makefile.lib                |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)
 create mode 100644 lib/efi_selftest/efi_freestanding.c

diff --git a/lib/efi_selftest/efi_freestanding.c b/lib/efi_selftest/efi_freestanding.c
new file mode 100644
index 00000000000..4b6c27e99fb
--- /dev/null
+++ b/lib/efi_selftest/efi_freestanding.c
@@ -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"
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index ec5c41ec561..70de9bb13a6 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -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
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH v2 1/1] efi_loader: fix build error for freestanding.o
  2019-03-14 20:13 [U-Boot] [PATCH v2 1/1] efi_loader: fix build error for freestanding.o Heinrich Schuchardt
@ 2019-03-14 20:16 ` Tom Rini
  2019-03-14 21:20 ` Andy Shevchenko
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2019-03-14 20:16 UTC (permalink / raw)
  To: u-boot

On Thu, Mar 14, 2019 at 09:13:34PM +0100, Heinrich Schuchardt wrote:

> 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>

Looking around, using #include is the way we've solved this kind of
problem elsewhere too, so:
Reviewed-by: Tom Rini <trini@konsulko.com>

And please put together a PR soon, I've hit this problem a few times
locally today :)  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190314/62d9d906/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH v2 1/1] efi_loader: fix build error for freestanding.o
  2019-03-14 20:13 [U-Boot] [PATCH v2 1/1] efi_loader: fix build error for freestanding.o Heinrich Schuchardt
  2019-03-14 20:16 ` Tom Rini
@ 2019-03-14 21:20 ` Andy Shevchenko
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2019-03-14 21:20 UTC (permalink / raw)
  To: u-boot

On Thu, Mar 14, 2019 at 09:13:34PM +0100, Heinrich Schuchardt wrote:
> 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.
> 

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Fixes: f51a226436a87 ("efi_loader: provide freestanding library")
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> v2
> 	use #include instead of symbolic link as suggested by Andy
> ---
>  lib/efi_selftest/efi_freestanding.c | 11 +++++++++++
>  scripts/Makefile.lib                |  2 +-
>  2 files changed, 12 insertions(+), 1 deletion(-)
>  create mode 100644 lib/efi_selftest/efi_freestanding.c
> 
> diff --git a/lib/efi_selftest/efi_freestanding.c b/lib/efi_selftest/efi_freestanding.c
> new file mode 100644
> index 00000000000..4b6c27e99fb
> --- /dev/null
> +++ b/lib/efi_selftest/efi_freestanding.c
> @@ -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"
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index ec5c41ec561..70de9bb13a6 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -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
> -- 
> 2.20.1
> 

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-14 21:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-14 20:13 [U-Boot] [PATCH v2 1/1] efi_loader: fix build error for freestanding.o Heinrich Schuchardt
2019-03-14 20:16 ` Tom Rini
2019-03-14 21:20 ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.