Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 430810 - [PATCH] Backport patch to avoid -fno-strict-aliasing from Python 3.x to Python 2.7.3
Summary: [PATCH] Backport patch to avoid -fno-strict-aliasing from Python 3.x to Pytho...
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: Normal enhancement (vote)
Assignee: Python Gentoo Team
URL: http://bugs.python.org/issue3326
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-08-10 17:13 UTC by Richard Yao (RETIRED)
Modified: 2012-08-11 15:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Backported patch (python-2.7.3-strict-aliasing.patch,1.82 KB, patch)
2012-08-10 17:13 UTC, Richard Yao (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Yao (RETIRED) gentoo-dev 2012-08-10 17:13:58 UTC
Created attachment 320912 [details, diff]
Backported patch

Currently, Python 2.7.3 is being built with -fno-strict-aliasing. Python 3.x has been patched at upstream to avoid -fno-strict-aliasing and the back can be trivially backported to Python 2.7.3.

I have attached the backported patch. It provides performance benefits to anyone using GCC 4.3 or later.
Comment 1 Mike Gilbert gentoo-dev 2012-08-10 17:42:49 UTC
Looks ok to me.

Do we want to add this to the patchset, or just stick it in FILESDIR?
Comment 2 Richard Yao (RETIRED) gentoo-dev 2012-08-10 18:16:06 UTC
(In reply to comment #1)
> Looks ok to me.
> 
> Do we want to add this to the patchset, or just stick it in FILESDIR?

It looks like all of the python 2.7.3 patches are in the patch set. It probably would be best to add it there.
Comment 3 Rafał Mużyło 2012-08-11 06:17:01 UTC
IIRC, those warnings are *not* false positives in <3.0 - there's a common macro in 2.x, that does violate strict aliasing and *does* produce wrong code then.

You'd better ask Arfrever to be sure.
Comment 4 Arfrever Frehtes Taifersar Arahesis 2012-08-11 14:10:52 UTC
This patch is unacceptable.
A part of API of Python 2 is incompatible with strict-aliasing rules.
http://www.python.org/dev/peps/pep-3123/
Comment 5 David J Cozatt 2012-08-11 14:51:46 UTC
This bug should then be closed