build: introduce GCC_CXXFLAGS
The patch "compositor-android: fix build flags" started using GCC_CFLAGS for C++ files, too. That lead to the following warnings when building a C++ file: cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ cc1plus: warning: command line option "-Wmissing-prototypes" is valid for Ada/C/ObjC but not for C++ Introduce GCC_CXXFLAGS, similar to GCC_CFLAGS, but for C++, avoiding the problematic compiler flags. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
committed by
Kristian Høgsberg
parent
d95222e56f
commit
15643f627d
+6
-4
@@ -206,12 +206,14 @@ AM_CONDITIONAL(HAVE_RSVG_CONVERT, test -n "$RSVG_CONVERT")
|
|||||||
|
|
||||||
|
|
||||||
if test "x$GCC" = "xyes"; then
|
if test "x$GCC" = "xyes"; then
|
||||||
GCC_CFLAGS="-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \
|
my_common_gcc_flags="-Wall -Wextra -Wno-unused-parameter \
|
||||||
-Wno-unused-parameter -Wno-missing-field-initializers \
|
-Wno-missing-field-initializers -g -fvisibility=hidden"
|
||||||
-g -fvisibility=hidden"
|
GCC_CFLAGS="$my_common_gcc_flags \
|
||||||
|
-Wstrict-prototypes -Wmissing-prototypes"
|
||||||
|
GCC_CXXFLAGS="$my_common_gcc_flags"
|
||||||
fi
|
fi
|
||||||
AC_SUBST(GCC_CFLAGS)
|
AC_SUBST(GCC_CFLAGS)
|
||||||
|
AC_SUBST(GCC_CXXFLAGS)
|
||||||
|
|
||||||
WAYLAND_SCANNER_RULES(['$(top_srcdir)/protocol'])
|
WAYLAND_SCANNER_RULES(['$(top_srcdir)/protocol'])
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -130,7 +130,7 @@ android_backend = android-backend.la
|
|||||||
android_backend_la_LDFLAGS = -module -avoid-version
|
android_backend_la_LDFLAGS = -module -avoid-version
|
||||||
android_backend_la_LIBADD = $(COMPOSITOR_LIBS)
|
android_backend_la_LIBADD = $(COMPOSITOR_LIBS)
|
||||||
android_backend_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
|
android_backend_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
|
||||||
android_backend_la_CXXFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
|
android_backend_la_CXXFLAGS = $(GCC_CXXFLAGS) $(COMPOSITOR_CFLAGS)
|
||||||
android_backend_la_SOURCES = \
|
android_backend_la_SOURCES = \
|
||||||
compositor-android.c \
|
compositor-android.c \
|
||||||
android-framebuffer.cpp \
|
android-framebuffer.cpp \
|
||||||
|
|||||||
Reference in New Issue
Block a user