[U-Boot] [PATCH 1/1] efi_loader: fix build error for freestanding.o

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.
Symbolic links may be ugly but this solution avoids the build error.
Fixes: f51a226436a87 ("efi_loader: provide freestanding library") Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de --- lib/efi_selftest/efi_freestanding.c | 1 + scripts/Makefile.lib | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 120000 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 120000 index 00000000000..4b7edd52bd9 --- /dev/null +++ b/lib/efi_selftest/efi_freestanding.c @@ -0,0 +1 @@ +../efi_loader/efi_freestanding.c \ No newline at end of file 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

On Thu, Mar 14, 2019 at 8:43 AM Heinrich Schuchardt xypron.glpk@gmx.de 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.
Symbolic links may be ugly but this solution avoids the build error.
Fixes: f51a226436a87 ("efi_loader: provide freestanding library") Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
lib/efi_selftest/efi_freestanding.c | 1 + scripts/Makefile.lib | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 120000 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 120000 index 00000000000..4b7edd52bd9 --- /dev/null +++ b/lib/efi_selftest/efi_freestanding.c @@ -0,0 +1 @@ +../efi_loader/efi_freestanding.c
\ No newline at end of file
^^^
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
U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

On 3/14/19 8:19 AM, Andy Shevchenko wrote:
On Thu, Mar 14, 2019 at 8:43 AM Heinrich Schuchardt xypron.glpk@gmx.de 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.
Symbolic links may be ugly but this solution avoids the build error.
Fixes: f51a226436a87 ("efi_loader: provide freestanding library") Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
lib/efi_selftest/efi_freestanding.c | 1 + scripts/Makefile.lib | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 120000 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 120000 index 00000000000..4b7edd52bd9 --- /dev/null +++ b/lib/efi_selftest/efi_freestanding.c @@ -0,0 +1 @@ +../efi_loader/efi_freestanding.c
\ No newline at end of file
^^^
Hello Andy,
on my machine this patch creates a symbolic link file. Did you have any problem applying it?
Best regards
Heinrich
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
U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

On Thu, Mar 14, 2019 at 7:17 PM Heinrich Schuchardt xypron.glpk@gmx.de wrote:
On 3/14/19 8:19 AM, Andy Shevchenko wrote:
On Thu, Mar 14, 2019 at 8:43 AM Heinrich Schuchardt xypron.glpk@gmx.de wrote:
new file mode 120000 index 00000000000..4b7edd52bd9 --- /dev/null +++ b/lib/efi_selftest/efi_freestanding.c @@ -0,0 +1 @@ +../efi_loader/efi_freestanding.c
\ No newline at end of file
^^^
Hello Andy,
on my machine this patch creates a symbolic link file. Did you have any problem applying it?
Isn't better to create a simple oneliner C-file then?
#include "../efi_loader/efi_freestanding.c"
?
P.S. Symbolic or other links are a property of FS where you build the code on. So, it should go via make rather then Git for my opinion.

On 3/14/19 8:46 PM, Andy Shevchenko wrote:
On Thu, Mar 14, 2019 at 7:17 PM Heinrich Schuchardt xypron.glpk@gmx.de wrote:
On 3/14/19 8:19 AM, Andy Shevchenko wrote:
On Thu, Mar 14, 2019 at 8:43 AM Heinrich Schuchardt xypron.glpk@gmx.de wrote:
new file mode 120000 index 00000000000..4b7edd52bd9 --- /dev/null +++ b/lib/efi_selftest/efi_freestanding.c @@ -0,0 +1 @@ +../efi_loader/efi_freestanding.c
\ No newline at end of file
^^^
Hello Andy,
on my machine this patch creates a symbolic link file. Did you have any problem applying it?
Isn't better to create a simple oneliner C-file then?
#include "../efi_loader/efi_freestanding.c"
?
P.S. Symbolic or other links are a property of FS where you build the code on. So, it should go via make rather then Git for my opinion.
Thanks for your suggestion. I remember Alex felt uncomfortable with dynamic link files. And obviously deep relative paths are not well supported by make either. I will give it a try.
Best regards
Heinrich
participants (2)
-
Andy Shevchenko
-
Heinrich Schuchardt