Issue 7714: configure GCC version detection fix for Darwin (original) (raw)

Issue7714

Created on 2010-01-16 16:25 by grobian, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python-2.5.1-darwin-gcc-version.patch grobian,2010-01-16 16:25 proposed patch to fix gcc version detection
Messages (4)
msg97883 - (view) Author: Fabian Groffen (grobian) Date: 2010-01-16 16:25
configure.in contains a check for the compiler in use for Darwin like this: gcc_version=`gcc -v 2>&1 | grep version cut -d\ -f3` This yields in a wrong answer if the output of gcc -v has "version" in another place as well, such as when --enable-version-specific-runtime-libs is enabled. A better way to retrieve the compiler version is to use GCC's -dumpversion argument, which works with Apple's GCC 3.3, 4.0.1 and 4.2.1 and doesn't need additional grepping/cutting, etc. The attached patch uses -dumpversion to retrieve the GCC version, which allows a successful configure run.
msg97937 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-01-17 11:45
Thanks for the patch, I didn't know of the -dumpversion flag.
msg97954 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-01-17 16:26
I've committed this in 77585 (trunk) and will port this to the other branches soon.
msg98993 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-02-07 11:54
Ported to 2.6 (r78065), 3.x (r78066) and 3.1 (r78068)
History
Date User Action Args
2022-04-11 14:56:56 admin set github: 51963
2010-02-07 11:54:11 ronaldoussoren set status: open -> closedmessages: +
2010-01-17 16:27:03 ronaldoussoren set assignee: ronaldoussoren
2010-01-17 16:26:49 ronaldoussoren set resolution: fixedmessages: + stage: patch review -> resolved
2010-01-17 11:45:21 ronaldoussoren set messages: +
2010-01-16 22:04:16 r.david.murray set nosy: + ronaldoussoren
2010-01-16 21:16:59 brian.curtin set priority: normalkeywords: + needs reviewstage: patch reviewversions: - Python 2.5
2010-01-16 16:25:10 grobian create