0011-extlinux-Use-the-host-toolchain-to-build.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From 4df2e7c0ae84bfbdba0ed285c0664aa089b38b7e Mon Sep 17 00:00:00 2001
  2. From: Carlos Santos <casantos@datacom.ind.br>
  3. Date: Sat, 30 Sep 2017 19:49:55 -0300
  4. Subject: [PATCH] extlinux: Use the host toolchain to build.
  5. It is meant to run on the host machine, hence must be built using the
  6. host toolchain.
  7. Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
  8. ---
  9. extlinux/Makefile | 12 ++++++------
  10. 1 file changed, 6 insertions(+), 6 deletions(-)
  11. diff --git a/extlinux/Makefile b/extlinux/Makefile
  12. index 02d1db51..5c4baa5a 100644
  13. --- a/extlinux/Makefile
  14. +++ b/extlinux/Makefile
  15. @@ -18,9 +18,9 @@ include $(MAKEDIR)/syslinux.mk
  16. OPTFLAGS = -g -Os
  17. INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libinstaller
  18. -CFLAGS = $(GCCWARN) -Wno-sign-compare -D_FILE_OFFSET_BITS=64 \
  19. +CFLAGS = $(CFLAGS_FOR_BUILD) $(GCCWARN) -Wno-sign-compare -D_FILE_OFFSET_BITS=64 \
  20. $(OPTFLAGS) $(INCLUDES)
  21. -LDFLAGS =
  22. +LDFLAGS = $(LDFLAGS_FOR_BUILD)
  23. SRCS = main.c \
  24. mountinfo.c \
  25. @@ -52,16 +52,16 @@ spotless: clean
  26. installer: extlinux
  27. extlinux: $(OBJS)
  28. - $(CC) $(LDFLAGS) -o $@ $^
  29. + $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^
  30. strip:
  31. $(STRIP) extlinux
  32. %.o: %.c
  33. - $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
  34. + $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
  35. %.i: %.c
  36. - $(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
  37. + $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
  38. %.s: %.c
  39. - $(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
  40. + $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
  41. -include .*.d
  42. --
  43. 2.13.5