1
0

901-bundled-libs-cflags.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --- a/libtomcrypt/makefile_include.mk
  2. +++ b/libtomcrypt/makefile_include.mk
  3. @@ -75,6 +75,13 @@ endif
  4. LTC_CFLAGS += -Wno-type-limits
  5. +ifdef LIBRECMC_BUILD
  6. + ifeq (-Os,$(filter -Os,$(CFLAGS)))
  7. + LTC_CFLAGS += -DLTC_SMALL_CODE
  8. + endif
  9. +else
  10. + ### ! LIBRECMC_BUILD
  11. +
  12. ifdef LTC_DEBUG
  13. $(info Debug build)
  14. # compile for DEBUGGING (required for ccmalloc checking!!!)
  15. @@ -102,6 +109,9 @@ endif
  16. endif # COMPILE_SMALL
  17. endif # COMPILE_DEBUG
  18. + ### ! LIBRECMC_BUILD
  19. +endif
  20. +
  21. ifneq ($(findstring clang,$(CC)),)
  22. LTC_CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header -Wno-missing-field-initializers
  23. --- a/libtommath/makefile_include.mk
  24. +++ b/libtommath/makefile_include.mk
  25. @@ -37,6 +37,9 @@ CFLAGS += -Wsystem-headers -Wdeclaration
  26. CFLAGS += -Wstrict-prototypes -Wpointer-arith
  27. endif
  28. +ifndef LIBRECMC_BUILD
  29. + ### ! LIBRECMC_BUILD
  30. +
  31. ifdef COMPILE_DEBUG
  32. #debug
  33. CFLAGS += -g3
  34. @@ -58,6 +61,9 @@ endif
  35. endif # COMPILE_SIZE
  36. endif # COMPILE_DEBUG
  37. + ### ! LIBRECMC_BUILD
  38. +endif
  39. +
  40. ifneq ($(findstring clang,$(CC)),)
  41. CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header
  42. endif