summaryrefslogtreecommitdiff
path: root/lang/micropython/files/patch-mpy-cross_Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lang/micropython/files/patch-mpy-cross_Makefile')
-rw-r--r--lang/micropython/files/patch-mpy-cross_Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/lang/micropython/files/patch-mpy-cross_Makefile b/lang/micropython/files/patch-mpy-cross_Makefile
new file mode 100644
index 000000000000..c3df9d6e5083
--- /dev/null
+++ b/lang/micropython/files/patch-mpy-cross_Makefile
@@ -0,0 +1,26 @@
+* Avoid making all warnings into errors
+* Extra optimizations via COPT should be overwritable
+
+--- mpy-cross/Makefile.orig 2021-09-01 14:07:13 UTC
++++ mpy-cross/Makefile
+@@ -17,7 +17,7 @@ INC += -I$(BUILD)
+ INC += -I$(TOP)
+
+ # compiler settings
+-CWARN = -Wall -Werror
++CWARN = -Wall
+ CWARN += -Wextra -Wno-unused-parameter -Wpointer-arith
+ CFLAGS = $(INC) $(CWARN) -std=gnu99 $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
+ CFLAGS += -fdata-sections -ffunction-sections -fno-asynchronous-unwind-tables
+@@ -25,9 +25,9 @@ CFLAGS += -fdata-sections -ffunction-sections -fno-asy
+ # Debugging/Optimization
+ ifdef DEBUG
+ CFLAGS += -g
+-COPT = -O0
++COPT ?= -O0
+ else
+-COPT = -Os #-DNDEBUG
++COPT ?= -Os #-DNDEBUG
+ endif
+
+ # On OSX, 'gcc' is a symlink to clang unless a real gcc is installed.