2019-03-25 18:41:27 +00:00
|
|
|
--- a/libtomcrypt/makefile_include.mk
|
|
|
|
+++ b/libtomcrypt/makefile_include.mk
|
2020-06-21 12:36:47 +00:00
|
|
|
@@ -94,6 +94,13 @@ endif
|
2019-03-25 18:41:27 +00:00
|
|
|
|
|
|
|
LTC_CFLAGS += -Wno-type-limits
|
|
|
|
|
|
|
|
+ifdef OPENWRT_BUILD
|
|
|
|
+ ifeq (-Os,$(filter -Os,$(CFLAGS)))
|
|
|
|
+ LTC_CFLAGS += -DLTC_SMALL_CODE
|
|
|
|
+ endif
|
|
|
|
+else
|
|
|
|
+ ### ! OPENWRT_BUILD
|
|
|
|
+
|
|
|
|
ifdef LTC_DEBUG
|
|
|
|
$(info Debug build)
|
|
|
|
# compile for DEBUGGING (required for ccmalloc checking!!!)
|
2020-06-21 12:36:47 +00:00
|
|
|
@@ -121,6 +128,9 @@ endif
|
2019-03-25 18:41:27 +00:00
|
|
|
endif # COMPILE_SMALL
|
|
|
|
endif # COMPILE_DEBUG
|
|
|
|
|
|
|
|
+ ### ! OPENWRT_BUILD
|
|
|
|
+endif
|
|
|
|
+
|
|
|
|
|
|
|
|
ifneq ($(findstring clang,$(CC)),)
|
|
|
|
LTC_CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header -Wno-missing-field-initializers
|
|
|
|
--- a/libtommath/makefile_include.mk
|
|
|
|
+++ b/libtommath/makefile_include.mk
|
2020-06-21 12:36:47 +00:00
|
|
|
@@ -70,6 +70,9 @@ else
|
|
|
|
LTM_CFLAGS += -Wsystem-headers
|
2019-03-25 18:41:27 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
+ifndef OPENWRT_BUILD
|
|
|
|
+ ### ! OPENWRT_BUILD
|
|
|
|
+
|
|
|
|
ifdef COMPILE_DEBUG
|
|
|
|
#debug
|
2020-06-21 12:36:47 +00:00
|
|
|
LTM_CFLAGS += -g3
|
|
|
|
@@ -90,6 +93,9 @@ endif
|
|
|
|
|
2019-03-25 18:41:27 +00:00
|
|
|
endif # COMPILE_SIZE
|
|
|
|
|
|
|
|
+ ### ! OPENWRT_BUILD
|
|
|
|
+endif
|
|
|
|
+
|
|
|
|
ifneq ($(findstring clang,$(CC)),)
|
2020-06-21 12:36:47 +00:00
|
|
|
LTM_CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header
|
2019-03-25 18:41:27 +00:00
|
|
|
endif
|