Kaydet (Commit) ba8a957b authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Generalize COM_GCC_IS_CLANG -> COM_IS_CLANG

...in anticipation of building with clang-cl.exe on Windows

Change-Id: I1d723c9d3b5ca8a2bc6b27ef0189a7b053581398
Reviewed-on: https://gerrit.libreoffice.org/19928Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 51af0ef3
...@@ -217,7 +217,7 @@ endif ...@@ -217,7 +217,7 @@ endif
endif endif
ifeq ($(COM),GCC) ifeq ($(COM),GCC)
ifneq ($(COM_GCC_IS_CLANG),TRUE) ifneq ($(COM_IS_CLANG),TRUE)
bridges_NON_CALL_EXCEPTIONS_FLAGS := -fnon-call-exceptions bridges_NON_CALL_EXCEPTIONS_FLAGS := -fnon-call-exceptions
endif endif
endif endif
......
...@@ -19,7 +19,7 @@ compilerplugins.clean: ...@@ -19,7 +19,7 @@ compilerplugins.clean:
else else
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
compilerplugins: compilerplugins:
$(MAKE) $(PARALLELISM_OPTION) -f $(SRCDIR)/compilerplugins/Makefile-clang.mk compilerplugins $(MAKE) $(PARALLELISM_OPTION) -f $(SRCDIR)/compilerplugins/Makefile-clang.mk compilerplugins
......
...@@ -68,7 +68,7 @@ export COMMONS_LOGGING_JAR=@COMMONS_LOGGING_JAR@ ...@@ -68,7 +68,7 @@ export COMMONS_LOGGING_JAR=@COMMONS_LOGGING_JAR@
export COMMONS_LOGGING_VERSION=@COMMONS_LOGGING_VERSION@ export COMMONS_LOGGING_VERSION=@COMMONS_LOGGING_VERSION@
export COMPATH=@COMPATH@ export COMPATH=@COMPATH@
export COMPILER_PLUGINS=@COMPILER_PLUGINS@ export COMPILER_PLUGINS=@COMPILER_PLUGINS@
export COM_GCC_IS_CLANG=@COM_GCC_IS_CLANG@ export COM_IS_CLANG=@COM_IS_CLANG@
export CPPUNIT_CFLAGS=$(gb_SPACE)@CPPUNIT_CFLAGS@ export CPPUNIT_CFLAGS=$(gb_SPACE)@CPPUNIT_CFLAGS@
export CPPUNIT_LIBS=$(gb_SPACE)@CPPUNIT_LIBS@ export CPPUNIT_LIBS=$(gb_SPACE)@CPPUNIT_LIBS@
export CPUNAME=@CPUNAME@ export CPUNAME=@CPUNAME@
......
...@@ -3267,63 +3267,6 @@ else ...@@ -3267,63 +3267,6 @@ else
fi fi
AC_SUBST(CROSS_COMPILING) AC_SUBST(CROSS_COMPILING)
dnl ===================================================================
dnl Is GCC actually Clang?
dnl ===================================================================
COM_GCC_IS_CLANG=
if test "$GCC" = "yes"; then
AC_MSG_CHECKING([whether GCC is actually Clang])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#ifndef __clang__
you lose
#endif
int foo=42;
]])],
[AC_MSG_RESULT([yes])
COM_GCC_IS_CLANG=TRUE],
[AC_MSG_RESULT([no])])
if test "$COM_GCC_IS_CLANG" = TRUE; then
AC_MSG_CHECKING([the Clang version])
clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $CC -E -P /dev/stdin`
CLANG_FULL_VERSION=`echo __clang_version__ | $CC -E -P /dev/stdin`
CLANGVER=`echo $clang_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
AC_MSG_RESULT([Clang $CLANG_FULL_VERSION, $CLANGVER])
AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION)
fi
fi
AC_SUBST(COM_GCC_IS_CLANG)
if test "$CCACHE" != "" -a "$COM_GCC_IS_CLANG" = TRUE; then
if test -z "$CCACHE_CPP2"; then
AC_MSG_WARN([Using ccache with Clang without CCACHE_CPP2 set causes spurious warnings.])
add_warning "Using ccache with Clang without CCACHE_CPP2 set causes spurious warnings."
fi
fi
dnl ===================================================================
dnl Test the gcc version
dnl ===================================================================
if test "$GCC" = "yes" -a -z "$COM_GCC_IS_CLANG"; then
AC_MSG_CHECKING([the GCC version])
_gcc_version=`$CC -dumpversion`
GCC_VERSION=`echo $_gcc_version | $AWK -F. '{ print \$1*100+\$2 }'`
AC_MSG_RESULT([gcc $_gcc_version])
if test "$GCC_VERSION" -lt 0407; then
AC_MSG_ERROR([GCC $_gcc_version is too old, must be at least GCC 4.7.0])
fi
else
# Explicitly force GCC_VERSION to be empty, even for Clang, to check incorrect uses.
# GCC version should generally be checked only when handling GCC-specific bugs, for testing
# things like features configure checks should be used, otherwise they may e.g. fail with Clang
# (which reports itself as GCC 4.2.1).
GCC_VERSION=
fi
AC_SUBST(GCC_VERSION)
# =================================================================== # ===================================================================
# check various GCC options that Clang does not support now but maybe # check various GCC options that Clang does not support now but maybe
# will somewhen in the future, check them even for GCC, so that the # will somewhen in the future, check them even for GCC, so that the
...@@ -3856,6 +3799,35 @@ fi ...@@ -3856,6 +3799,35 @@ fi
UNOWINREG_DLL="185d60944ea767075d27247c3162b3bc-unowinreg.dll" UNOWINREG_DLL="185d60944ea767075d27247c3162b3bc-unowinreg.dll"
AC_SUBST(UNOWINREG_DLL) AC_SUBST(UNOWINREG_DLL)
COM_IS_CLANG=
AC_MSG_CHECKING([whether the compiler is actually Clang])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#ifndef __clang__
you lose
#endif
int foo=42;
]])],
[AC_MSG_RESULT([yes])
COM_IS_CLANG=TRUE],
[AC_MSG_RESULT([no])])
if test "$COM_IS_CLANG" = TRUE; then
AC_MSG_CHECKING([the Clang version])
clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $CC -E -P /dev/stdin`
CLANG_FULL_VERSION=`echo __clang_version__ | $CC -E -P /dev/stdin`
CLANGVER=`echo $clang_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
AC_MSG_RESULT([Clang $CLANG_FULL_VERSION, $CLANGVER])
AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION)
fi
AC_SUBST(COM_IS_CLANG)
if test "$CCACHE" != "" -a "$COM_IS_CLANG" = TRUE; then
if test -z "$CCACHE_CPP2"; then
AC_MSG_WARN([Using ccache with Clang without CCACHE_CPP2 set causes spurious warnings.])
add_warning "Using ccache with Clang without CCACHE_CPP2 set causes spurious warnings."
fi
fi
# #
# prefix C with ccache if needed # prefix C with ccache if needed
# #
...@@ -3878,6 +3850,28 @@ if test "$CCACHE" != ""; then ...@@ -3878,6 +3850,28 @@ if test "$CCACHE" != ""; then
AC_LANG_POP([C]) AC_LANG_POP([C])
fi fi
dnl ===================================================================
dnl Test the gcc version
dnl ===================================================================
if test "$GCC" = "yes" -a -z "$COM_IS_CLANG"; then
AC_MSG_CHECKING([the GCC version])
_gcc_version=`$CC -dumpversion`
GCC_VERSION=`echo $_gcc_version | $AWK -F. '{ print \$1*100+\$2 }'`
AC_MSG_RESULT([gcc $_gcc_version])
if test "$GCC_VERSION" -lt 0407; then
AC_MSG_ERROR([GCC $_gcc_version is too old, must be at least GCC 4.7.0])
fi
else
# Explicitly force GCC_VERSION to be empty, even for Clang, to check incorrect uses.
# GCC version should generally be checked only when handling GCC-specific bugs, for testing
# things like features configure checks should be used, otherwise they may e.g. fail with Clang
# (which reports itself as GCC 4.2.1).
GCC_VERSION=
fi
AC_SUBST(GCC_VERSION)
dnl Set the ENABLE_DBGUTIL variable dnl Set the ENABLE_DBGUTIL variable
dnl =================================================================== dnl ===================================================================
AC_MSG_CHECKING([whether to build with additional debug utilities]) AC_MSG_CHECKING([whether to build with additional debug utilities])
...@@ -5931,7 +5925,7 @@ if test "$GCC" = "yes"; then ...@@ -5931,7 +5925,7 @@ if test "$GCC" = "yes"; then
HAVE_THREADSAFE_STATICS=TRUE HAVE_THREADSAFE_STATICS=TRUE
fi fi
elif test "$_os" != Android; then elif test "$_os" != Android; then
if test "$COM_GCC_IS_CLANG" = TRUE; then if test "$COM_IS_CLANG" = TRUE; then
AC_LANG_PUSH([C++]) AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <list> #include <list>
...@@ -6469,7 +6463,7 @@ _ACEOF ...@@ -6469,7 +6463,7 @@ _ACEOF
dnl known to not work with -z defs (unsetting which makes the test dnl known to not work with -z defs (unsetting which makes the test
dnl moot, though): dnl moot, though):
my_linkflagsnoundefs=$LINKFLAGSNOUNDEFS my_linkflagsnoundefs=$LINKFLAGSNOUNDEFS
if test "$COM_GCC_IS_CLANG" = TRUE; then if test "$COM_IS_CLANG" = TRUE; then
for i in $CXX; do for i in $CXX; do
case $i in case $i in
-fsanitize=*) -fsanitize=*)
...@@ -6595,7 +6589,7 @@ dnl =================================================================== ...@@ -6595,7 +6589,7 @@ dnl ===================================================================
COMPILER_PLUGINS= COMPILER_PLUGINS=
# currently only Clang # currently only Clang
if test "$COM_GCC_IS_CLANG" = "TRUE"; then if test "$COM_IS_CLANG" = "TRUE"; then
if test -n "$enable_compiler_plugins"; then if test -n "$enable_compiler_plugins"; then
compiler_plugins="$enable_compiler_plugins" compiler_plugins="$enable_compiler_plugins"
elif test -n "$ENABLE_DBGUTIL"; then elif test -n "$ENABLE_DBGUTIL"; then
...@@ -8231,7 +8225,7 @@ if test "$ENABLE_MARIADBC" = "TRUE"; then ...@@ -8231,7 +8225,7 @@ if test "$ENABLE_MARIADBC" = "TRUE"; then
fi fi
AC_MSG_CHECKING([for MariaDB Client library]) AC_MSG_CHECKING([for MariaDB Client library])
MARIADB_CFLAGS=`$MARIADBCONFIG --cflags` MARIADB_CFLAGS=`$MARIADBCONFIG --cflags`
if test "$COM_GCC_IS_CLANG" = TRUE; then if test "$COM_IS_CLANG" = TRUE; then
MARIADB_CFLAGS=$(printf '%s' "$MARIADB_CFLAGS" | sed -e s/-fstack-protector-strong//) MARIADB_CFLAGS=$(printf '%s' "$MARIADB_CFLAGS" | sed -e s/-fstack-protector-strong//)
fi fi
MARIADB_LIBS=`$MARIADBCONFIG --libs_r` MARIADB_LIBS=`$MARIADBCONFIG --libs_r`
......
...@@ -22,7 +22,7 @@ $(eval $(call gb_CppunitTest_use_external,connectivity_commontools,boost_headers ...@@ -22,7 +22,7 @@ $(eval $(call gb_CppunitTest_use_external,connectivity_commontools,boost_headers
$(eval $(call gb_CppunitTest_use_sdk_api,connectivity_commontools)) $(eval $(call gb_CppunitTest_use_sdk_api,connectivity_commontools))
ifeq ($(COM),GCC) ifeq ($(COM),GCC)
ifneq ($(COM_GCC_IS_CLANG),TRUE) ifneq ($(COM_IS_CLANG),TRUE)
$(eval $(call gb_CppunitTest_add_cxxflags,connectivity_commontools,\ $(eval $(call gb_CppunitTest_add_cxxflags,connectivity_commontools,\
-fpermissive \ -fpermissive \
)) ))
......
...@@ -41,7 +41,7 @@ ifneq (,$(filter ANDROID IOS,$(OS))) ...@@ -41,7 +41,7 @@ ifneq (,$(filter ANDROID IOS,$(OS)))
$(eval $(call gb_UnpackedTarball_add_file,cairo,.,external/cairo/cairo/dummy_pkg_config)) $(eval $(call gb_UnpackedTarball_add_file,cairo,.,external/cairo/cairo/dummy_pkg_config))
endif endif
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,cairo,\ $(eval $(call gb_UnpackedTarball_add_patches,cairo,\
external/cairo/cairo/no-flto-clang.patch \ external/cairo/cairo/no-flto-clang.patch \
)) ))
......
...@@ -24,7 +24,7 @@ $(eval $(call gb_StaticLibrary_add_defs,graphite,\ ...@@ -24,7 +24,7 @@ $(eval $(call gb_StaticLibrary_add_defs,graphite,\
)) ))
ifeq ($(COM),GCC) ifeq ($(COM),GCC)
ifneq ($(COM_GCC_IS_CLANG),TRUE) ifneq ($(COM_IS_CLANG),TRUE)
$(eval $(call gb_StaticLibrary_add_cxxflags,graphite,\ $(eval $(call gb_StaticLibrary_add_cxxflags,graphite,\
-fpermissive \ -fpermissive \
)) ))
......
...@@ -13,7 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libabw,$(ABW_TARBALL))) ...@@ -13,7 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libabw,$(ABW_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,libabw,0)) $(eval $(call gb_UnpackedTarball_set_patchlevel,libabw,0))
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),) ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,libabw, \ $(eval $(call gb_UnpackedTarball_add_patches,libabw, \
external/libabw/ubsan-visibility.patch \ external/libabw/ubsan-visibility.patch \
......
...@@ -13,7 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libcdr,$(CDR_TARBALL))) ...@@ -13,7 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libcdr,$(CDR_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,libcdr,0)) $(eval $(call gb_UnpackedTarball_set_patchlevel,libcdr,0))
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),) ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,libcdr, \ $(eval $(call gb_UnpackedTarball_add_patches,libcdr, \
external/libcdr/ubsan-visibility.patch \ external/libcdr/ubsan-visibility.patch \
......
...@@ -11,7 +11,7 @@ $(eval $(call gb_StaticLibrary_StaticLibrary,cmislib)) ...@@ -11,7 +11,7 @@ $(eval $(call gb_StaticLibrary_StaticLibrary,cmislib))
$(eval $(call gb_StaticLibrary_set_warnings_not_errors,cmislib)) $(eval $(call gb_StaticLibrary_set_warnings_not_errors,cmislib))
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
# Avoid narrowing conversion error (even though the option is technically a warning) # Avoid narrowing conversion error (even though the option is technically a warning)
# caused by boost. # caused by boost.
$(eval $(call gb_StaticLibrary_add_cxxflags,cmislib,\ $(eval $(call gb_StaticLibrary_add_cxxflags,cmislib,\
......
...@@ -18,7 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libebook, \ ...@@ -18,7 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libebook, \
external/libebook/0001-lrf-compute-color-interpolation-coeff.-correctly.patch.1 \ external/libebook/0001-lrf-compute-color-interpolation-coeff.-correctly.patch.1 \
)) ))
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),) ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,libebook, \ $(eval $(call gb_UnpackedTarball_add_patches,libebook, \
external/libebook/ubsan-visibility.patch \ external/libebook/ubsan-visibility.patch \
......
...@@ -30,7 +30,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libetonyek,\ ...@@ -30,7 +30,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libetonyek,\
endif endif
endif endif
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),) ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,libetonyek, \ $(eval $(call gb_UnpackedTarball_add_patches,libetonyek, \
external/libetonyek/ubsan-visibility.patch \ external/libetonyek/ubsan-visibility.patch \
......
...@@ -18,7 +18,7 @@ $(call gb_ExternalProject_get_state_target,exttextcat,build): ...@@ -18,7 +18,7 @@ $(call gb_ExternalProject_get_state_target,exttextcat,build):
./configure --disable-shared --with-pic \ ./configure --disable-shared --with-pic \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_DEBUG_CFLAGS) $(gb_COMPILEROPTFLAGS) \ CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_DEBUG_CFLAGS) $(gb_COMPILEROPTFLAGS) \
$(if $(COM_GCC_IS_CLANG),-Qunused-arguments) \ $(if $(COM_IS_CLANG),-Qunused-arguments) \
$(if $(filter AIX,$(OS)),-D_LINUX_SOURCE_COMPAT)" \ $(if $(filter AIX,$(OS)),-D_LINUX_SOURCE_COMPAT)" \
&& $(MAKE) \ && $(MAKE) \
) )
......
...@@ -18,7 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libfreehand,\ ...@@ -18,7 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libfreehand,\
external/libfreehand/replace_transform_class_with_struct.patch \ external/libfreehand/replace_transform_class_with_struct.patch \
)) ))
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),) ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,libfreehand, \ $(eval $(call gb_UnpackedTarball_add_patches,libfreehand, \
external/libfreehand/ubsan-visibility.patch \ external/libfreehand/ubsan-visibility.patch \
......
...@@ -17,7 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libmspub,\ ...@@ -17,7 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libmspub,\
external/libmspub/ubsan.patch \ external/libmspub/ubsan.patch \
)) ))
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),) ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,libmspub, \ $(eval $(call gb_UnpackedTarball_add_patches,libmspub, \
external/libmspub/ubsan-visibility.patch \ external/libmspub/ubsan-visibility.patch \
......
...@@ -13,7 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libmwaw,$(MWAW_TARBALL))) ...@@ -13,7 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libmwaw,$(MWAW_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,libmwaw,0)) $(eval $(call gb_UnpackedTarball_set_patchlevel,libmwaw,0))
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),) ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,libmwaw, \ $(eval $(call gb_UnpackedTarball_add_patches,libmwaw, \
external/libmwaw/ubsan-visibility.patch \ external/libmwaw/ubsan-visibility.patch \
......
...@@ -13,7 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libodfgen,$(ODFGEN_TARBALL))) ...@@ -13,7 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libodfgen,$(ODFGEN_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,libodfgen,0)) $(eval $(call gb_UnpackedTarball_set_patchlevel,libodfgen,0))
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),) ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,libodfgen, \ $(eval $(call gb_UnpackedTarball_add_patches,libodfgen, \
external/libodfgen/ubsan-visibility.patch \ external/libodfgen/ubsan-visibility.patch \
......
...@@ -13,7 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libpagemaker,$(PAGEMAKER_TARBALL))) ...@@ -13,7 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libpagemaker,$(PAGEMAKER_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,libpagemaker,0)) $(eval $(call gb_UnpackedTarball_set_patchlevel,libpagemaker,0))
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),) ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,libpagemaker, \ $(eval $(call gb_UnpackedTarball_add_patches,libpagemaker, \
external/libpagemaker/ubsan-visibility.patch \ external/libpagemaker/ubsan-visibility.patch \
......
...@@ -13,7 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,librevenge,$(REVENGE_TARBALL))) ...@@ -13,7 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,librevenge,$(REVENGE_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,librevenge,0)) $(eval $(call gb_UnpackedTarball_set_patchlevel,librevenge,0))
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),) ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,librevenge, \ $(eval $(call gb_UnpackedTarball_add_patches,librevenge, \
external/librevenge/ubsan-visibility.patch \ external/librevenge/ubsan-visibility.patch \
......
...@@ -17,7 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libvisio,\ ...@@ -17,7 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libvisio,\
external/libvisio/ubsan.patch \ external/libvisio/ubsan.patch \
)) ))
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),) ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,libvisio, \ $(eval $(call gb_UnpackedTarball_add_patches,libvisio, \
external/libvisio/ubsan-visibility.patch \ external/libvisio/ubsan-visibility.patch \
......
...@@ -26,7 +26,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libwps,\ ...@@ -26,7 +26,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libwps,\
endif endif
endif endif
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),) ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,libwps, \ $(eval $(call gb_UnpackedTarball_add_patches,libwps, \
external/libwps/ubsan-visibility.patch.0 \ external/libwps/ubsan-visibility.patch.0 \
......
...@@ -36,7 +36,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\ ...@@ -36,7 +36,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
)) ))
endif endif
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),) ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,nss,\ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
external/nss/asan.patch.1 \ external/nss/asan.patch.1 \
......
...@@ -23,7 +23,7 @@ $(eval $(call gb_Library_add_cobjects,jpipe,\ ...@@ -23,7 +23,7 @@ $(eval $(call gb_Library_add_cobjects,jpipe,\
else else
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(gb_CC)),) ifneq ($(filter -fsanitize=%,$(gb_CC)),)
Library_jpipe__staticsalhack = TRUE Library_jpipe__staticsalhack = TRUE
endif endif
......
...@@ -25,7 +25,7 @@ gb_TMPDIR:=$(if $(TMPDIR),$(TMPDIR),/tmp) ...@@ -25,7 +25,7 @@ gb_TMPDIR:=$(if $(TMPDIR),$(TMPDIR),/tmp)
include $(GBUILDDIR)/platform/com_GCC_defs.mk include $(GBUILDDIR)/platform/com_GCC_defs.mk
include $(GBUILDDIR)/platform/windows.mk include $(GBUILDDIR)/platform/windows.mk
ifeq ($(COM_GCC_IS_CLANG),) ifeq ($(COM_IS_CLANG),)
# This has to do something with calling conventions, which are different # This has to do something with calling conventions, which are different
# for x86 and x64. Don't put it in the common part since it is breaking # for x86 and x64. Don't put it in the common part since it is breaking
# and conde that uses boost::bind # and conde that uses boost::bind
......
...@@ -152,7 +152,7 @@ endef ...@@ -152,7 +152,7 @@ endef
# PrecompiledHeader class # PrecompiledHeader class
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
gb_PrecompiledHeader_get_enableflags = -include-pch $(call gb_PrecompiledHeader_get_target,$(1)) gb_PrecompiledHeader_get_enableflags = -include-pch $(call gb_PrecompiledHeader_get_target,$(1))
else else
gb_PrecompiledHeader_get_enableflags = -include $(notdir $(subst .gch,,$(call gb_PrecompiledHeader_get_target,$(1)))) \ gb_PrecompiledHeader_get_enableflags = -include $(notdir $(subst .gch,,$(call gb_PrecompiledHeader_get_target,$(1)))) \
......
...@@ -93,7 +93,7 @@ gb_VISIBILITY_FLAGS := -DHAVE_GCC_VISIBILITY_FEATURE ...@@ -93,7 +93,7 @@ gb_VISIBILITY_FLAGS := -DHAVE_GCC_VISIBILITY_FEATURE
# If CC or CXX already include -fvisibility=hidden, don't duplicate it # If CC or CXX already include -fvisibility=hidden, don't duplicate it
ifeq (,$(filter -fvisibility=hidden,$(CC))) ifeq (,$(filter -fvisibility=hidden,$(CC)))
gb__visibility_hidden := -fvisibility=hidden gb__visibility_hidden := -fvisibility=hidden
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),) ifneq ($(filter -fsanitize=%,$(CC)),)
gb__visibility_hidden := -fvisibility-ms-compat gb__visibility_hidden := -fvisibility-ms-compat
endif endif
...@@ -115,7 +115,7 @@ endif ...@@ -115,7 +115,7 @@ endif
gb_CFLAGS_WERROR := $(if $(ENABLE_WERROR),-Werror) gb_CFLAGS_WERROR := $(if $(ENABLE_WERROR),-Werror)
# This is the default in non-C++11 mode # This is the default in non-C++11 mode
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
gb_CXX03FLAGS := -std=gnu++98 -Werror=c++11-extensions -Wno-c++11-long-long \ gb_CXX03FLAGS := -std=gnu++98 -Werror=c++11-extensions -Wno-c++11-long-long \
-Wno-deprecated-declarations -Wno-deprecated-declarations
else else
...@@ -128,7 +128,7 @@ endif ...@@ -128,7 +128,7 @@ endif
gb_CFLAGS_COMMON += -std=gnu89 gb_CFLAGS_COMMON += -std=gnu89
ifeq ($(ENABLE_LTO),TRUE) ifeq ($(ENABLE_LTO),TRUE)
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
gb_LTOFLAGS := -flto gb_LTOFLAGS := -flto
else else
gb_LTOFLAGS := -flto=$(PARALLELISM) -fuse-linker-plugin -O2 gb_LTOFLAGS := -flto=$(PARALLELISM) -fuse-linker-plugin -O2
...@@ -179,7 +179,7 @@ gb_LinkTarget_INCLUDE :=\ ...@@ -179,7 +179,7 @@ gb_LinkTarget_INCLUDE :=\
$(subst -I. , ,$(SOLARINC)) \ $(subst -I. , ,$(SOLARINC)) \
-I$(BUILDDIR)/config_$(gb_Side) \ -I$(BUILDDIR)/config_$(gb_Side) \
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifeq ($(COMPILER_PLUGIN_TOOL),) ifeq ($(COMPILER_PLUGIN_TOOL),)
gb_COMPILER_PLUGINS := -Xclang -load -Xclang $(BUILDDIR)/compilerplugins/obj/plugin.so -Xclang -add-plugin -Xclang loplugin gb_COMPILER_PLUGINS := -Xclang -load -Xclang $(BUILDDIR)/compilerplugins/obj/plugin.so -Xclang -add-plugin -Xclang loplugin
ifneq ($(COMPILER_PLUGIN_WARNINGS_ONLY),) ifneq ($(COMPILER_PLUGIN_WARNINGS_ONLY),)
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# #
gb__LinkTarget_LDFLAGS_zdefs := -Wl,-z,defs gb__LinkTarget_LDFLAGS_zdefs := -Wl,-z,defs
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),) ifneq ($(filter -fsanitize=%,$(CC)),)
gb__LinkTarget_LDFLAGS_zdefs := gb__LinkTarget_LDFLAGS_zdefs :=
endif endif
......
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