I've tried to change optimization level in mk.conf (by setting COPTS+=-Og, for example) and it turned out that with that level, gcc starts to generate warnings where there weren't any with -O2, and the build fails because of -Werror everywhere.
Adding `COPTS+=-Og -Wno-error` has no effect as -Werror is added after COPTS. My hack was to put -Wno-error into CPUFLAGS (the build then proceeds to the end). Is there a sane way to do the same?