summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-12-22 13:01:32 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-12-22 13:03:46 +0000
commit2fb74b1ae9fdd0c7b3b69187197895c78bf3c6a7 (patch)
tree98656f2727a2b836ae6f85cf401d2f8dc75445f0
parent903dd3fe075104d4e656c57949bc32b1b9a74e8b (diff)
build hunspell with _GLIBCXX_DEBUG
Change-Id: Ida2ce221f1e35afd946545c2a36b72dd2386e7dd
-rw-r--r--configure.ac5
-rw-r--r--external/hunspell/ExternalProject_hunspell.mk13
2 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 71462316b73d..8cf2b2510e97 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3877,6 +3877,11 @@ if test -n "$enable_dbgutil" -a "$enable_dbgutil" != "no"; then
else
with_system_libgltf=no
fi
+ if test "$with_system_hunspell" = "yes"; then
+ AC_MSG_ERROR([--with-system-hunspell conflicts with --enable-dbgutil])
+ else
+ with_system_hunspell=no
+ fi
else
ENABLE_DBGUTIL=""
MSVC_USE_DEBUG_RUNTIME=""
diff --git a/external/hunspell/ExternalProject_hunspell.mk b/external/hunspell/ExternalProject_hunspell.mk
index 160f2b1864fd..393031bca36d 100644
--- a/external/hunspell/ExternalProject_hunspell.mk
+++ b/external/hunspell/ExternalProject_hunspell.mk
@@ -13,6 +13,18 @@ $(eval $(call gb_ExternalProject_register_targets,hunspell,\
build \
))
+hunspell_CXXFLAGS=$(CXXFLAGS)
+
+ifneq (,$(filter ANDROID DRAGONFLY FREEBSD IOS LINUX NETBSD OPENBSD,$(OS)))
+ifneq (,$(gb_ENABLE_DBGUTIL))
+hunspell_CXXFLAGS+=-D_GLIBCXX_DEBUG
+endif
+endif
+
+ifneq (,$(debug))
+hunspell_CXXFLAGS+=-g
+endif
+
$(call gb_ExternalProject_get_state_target,hunspell,build):
$(call gb_ExternalProject_run,build,\
LIBS="$(gb_STDLIBS) $(LIBS)" \
@@ -20,6 +32,7 @@ $(call gb_ExternalProject_get_state_target,hunspell,build):
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM))\
$(if $(filter AIX,$(OS)),CFLAGS="-D_LINUX_SOURCE_COMPAT") \
$(if $(filter-out WNTGCC,$(OS)$(COM)),,LDFLAGS="-Wl,--enable-runtime-pseudo-reloc-v2") \
+ CXXFLAGS="$(hunspell_CXXFLAGS)" \
&& $(MAKE) \
)