Commit fd661a34 by Uros Bizjak Committed by Uros Bizjak

re PR target/89221 (--enable-frame-pointer does not work as intended)

	PR target/89221
	* config.gcc (i[34567]86-*-*, x86_64-*-*): Move tests for enable_cld
	and enable_frame_pointer ...
	* configure.ac: ... here.  Update help strings for
	--enable-frame-pointer.
	* configure: Regenerate.
	* config/i386/i386-options.c (ix86_option_override_internal): Remove
	USE_X86_64_FRAME_POINTER define, use USE_IX86_FRAME_POINTER instead.
	* config/i386/sol2.h (USE_IX86_FRAME_POINTER): Remove.
	(USE_X86_64_FRAME_POINTER): Ditto.

From-SVN: r270914
parent 7c0b7150
2019-05-06 Uroš Bizjak <ubizjak@gmail.com>
PR target/89221
* config.gcc (i[34567]86-*-*, x86_64-*-*): Move tests for enable_cld
and enable_frame_pointer ...
* configure.ac: ... here. Update help strings for
--enable-frame-pointer.
* configure: Regenerate.
* config/i386/i386-options.c (ix86_option_override_internal): Remove
USE_X86_64_FRAME_POINTER define, use USE_IX86_FRAME_POINTER instead.
* config/i386/sol2.h (USE_IX86_FRAME_POINTER): Remove.
(USE_X86_64_FRAME_POINTER): Ditto.
2019-05-06 Martin Liska <mliska@suse.cz> 2019-05-06 Martin Liska <mliska@suse.cz>
* config.gcc: Append to target_gtfiles and fix indentation. * config.gcc: Append to target_gtfiles and fix indentation.
......
...@@ -607,12 +607,6 @@ i[34567]86-*-*) ...@@ -607,12 +607,6 @@ i[34567]86-*-*)
echo "This target does not support --with-abi." echo "This target does not support --with-abi."
exit 1 exit 1
fi fi
if test "x$enable_cld" = xyes; then
tm_defines="${tm_defines} USE_IX86_CLD=1"
fi
if test "x$enable_frame_pointer" = xyes; then
tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1"
fi
;; ;;
x86_64-*-*) x86_64-*-*)
case ${with_abi} in case ${with_abi} in
...@@ -633,12 +627,6 @@ x86_64-*-*) ...@@ -633,12 +627,6 @@ x86_64-*-*)
echo "Unknown ABI used in --with-abi=$with_abi" echo "Unknown ABI used in --with-abi=$with_abi"
exit 1 exit 1
esac esac
if test "x$enable_cld" = xyes; then
tm_defines="${tm_defines} USE_IX86_CLD=1"
fi
if test "x$enable_frame_pointer" = xyes; then
tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1"
fi
;; ;;
arm*-*-*) arm*-*-*)
tm_p_file="arm/arm-flags.h ${tm_p_file} arm/aarch-common-protos.h" tm_p_file="arm/arm-flags.h ${tm_p_file} arm/aarch-common-protos.h"
......
...@@ -2198,16 +2198,12 @@ ix86_option_override_internal (bool main_args_p, ...@@ -2198,16 +2198,12 @@ ix86_option_override_internal (bool main_args_p,
#define USE_IX86_FRAME_POINTER 0 #define USE_IX86_FRAME_POINTER 0
#endif #endif
#ifndef USE_X86_64_FRAME_POINTER
#define USE_X86_64_FRAME_POINTER 0
#endif
/* Set the default values for switches whose default depends on TARGET_64BIT /* Set the default values for switches whose default depends on TARGET_64BIT
in case they weren't overwritten by command line options. */ in case they weren't overwritten by command line options. */
if (TARGET_64BIT_P (opts->x_ix86_isa_flags)) if (TARGET_64BIT_P (opts->x_ix86_isa_flags))
{ {
if (opts->x_optimize >= 1 && !opts_set->x_flag_omit_frame_pointer) if (opts->x_optimize >= 1 && !opts_set->x_flag_omit_frame_pointer)
opts->x_flag_omit_frame_pointer = !USE_X86_64_FRAME_POINTER; opts->x_flag_omit_frame_pointer = !USE_IX86_FRAME_POINTER;
if (opts->x_flag_asynchronous_unwind_tables if (opts->x_flag_asynchronous_unwind_tables
&& !opts_set->x_flag_unwind_tables && !opts_set->x_flag_unwind_tables
&& TARGET_64BIT_MS_ABI) && TARGET_64BIT_MS_ABI)
......
...@@ -248,9 +248,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -248,9 +248,6 @@ along with GCC; see the file COPYING3. If not see
#define ASAN_REJECT_SPEC \ #define ASAN_REJECT_SPEC \
DEF_ARCH64_SPEC("%e:-fsanitize=address is not supported in this configuration") DEF_ARCH64_SPEC("%e:-fsanitize=address is not supported in this configuration")
#define USE_IX86_FRAME_POINTER 1
#define USE_X86_64_FRAME_POINTER 1
#undef NO_PROFILE_COUNTERS #undef NO_PROFILE_COUNTERS
#undef MCOUNT_NAME #undef MCOUNT_NAME
......
...@@ -1688,8 +1688,7 @@ Optional Features: ...@@ -1688,8 +1688,7 @@ Optional Features:
--enable-leading-mingw64-underscores --enable-leading-mingw64-underscores
enable leading underscores on 64 bit mingw targets enable leading underscores on 64 bit mingw targets
--enable-cld enable -mcld by default for 32bit x86 --enable-cld enable -mcld by default for 32bit x86
--enable-frame-pointer enable -fno-omit-frame-pointer by default for 32bit --enable-frame-pointer enable -fno-omit-frame-pointer by default for x86
x86
--disable-win32-registry --disable-win32-registry
disable lookup of installation paths in the Registry disable lookup of installation paths in the Registry
on Windows hosts on Windows hosts
...@@ -12199,8 +12198,7 @@ else ...@@ -12199,8 +12198,7 @@ else
case $target_os in case $target_os in
linux* | darwin[8912]*) linux* | darwin[8912]*)
# Enable -fomit-frame-pointer by default for Linux and Darwin with # Enable -fomit-frame-pointer by default for Linux and Darwin with DWARF2.
# DWARF2.
enable_frame_pointer=no enable_frame_pointer=no
;; ;;
*) *)
...@@ -12211,6 +12209,17 @@ esac ...@@ -12211,6 +12209,17 @@ esac
fi fi
case $target in
i[34567]86-*-* | x86_64-*-*)
if test "x$enable_cld" = xyes; then
tm_defines="${tm_defines} USE_IX86_CLD=1"
fi
if test "x$enable_frame_pointer" = xyes; then
tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1"
fi
;;
esac
# Windows32 Registry support for specifying GCC installation paths. # Windows32 Registry support for specifying GCC installation paths.
# Check whether --enable-win32-registry was given. # Check whether --enable-win32-registry was given.
if test "${enable_win32_registry+set}" = set; then : if test "${enable_win32_registry+set}" = set; then :
...@@ -18646,7 +18655,7 @@ else ...@@ -18646,7 +18655,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 18649 "configure" #line 18658 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -18752,7 +18761,7 @@ else ...@@ -18752,7 +18761,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 18755 "configure" #line 18764 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
......
...@@ -1881,12 +1881,11 @@ AC_ARG_ENABLE(cld, ...@@ -1881,12 +1881,11 @@ AC_ARG_ENABLE(cld,
AC_ARG_ENABLE(frame-pointer, AC_ARG_ENABLE(frame-pointer,
[AS_HELP_STRING([--enable-frame-pointer], [AS_HELP_STRING([--enable-frame-pointer],
[enable -fno-omit-frame-pointer by default for 32bit x86])], [], [enable -fno-omit-frame-pointer by default for x86])], [],
[ [
case $target_os in case $target_os in
linux* | darwin[[8912]]*) linux* | darwin[[8912]]*)
# Enable -fomit-frame-pointer by default for Linux and Darwin with # Enable -fomit-frame-pointer by default for Linux and Darwin with DWARF2.
# DWARF2.
enable_frame_pointer=no enable_frame_pointer=no
;; ;;
*) *)
...@@ -1895,6 +1894,17 @@ linux* | darwin[[8912]]*) ...@@ -1895,6 +1894,17 @@ linux* | darwin[[8912]]*)
esac esac
]) ])
case $target in
i[[34567]]86-*-* | x86_64-*-*)
if test "x$enable_cld" = xyes; then
tm_defines="${tm_defines} USE_IX86_CLD=1"
fi
if test "x$enable_frame_pointer" = xyes; then
tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1"
fi
;;
esac
# Windows32 Registry support for specifying GCC installation paths. # Windows32 Registry support for specifying GCC installation paths.
AC_ARG_ENABLE(win32-registry, AC_ARG_ENABLE(win32-registry,
[AS_HELP_STRING([--disable-win32-registry], [AS_HELP_STRING([--disable-win32-registry],
......
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