0001-fix-makefile.patch 1.1 KB

123456789101112131415161718192021222324252627282930
  1. Enforce correct -march option
  2. Buildroot uses a normal ARM compiler to build the AM33X CM3 firmware
  3. (which runs on a Cortex-M3 processor), but Buildroot will have a
  4. default -march value that doesn't necessarily match the one needed for
  5. Cortex-M3, leading to build failures (gcc complains that the
  6. -mcpu=cortex-m3 option being passed is not compatible with the
  7. selected -march).
  8. Fix this by explicitly indicating -march=armv7-m.
  9. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  10. Updated the patch to the latest version of the Makefile
  11. Signed-off-by: Anders Darander <anders@chargestorm.se>
  12. Index: b/Makefile
  13. ===================================================================
  14. --- a/Makefile
  15. +++ b/Makefile
  16. @@ -13,7 +13,7 @@ SRCDIR = src
  17. BINDIR = bin
  18. INCLUDES = $(SRCDIR)/include
  19. -CFLAGS =-mcpu=cortex-m3 -mthumb -nostdlib -Wall -Wundef \
  20. +CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -Wall -Wundef \
  21. -Werror-implicit-function-declaration -Wstrict-prototypes \
  22. -Wdeclaration-after-statement -fno-delete-null-pointer-checks \
  23. -Wempty-body -fno-strict-overflow -g -I$(INCLUDES) -O2