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

Drop unnecessary gb_DEBUG_CFLAGS

...which was at maximum set to GCC's -finline-limit=0 -fno-inline
(solenv/gbuild/platform/com_GCC_defs.mk).  Those options were set for debug
builds "since forever", but that looks very much like cargo cult:  -fno-inline
"is the default when not optimizing" anyway
(<https://gcc.gnu.org/onlinedocs/gcc-7.4.0/gcc/Optimize-Options.html>), and it
is unclear to me how -finline-limit=0 should have any impact beyond -fno-inline
(and maybe was present for ancient compilers that only supported -finline-limit
but not -fno-inline?).

Change-Id: Id6752d03b1b7ec8763defabc5720d4dd08790874
Reviewed-on: https://gerrit.libreoffice.org/66836
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst dc3936f5
......@@ -249,9 +249,7 @@ export HAVE_GCC_AVX=@HAVE_GCC_AVX@
export HAVE_GCC_STACK_PROTECTOR_STRONG=@HAVE_GCC_STACK_PROTECTOR_STRONG@
export HAVE_GCC_BUILTIN_ATOMIC=@HAVE_GCC_BUILTIN_ATOMIC@
export HAVE_GCC_BUILTIN_FFS=@HAVE_GCC_BUILTIN_FFS@
export HAVE_GCC_FINLINE_LIMIT=@HAVE_GCC_FINLINE_LIMIT@
export HAVE_GCC_FNO_ENFORCE_EH_SPECS=@HAVE_GCC_FNO_ENFORCE_EH_SPECS@
export HAVE_GCC_FNO_INLINE=@HAVE_GCC_FNO_INLINE@
export HAVE_GCC_FNO_SIZED_DEALLOCATION=@HAVE_GCC_FNO_SIZED_DEALLOCATION@
export HAVE_GCC_GGDB2=@HAVE_GCC_GGDB2@
export HAVE_GCC_SPLIT_DWARF=@HAVE_GCC_SPLIT_DWARF@
......
......@@ -3739,8 +3739,6 @@ fi
# ===================================================================
HAVE_GCC_GGDB2=
HAVE_GCC_FINLINE_LIMIT=
HAVE_GCC_FNO_INLINE=
if test "$GCC" = "yes"; then
AC_MSG_CHECKING([whether $CC supports -ggdb2])
save_CFLAGS=$CFLAGS
......@@ -3753,28 +3751,6 @@ if test "$GCC" = "yes"; then
AC_MSG_RESULT([no])
fi
AC_MSG_CHECKING([whether $CC supports -finline-limit=0])
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Werror -finline-limit=0"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FINLINE_LIMIT=TRUE ],[])
CFLAGS=$save_CFLAGS
if test "$HAVE_GCC_FINLINE_LIMIT" = "TRUE"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
AC_MSG_CHECKING([whether $CC supports -fno-inline])
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Werror -fno-inline"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FNO_INLINE=TRUE ],[])
CFLAGS=$save_CFLAGS
if test "$HAVE_GCC_FNO_INLINE" = "TRUE"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
if test "$host_cpu" = "m68k"; then
AC_MSG_CHECKING([whether $CC supports -mlong-jump-table-offsets])
save_CFLAGS=$CFLAGS
......@@ -3789,8 +3765,6 @@ if test "$GCC" = "yes"; then
fi
fi
AC_SUBST(HAVE_GCC_GGDB2)
AC_SUBST(HAVE_GCC_FINLINE_LIMIT)
AC_SUBST(HAVE_GCC_FNO_INLINE)
dnl ===================================================================
dnl Test the gcc version
......
......@@ -37,7 +37,6 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_Executable_
CFLAGS='$(CFLAGS) \
$(if $(ENABLE_OPTIMIZED), \
$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(ENABLE_DEBUG),$(gb_DEBUG_CFLAGS)) \
$(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))' \
--host=$(gb_ExternalProject_gpgmepp_host) \
RC='windres -O COFF --target=$(gb_ExternalProject_gpgmepp_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
......@@ -58,12 +57,10 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build):
CFLAGS='$(CFLAGS) \
$(if $(ENABLE_OPTIMIZED), \
$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(ENABLE_DEBUG),$(gb_DEBUG_CFLAGS)) \
$(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))' \
CXXFLAGS='$(CXXFLAGS) \
$(if $(ENABLE_OPTIMIZED), \
$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(ENABLE_DEBUG),$(gb_DEBUG_CFLAGS)) \
$(if $(ENABLE_DBGUTIL),-D_GLIBCXX_DEBUG) \
$(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))' \
$(if $(filter LINUX,$(OS)), \
......
......@@ -47,7 +47,6 @@ $(call gb_ExternalProject_get_state_target,harfbuzz,build) :
$(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)) \
$(if $(ENABLE_OPTIMIZED), \
$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(debug),$(gb_DEBUG_CFLAGS)) \
$(CXXFLAGS) $(CXXFLAGS_CXX11) \
$(ICU_UCHAR_TYPE) \
$(if $(filter LINUX,$(OS)),-fvisibility=hidden)' \
......
......@@ -27,7 +27,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 $(hunspell_CPPFLAGS),CPPFLAGS='$(hunspell_CPPFLAGS)') \
CXXFLAGS="$(CXXFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS))" \
CXXFLAGS="$(CXXFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS))" \
&& cd src/hunspell && $(MAKE) \
)
......
......@@ -21,7 +21,7 @@ ifeq ($(OS),WNT)
$(call gb_ExternalProject_get_state_target,icu,build) :
$(call gb_ExternalProject_run,build,\
export LIB="$(ILIB)" \
&& CFLAGS="-FS -arch:SSE $(SOLARINC) $(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS)" CPPFLAGS="$(SOLARINC)" CXXFLAGS="-FS -arch:SSE $(SOLARINC) $(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS)" \
&& CFLAGS="-FS -arch:SSE $(SOLARINC) $(gb_DEBUGINFO_FLAGS)" CPPFLAGS="$(SOLARINC)" CXXFLAGS="-FS -arch:SSE $(SOLARINC) $(gb_DEBUGINFO_FLAGS)" \
INSTALL=`cygpath -m /usr/bin/install` \
./runConfigureICU \
$(if $(MSVC_USE_DEBUG_RUNTIME),--enable-debug --disable-release) \
......@@ -35,7 +35,6 @@ icu_CFLAGS:=" \
$(if $(filter iOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
$(if $(SYSBASE),-I$(SYSBASE)/usr/include) \
$(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(debug),$(gb_DEBUG_CFLAGS)) \
$(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
$(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
$(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)) \
......@@ -44,7 +43,6 @@ icu_CFLAGS:=" \
icu_CXXFLAGS:="$(CXXFLAGS) $(CXXFLAGS_CXX11) \
$(if $(filter iOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
$(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(debug),$(gb_DEBUG_CFLAGS)) \
$(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
$(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
$(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)) \
......
......@@ -30,7 +30,7 @@ $(call gb_ExternalProject_get_state_target,lcms2,build):
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
$(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \
CPPFLAGS=" $(SOLARINC)" \
CFLAGS='$(CFLAGS) $(if $(debug),$(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS)) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS))' \
CFLAGS='$(CFLAGS) $(if $(debug),$(gb_DEBUGINFO_FLAGS)) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS))' \
$(if $(DISABLE_DYNLOADING), \
--enable-static --disable-shared \
, \
......
......@@ -19,7 +19,7 @@ $(call gb_ExternalProject_get_state_target,libexttextcat,build):
$(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
$(if $(ENABLE_WERROR),--enable-werror,--disable-werror) \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_DEBUGINFO_FLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(COM_IS_CLANG),-Qunused-arguments) \
$(if $(filter AIX,$(OS)),-D_LINUX_SOURCE_COMPAT)" \
&& $(MAKE) \
......
......@@ -33,7 +33,7 @@ $(call gb_ExternalProject_get_state_target,libjpeg-turbo,configure) :
--without-java \
--without-turbojpeg \
$(if $(NASM),,--without-simd) \
CFLAGS='$(if $(debug),$(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS)) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(CFLAGS) $(gb_VISIBILITY_FLAGS)' \
CFLAGS='$(if $(debug),$(gb_DEBUGINFO_FLAGS)) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(CFLAGS) $(gb_VISIBILITY_FLAGS)' \
)
# vim: set noet sw=4 ts=4:
......@@ -31,7 +31,6 @@ $(call gb_ExternalProject_get_state_target,liblangtag,build):
CFLAGS='$(CFLAGS) \
$(if $(ENABLE_OPTIMIZED), \
$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(ENABLE_DEBUG),$(gb_DEBUG_CFLAGS)) \
$(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))' \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) "ac_cv_va_copy=no") \
LIBXML2_CFLAGS="$(LIBXML_CFLAGS)" \
......
......@@ -38,7 +38,7 @@ $(call gb_ExternalProject_get_state_target,libnumbertext,build):
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM))\
$(if $(filter AIX,$(OS)),CFLAGS="-D_LINUX_SOURCE_COMPAT") \
$(if $(libnumbertext_CPPFLAGS),CPPFLAGS='$(libnumbertext_CPPFLAGS)') \
CXXFLAGS="$(libnumbertext_CXXFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS)) $(gb_VISIBILITY_FLAGS) $(gb_VISIBILITY_FLAGS_CXX)" \
CXXFLAGS="$(libnumbertext_CXXFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS)) $(gb_VISIBILITY_FLAGS) $(gb_VISIBILITY_FLAGS_CXX)" \
&& cd src && $(MAKE) \
)
......
......@@ -22,7 +22,7 @@ $(call gb_ExternalProject_get_state_target,lpsolve,build):
else # $(OS)!=WNT
$(call gb_ExternalProject_get_state_target,lpsolve,build):
$(call gb_ExternalProject_run,build,\
CC="$(CC) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS))" \
CC="$(CC) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS))" \
$(if $(filter MACOSX,$(OS)),EXTRA_LINKFLAGS='-install_name @__________________________________________________OOO/liblpsolve55.dylib') \
sh -e $(if $(filter MACOSX,$(OS)),ccc.osx, \
$(if $(filter TRUE,$(DISABLE_DYNLOADING)),ccc.static, \
......
......@@ -71,7 +71,7 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
$(if $(filter AIX,$(OS)), \
--disable-ipv6 --with-threads OPT="-g0 -fwrapv -O3 -Wall", \
$(if $(gb_Module_CURRENTMODULE_DEBUG_ENABLED), \
OPT="$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS)")) \
OPT="$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUGINFO_FLAGS)")) \
$(if $(filter MACOSX,$(OS)), \
$(if $(filter INTEL,$(CPUNAME)),--enable-universalsdk=$(MACOSX_SDK_PATH) \
--with-universal-archs=intel \
......
......@@ -40,7 +40,7 @@ $(call gb_ExternalProject_get_state_target,xmlsec,build) :
&& ./configure \
--with-pic --disable-shared --disable-crypto-dl --without-libxslt --without-gnutls --without-gcrypt --disable-apps --disable-docs \
$(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
CFLAGS="$(CFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS)) $(gb_VISIBILITY_FLAGS)" \
CFLAGS="$(CFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS)) $(gb_VISIBILITY_FLAGS)" \
--without-openssl \
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
$(if $(SYSTEM_NSS),,$(if $(filter MACOSX,$(OS)),--disable-pkgconfig)) \
......
......@@ -42,7 +42,7 @@ $(IOSOBJ): $(IOSSRC) $(call gb_CustomTarget_get_target,ios/iOS_setup)
$(gb_CC) $(gb_COMPILERDEFS) $(gb_OSDEFS) $(gb_CFLAGS) \
-DDISABLE_DYNLOADING -DLIBO_INTERNAL_ONLY \
-fvisibility=hidden -Werror -O0 -fstrict-overflow \
$(if $(ENABLE_DEBUG),$(gb_DEBUG_CFLAGS) -g) \
$(if $(ENABLE_DEBUG),-g) \
-c $(IOSSRC) -o $(IOSOBJ) \
-I$(SRCDIR)/include -I$(BUILDDIR)/config_host \
......
......@@ -44,7 +44,7 @@ gb_LinkTarget__debug_enabled = \
# debug flags, if ENABLE_DEBUG is set and the LinkTarget is named
# in the list of libraries of ENABLE_DEBUGINFO_FOR
gb_LinkTarget__get_debugflags=$(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(call gb_LinkTarget__debug_enabled,$(1)),$(gb_DEBUG_CFLAGS)) $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))
gb_LinkTarget__get_debugflags=$(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS))
# similar for LDFLAGS, use linker optimization flags in non-debug case,
# but moreover strip debug from libraries for which debuginfo is not wanted
......
......@@ -204,16 +204,6 @@ ifeq ($(HAVE_GCC_SPLIT_DWARF),TRUE)
gb_DEBUGINFO_FLAGS+=-gsplit-dwarf
endif
ifeq ($(HAVE_GCC_FINLINE_LIMIT),TRUE)
FINLINE_LIMIT0=-finline-limit=0
endif
ifeq ($(HAVE_GCC_FNO_INLINE),TRUE)
FNO_INLINE=-fno-inline
endif
gb_DEBUG_CFLAGS := $(FINLINE_LIMIT0) $(FNO_INLINE)
gb_LinkTarget_INCLUDE :=\
$(SOLARINC) \
-I$(BUILDDIR)/config_$(gb_Side) \
......
......@@ -259,8 +259,6 @@ gb_DEBUGINFO_FLAGS := \
-FS \
-Zi \
gb_DEBUG_CFLAGS :=
gb_COMPILEROPTFLAGS := -O2 -Oy-
gb_COMPILERNOOPTFLAGS := -Od
......
......@@ -62,8 +62,6 @@ gb_OBJCFLAGS := -x objective-c
gb_COMPILERDEFS += \
-DBOOST_DETAIL_NO_CONTAINER_FWD
gb_DEBUG_CFLAGS := -fno-inline
# LinkTarget class
gb_LinkTarget_CFLAGS := $(gb_CFLAGS)
......
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