summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-02-12 17:37:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-02-12 21:12:26 +0000
commit804287e4ab0ae0e9f5d61446b473c9cd985e9674 (patch)
tree46f6348429efce2ea834a810063c98ecc24f67a2
parent1425067797fd8e75d7b44ef6fa72bfe995197419 (diff)
Resolves: tdf#105426 helpful to actually let the compiler optimize hunspell
*facepalm* Change-Id: I5f6d6cb94e1a80d2d7ae96900517aae3c8f39f08 Reviewed-on: https://gerrit.libreoffice.org/34176 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--external/hunspell/ExternalProject_hunspell.mk11
1 files changed, 4 insertions, 7 deletions
diff --git a/external/hunspell/ExternalProject_hunspell.mk b/external/hunspell/ExternalProject_hunspell.mk
index 4c3b74d5965c..984485fc2a2c 100644
--- a/external/hunspell/ExternalProject_hunspell.mk
+++ b/external/hunspell/ExternalProject_hunspell.mk
@@ -13,18 +13,14 @@ $(eval $(call gb_ExternalProject_register_targets,hunspell,\
build \
))
-hunspell_CXXFLAGS=$(CXXFLAGS)
+hunspell_CPPCLAGS=$(CPPFLAGS)
ifneq (,$(filter ANDROID DRAGONFLY FREEBSD IOS LINUX NETBSD OPENBSD,$(OS)))
ifneq (,$(gb_ENABLE_DBGUTIL))
-hunspell_CXXFLAGS+=-D_GLIBCXX_DEBUG
+hunspell_CPPFLAGS+=-D_GLIBCXX_DEBUG
endif
endif
-ifneq (,$(debug))
-hunspell_CXXFLAGS+=-g
-endif
-
$(call gb_ExternalProject_get_state_target,hunspell,build):
$(call gb_ExternalProject_run,build,\
$(if $(filter IOS MACOSX,$(OS)),ACLOCAL="aclocal -I $(SRCDIR)/m4/mac") \
@@ -33,7 +29,8 @@ $(call gb_ExternalProject_get_state_target,hunspell,build):
$(SHELL) ./configure --disable-shared --disable-nls --with-pic \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM))\
$(if $(filter AIX,$(OS)),CFLAGS="-D_LINUX_SOURCE_COMPAT") \
- CXXFLAGS="$(hunspell_CXXFLAGS)" \
+ $(if $(hunspell_CPPFLAGS),CPPFLAGS='$(hunspell_CPPFLAGS)') \
+ CXXFLAGS="$(CXXFLAGS) $(if $(debug),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CXXFLAGS),$(gb_COMPILEROPTFLAGS))" \
&& cd src/hunspell && $(MAKE) \
)