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

Keep original CFLAGS etc. unmodified in configure.ac

...even if they are modified for the remaineder of configure.ac itself in the
MSVC 2015-specific code checking for UCRT.  Otherwise, the flags determined by
LinkTarget.mk would lack any debug and optimization flags when building with
MSVC 2015.

Change-Id: Ib78418e0ad04bf2eae16a14b5c0904ba4f582eca
Reviewed-on: https://gerrit.libreoffice.org/34248Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 5401ccd6
...@@ -911,6 +911,75 @@ AC_SUBST(SDKDIRNAME) ...@@ -911,6 +911,75 @@ AC_SUBST(SDKDIRNAME)
AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_LIBS)
# Check for explicit A/C/CXX/OBJC/OBJCXX/LDFLAGS.
# By default use the ones specified by our build system,
# but explicit override is possible.
AC_MSG_CHECKING(for explicit AFLAGS)
if test -n "$AFLAGS"; then
AC_MSG_RESULT([$AFLAGS])
x_AFLAGS=
else
AC_MSG_RESULT(no)
x_AFLAGS=[\#]
fi
AC_MSG_CHECKING(for explicit CFLAGS)
if test -n "$CFLAGS"; then
AC_MSG_RESULT([$CFLAGS])
x_CFLAGS=
else
AC_MSG_RESULT(no)
x_CFLAGS=[\#]
fi
AC_MSG_CHECKING(for explicit CXXFLAGS)
if test -n "$CXXFLAGS"; then
AC_MSG_RESULT([$CXXFLAGS])
x_CXXFLAGS=
else
AC_MSG_RESULT(no)
x_CXXFLAGS=[\#]
fi
AC_MSG_CHECKING(for explicit OBJCFLAGS)
if test -n "$OBJCFLAGS"; then
AC_MSG_RESULT([$OBJCFLAGS])
x_OBJCFLAGS=
else
AC_MSG_RESULT(no)
x_OBJCFLAGS=[\#]
fi
AC_MSG_CHECKING(for explicit OBJCXXFLAGS)
if test -n "$OBJCXXFLAGS"; then
AC_MSG_RESULT([$OBJCXXFLAGS])
x_OBJCXXFLAGS=
else
AC_MSG_RESULT(no)
x_OBJCXXFLAGS=[\#]
fi
AC_MSG_CHECKING(for explicit LDFLAGS)
if test -n "$LDFLAGS"; then
AC_MSG_RESULT([$LDFLAGS])
x_LDFLAGS=
else
AC_MSG_RESULT(no)
x_LDFLAGS=[\#]
fi
AC_SUBST(AFLAGS)
AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(OBJCFLAGS)
AC_SUBST(OBJCXXFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(x_AFLAGS)
AC_SUBST(x_CFLAGS)
AC_SUBST(x_CXXFLAGS)
AC_SUBST(x_OBJCFLAGS)
AC_SUBST(x_OBJCXXFLAGS)
AC_SUBST(x_LDFLAGS)
dnl These are potentially set for MSVC, in the code checking for UCRT below:
my_original_CFLAGS=$CFLAGS
my_original_CXXFLAGS=$CXXFLAGS
my_original_CPPFLAGS=$CPPFLAGS
dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32) dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
dnl Needs to precede the AC_SEARCH_LIBS call below, which apparently calls dnl Needs to precede the AC_SEARCH_LIBS call below, which apparently calls
dnl AC_PROG_CC internally. dnl AC_PROG_CC internally.
...@@ -3939,70 +4008,6 @@ if test "$enable_release_build" != yes -a \( -n "$ENABLE_SYMBOLS" -o -n "$ENABLE ...@@ -3939,70 +4008,6 @@ if test "$enable_release_build" != yes -a \( -n "$ENABLE_SYMBOLS" -o -n "$ENABLE
fi fi
AC_SUBST(XCODE_DEBUG_INFORMATION_FORMAT) AC_SUBST(XCODE_DEBUG_INFORMATION_FORMAT)
# Check for explicit A/C/CXX/OBJC/OBJCXX/LDFLAGS.
# By default use the ones specified by our build system,
# but explicit override is possible.
AC_MSG_CHECKING(for explicit AFLAGS)
if test -n "$AFLAGS"; then
AC_MSG_RESULT([$AFLAGS])
x_AFLAGS=
else
AC_MSG_RESULT(no)
x_AFLAGS=[\#]
fi
AC_MSG_CHECKING(for explicit CFLAGS)
if test -n "$CFLAGS"; then
AC_MSG_RESULT([$CFLAGS])
x_CFLAGS=
else
AC_MSG_RESULT(no)
x_CFLAGS=[\#]
fi
AC_MSG_CHECKING(for explicit CXXFLAGS)
if test -n "$CXXFLAGS"; then
AC_MSG_RESULT([$CXXFLAGS])
x_CXXFLAGS=
else
AC_MSG_RESULT(no)
x_CXXFLAGS=[\#]
fi
AC_MSG_CHECKING(for explicit OBJCFLAGS)
if test -n "$OBJCFLAGS"; then
AC_MSG_RESULT([$OBJCFLAGS])
x_OBJCFLAGS=
else
AC_MSG_RESULT(no)
x_OBJCFLAGS=[\#]
fi
AC_MSG_CHECKING(for explicit OBJCXXFLAGS)
if test -n "$OBJCXXFLAGS"; then
AC_MSG_RESULT([$OBJCXXFLAGS])
x_OBJCXXFLAGS=
else
AC_MSG_RESULT(no)
x_OBJCXXFLAGS=[\#]
fi
AC_MSG_CHECKING(for explicit LDFLAGS)
if test -n "$LDFLAGS"; then
AC_MSG_RESULT([$LDFLAGS])
x_LDFLAGS=
else
AC_MSG_RESULT(no)
x_LDFLAGS=[\#]
fi
AC_SUBST(AFLAGS)
AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(OBJCFLAGS)
AC_SUBST(OBJCXXFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(x_AFLAGS)
AC_SUBST(x_CFLAGS)
AC_SUBST(x_CXXFLAGS)
AC_SUBST(x_OBJCFLAGS)
AC_SUBST(x_OBJCXXFLAGS)
AC_SUBST(x_LDFLAGS)
# #
# determine CPUNAME, OS, ... # determine CPUNAME, OS, ...
# The USING_X11 flag tells whether the host os uses X by default. Can be overridden with the --without-x option. # The USING_X11 flag tells whether the host os uses X by default. Can be overridden with the --without-x option.
...@@ -12556,6 +12561,10 @@ if test -f config_host_lang.mk; then ...@@ -12556,6 +12561,10 @@ if test -f config_host_lang.mk; then
config_lang_md5=`$MD5SUM config_host_lang.mk | sed "s/ .*//"` config_lang_md5=`$MD5SUM config_host_lang.mk | sed "s/ .*//"`
fi fi
CFLAGS=$my_original_CFLAGS
CXXFLAGS=$my_original_CXXFLAGS
CPPFLAGS=$my_original_CPPFLAGS
AC_CONFIG_FILES([config_host.mk AC_CONFIG_FILES([config_host.mk
config_host_lang.mk config_host_lang.mk
Makefile Makefile
......
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