0001-efivar-isolate-makeguids-host-tool-build.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From e1c3734bab27fd850b4ac6681d219ceaf0637616 Mon Sep 17 00:00:00 2001
  2. From: Erico Nunes <nunes.erico@gmail.com>
  3. Date: Mon, 3 Oct 2022 18:16:55 +0200
  4. Subject: [PATCH] efivar: isolate makeguids host tool build
  5. efivar build includes a 'makeguids' host tool which is normally built by
  6. distributions during the package build step. This is unfortunately not
  7. written with cross-compilation in mind, since it needs to build for the
  8. host architecture, including the build of object files which it then
  9. assumes can be linked into the target library.
  10. To make the packaging process simpler for a cross-compilation system
  11. like Buildroot, separate the 'makeguids' tool build to an explicit make
  12. target and remove target build dependencies from it.
  13. This way, Buildroot can build the tool separately in a host build step
  14. and the target build step can then be straightforward.
  15. Upstream: Not applicable (does not support cross compilation)
  16. Signed-off-by: Julien Olivain <ju.o@free.fr>
  17. [Julien: rebased patch to version 39]
  18. Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
  19. ---
  20. src/Makefile | 5 ++---
  21. 1 file changed, 2 insertions(+), 3 deletions(-)
  22. diff --git a/src/Makefile b/src/Makefile
  23. index 6fc2a62..7fa63c6 100644
  24. --- a/src/Makefile
  25. +++ b/src/Makefile
  26. @@ -70,7 +70,6 @@ makeguids : LDFLAGS=$(HOST_LDFLAGS)
  27. makeguids : CCLDFLAGS=$(HOST_CCLDFLAGS)
  28. makeguids : $(MAKEGUIDS_OBJECTS)
  29. -$(MAKEGUIDS_OUTPUT) : makeguids
  30. $(MAKEGUIDS_OUTPUT) : guids.txt
  31. @set -e ; \
  32. missing=no ; \
  33. @@ -83,9 +82,9 @@ $(MAKEGUIDS_OUTPUT) : guids.txt
  34. if [ "$${missing}" != "no" ]; then \
  35. exit 1 ; \
  36. fi
  37. - ./makeguids guids.txt guid-symbols.c include/efivar/efivar-guids.h
  38. + makeguids guids.txt guid-symbols.c include/efivar/efivar-guids.h
  39. -prep : makeguids $(GENERATED_SOURCES)
  40. +prep : $(GENERATED_SOURCES)
  41. $(LIBEFIVAR_OBJECTS) $(LIBEFIBOOT_OBJECTS) : include/efivar/efivar-guids.h
  42. --
  43. 2.44.0