Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions 2 Doc/using/configure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,8 @@ also be used to improve performance.
- ``-marm`` and/or ``-mno-thumb`` is added on 32-bit ARM when supported,
- on s390x platforms, when supported, ``-mbackchain`` is added *instead*.
of the above frame pointer flags.
- on ppc64le platforms, no compiler flags is needed since the power ABI
requires that compilers maintain a back chain by default.

Frame pointers enable profilers, debuggers, and system tracing tools
(``perf``, ``eBPF``, ``dtrace``, ``gdb``) to walk the C call stack
Expand Down
6 changes: 6 additions & 0 deletions 6 Lib/test/test_frame_pointer_unwind.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ def _frame_pointers_expected(machine):
if sys.maxsize < 2**32:
return None
return True
if machine == "ppc64le":
# The power ABI specification requires that compilers maintain a
# back chain by default, so unwinding already works without a
# dedicated frame pointer.
# https://openpowerfoundation.org/specifications/64bitelfabi/
return True
if machine == "x86_64":
final_opt = ""
for opt in cflags.split():
Expand Down
8 changes: 8 additions & 0 deletions 8 configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions 3 configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2557,6 +2557,9 @@ AS_VAR_IF([ac_cv_gcc_compat], [yes], [
frame_pointer_cflags="$frame_pointer_cflags -mno-thumb"
], [], [-Werror])
])
AS_CASE([$host_cpu], [powerpc64le], [
frame_pointer_cflags=""
])
AS_CASE([$host_cpu], [s390*], [
AX_CHECK_COMPILE_FLAG([-mbackchain], [
dnl Do not use no-omit-frame-pointer; see gh-149362
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.