Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure.ac -g debug compiler option when not Py_DEBUG #72656

Closed
ChrisByers mannequin opened this issue Oct 18, 2016 · 2 comments
Closed

configure.ac -g debug compiler option when not Py_DEBUG #72656

ChrisByers mannequin opened this issue Oct 18, 2016 · 2 comments
Labels
build The build process and cross-build

Comments

@ChrisByers
Copy link
Mannequin

ChrisByers mannequin commented Oct 18, 2016

BPO 28470

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2016-10-18.16:55:09.269>
labels = ['build']
title = 'configure.ac -g debug compiler option when not Py_DEBUG'
updated_at = <Date 2016-10-18.16:55:09.269>
user = 'https://bugs.python.org/ChrisByers'

bugs.python.org fields:

activity = <Date 2016-10-18.16:55:09.269>
actor = 'Chris Byers'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Build']
creation = <Date 2016-10-18.16:55:09.269>
creator = 'Chris Byers'
dependencies = []
files = []
hgrepos = []
issue_num = 28470
keywords = []
message_count = 1.0
messages = ['278910']
nosy_count = 1.0
nosy_names = ['Chris Byers']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue28470'
versions = ['Python 2.7']

@ChrisByers
Copy link
Mannequin Author

ChrisByers mannequin commented Oct 18, 2016

The configure.ac file adds the "-g" debug compiler option to both debug and non-debug builds, so debug information is built for production builds. This seems likely a bug, unless there was a specific reason to do this.

Around line 1480 of configure.ac:
if test "$Py_DEBUG" = 'true' ; then
# Optimization messes up debuggers, so turn it off for
# debug builds.
if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
OPT="-g -Og -Wall $STRICT_PROTO"
else
OPT="-g -O0 -Wall $STRICT_PROTO"
fi
else
OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
fi
The else case to the first statement (if test "$Py_DEBUG"...) should not contain -g should it?

@ChrisByers ChrisByers mannequin added the build The build process and cross-build label Oct 18, 2016
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@iritkatriel
Copy link
Member

That code snippet no is no longer there.

@iritkatriel iritkatriel closed this as not planned Won't fix, can't repro, duplicate, stale Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build
Projects
None yet
Development

No branches or pull requests

1 participant