[Libreoffice-commits] core.git: configure.ac external/nss solenv/gbuild
Stephan Bergmann
sbergman at redhat.com
Fri Aug 8 07:08:01 PDT 2014
configure.ac | 14 +++++++-------
external/nss/UnpackedTarball_nss.mk | 4 +++-
solenv/gbuild/JunitTest.mk | 2 +-
solenv/gbuild/platform/linux.mk | 10 ++++++----
4 files changed, 17 insertions(+), 13 deletions(-)
New commits:
commit 5ab1098d5fbc1ba092da73af2b92e5bcdd7a3f8d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Aug 8 16:07:24 2014 +0200
Generalize -fsanitize=address checks
...that are at least also relevant for -fsanitize=undefined
Change-Id: I39044d2a73912a605af8e965eb1cdf8dfd4f0051
diff --git a/configure.ac b/configure.ac
index dc9f86a..38c2ea9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1021,9 +1021,8 @@ AC_ARG_ENABLE(runtime-optimizations,
[Statically disable certain runtime optimizations (like rtl/alloc.h or
JVM JIT) that are known to interact badly with certain dynamic analysis
tools (like -fsanitize=address or Valgrind). By default, disabled iff
- CC contains "-fsanitize=address". (For Valgrind, those runtime
- optimizations are typcially disabled dynamically via
- RUNNING_ON_VALGRIND.)]))
+ CC contains "-fsanitize=*". (For Valgrind, those runtime optimizations
+ are typcially disabled dynamically via RUNNING_ON_VALGRIND.)]))
AC_ARG_ENABLE(compiler-plugins,
AS_HELP_STRING([--enable-compiler-plugins],
@@ -5680,7 +5679,7 @@ AC_MSG_CHECKING([whether to enable runtime optimizations])
if test -z "$enable_runtime_optimizations"; then
for i in $CC; do
case $i in
- -fsanitize=address)
+ -fsanitize=*)
enable_runtime_optimizations=no
break
;;
@@ -6566,13 +6565,14 @@ _ACEOF
if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib1.cc -o libconftest1$DLLPOST >/dev/null 2>&5; then
gccvisinlineshiddenok=no
else
- dnl At least Clang -fsanitize=address is known to not work with
- dnl -z defs (unsetting which makes the test moot, though):
+ dnl At least Clang -fsanitize=address and -fsanitize=undefined are
+ dnl known to not work with -z defs (unsetting which makes the test
+ dnl moot, though):
my_linkflagsnoundefs=$LINKFLAGSNOUNDEFS
if test "$COM_GCC_IS_CLANG" = TRUE; then
for i in $CXX; do
case $i in
- -fsanitize=address)
+ -fsanitize=*)
my_linkflagsnoundefs=
break
;;
diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk
index 0f166c9..94b50e9 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -33,10 +33,12 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
))
endif
-ifeq ($(COM_GCC_IS_CLANG)$(filter -fsanitize=address,$(CC)),TRUE-fsanitize=address)
+ifeq ($(COM_GCC_IS_CLANG),TRUE)
+ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,nss,\
external/nss/asan.patch.1 \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk
index 9801ed2..cc355df 100644
--- a/solenv/gbuild/JunitTest.mk
+++ b/solenv/gbuild/JunitTest.mk
@@ -54,7 +54,7 @@ $(call gb_JunitTest_get_target,%) :
$(CLEAN_CMD)
define gb_JunitTest_JunitTest
-$(call gb_JunitTest_get_target,$(1)) : T_CP := $(call gb_JavaClassSet_get_classdir,$(call gb_JunitTest_get_classsetname,$(1)))$$(gb_CLASSPATHSEP)$(OOO_JUNIT_JAR)$$(gb_CLASSPATHSEP)$(INSTROOT)/$(LIBO_URE_LIB_FOLDER)
+$(call gb_JunitTest_get_target,$(1)) : T_CP := $(call gb_JavaClassSet_get_classdir,$(call gb_JunitTest_get_classsetname,$(1)))$$(gb_CLASSPATHSEP)$(OOO_JUNIT_JAR)$$(gb_CLASSPATHSEP)$(subst /lo/,/lo-4.2/,$(INSTROOT))/$(LIBO_URE_LIB_FOLDER)
$(call gb_JunitTest_get_target,$(1)) : CLASSES :=
$(eval $(call gb_JunitTest_JunitTest_platform,$(1)))
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index 88216b6..284e70c 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -7,11 +7,13 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-ifneq ($(COM_GCC_IS_CLANG)$(filter -fsanitize=address,$(CC)),TRUE-fsanitize=address)
-gb_LinkTarget_LDFLAGS += \
- -Wl,-z,defs \
-
+gb__LinkTarget_LDFLAGS_zdefs := -Wl,-z,defs
+ifeq ($(COM_GCC_IS_CLANG),TRUE)
+ifneq ($(filter -fsanitize=%,$(CC)),)
+gb__LinkTarget_LDFLAGS_zdefs :=
+endif
endif
+gb_LinkTarget_LDFLAGS += $(gb__LinkTarget_LDFLAGS_zdefs)
include $(GBUILDDIR)/platform/unxgcc.mk
More information about the Libreoffice-commits
mailing list