diff --git a/common.mak b/common.mak
index e94e98e639b2a4a88e50f881a3fb1e948a186cc3..c4d5f2be0c3a9d48f1829177146e83d0d09bf82b 100644
--- a/common.mak
+++ b/common.mak
@@ -20,6 +20,7 @@ endif
 ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
 
 CPPFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS)
+CFLAGS   += $(ECFLAGS)
 
 %.o: %.c
 	$(CCDEP)
@@ -54,7 +55,7 @@ endif
 
 OBJS-$(HAVE_MMX) +=  $(MMX-OBJS-yes)
 
-CFLAGS    += $(CFLAGS-yes) $(ECFLAGS)
+CFLAGS    += $(CFLAGS-yes)
 OBJS      += $(OBJS-yes)
 FFLIBS    := $(FFLIBS-yes) $(FFLIBS)
 TESTPROGS += $(TESTPROGS-yes)