Commit 560f70dc authored by lio's avatar lio Committed by Philippe Gerum
Browse files

libevl: fix the compile failed caused by the Wshadow flag



Libevl use *-Wshadow=local* flags in config.mk. However this flag is
only valid when version >=7, otherwise gcc will complain :
"unrecognized command line option ‘-Wshadow=local’; did you mean
‘-Wshadow-ivar’?"
and compile will be failed.

This patch fix this probelm.
Signed-off-by: default avatarlio <liu.hailong6@zte.com.cn>
Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
parent 2fe7e817
......@@ -61,12 +61,19 @@ endif
BASE_CPPFLAGS := -D_GNU_SOURCE -D_REENTRANT $(DEBUG_CPPFLAGS)
GCCVER_GTE_7 := $(shell expr `${CC} -dumpversion | cut -f1 -d.` \>= 7)
ifeq "$(GCCVER_GTE_7)" "1"
WSHADOW_FLAG="-Wshadow=local"
else
WSHADOW_FLAG=
endif
BASE_CFLAGS := -pipe -fstrict-aliasing \
-Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long \
-Wno-unused-parameter -Wshadow=local -Werror $(DEBUG_CFLAGS)
-Wno-unused-parameter ${WSHADOW_FLAG} -Werror $(DEBUG_CFLAGS)
BASE_CXXFLAGS := -pipe -fstrict-aliasing -Wall -Wno-long-long \
-Wno-unused-parameter -Wshadow=local -Werror $(DEBUG_CFLAGS)
-Wno-unused-parameter ${WSHADOW_FLAG} -Werror $(DEBUG_CFLAGS)
# Easy way to hide commas in args from $(call ...) invocations
comma := ,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment