Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 430810

Summary: [PATCH] Backport patch to avoid -fno-strict-aliasing from Python 3.x to Python 2.7.3
Product: Gentoo Linux Reporter: Richard Yao (RETIRED) <ryao>
Component: [OLD] DevelopmentAssignee: Python Gentoo Team <python>
Status: RESOLVED CANTFIX    
Severity: enhancement Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
URL: http://bugs.python.org/issue3326
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Backported patch

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