Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 320912 Details for
Bug 430810
[PATCH] Backport patch to avoid -fno-strict-aliasing from Python 3.x to Python 2.7.3
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Backported patch
python-2.7.3-strict-aliasing.patch (text/plain), 1.82 KB, created by
Richard Yao (RETIRED)
on 2012-08-10 17:13:58 UTC
(
hide
)
Description:
Backported patch
Filename:
MIME Type:
Creator:
Richard Yao (RETIRED)
Created:
2012-08-10 17:13:58 UTC
Size:
1.82 KB
patch
obsolete
>diff --git a/configure.in b/configure.in >index 3f5b3b9..6f1365d 100644 >--- a/configure.in >+++ b/configure.in >@@ -974,20 +974,37 @@ AC_SUBST(UNIVERSAL_ARCH_FLAGS) > # tweak BASECFLAGS based on compiler and platform > case $GCC in > yes) >- # Python violates C99 rules, by casting between incompatible >- # pointer types. GCC may generate bad code as a result of that, >- # so use -fno-strict-aliasing if supported. >- AC_MSG_CHECKING(whether $CC accepts -fno-strict-aliasing) >+ # Python doesn't violate C99 aliasing rules, but older versions of >+ # GCC produce warnings for legal Python code. Enable >+ # -fno-strict-aliasing on versions of GCC that support but produce >+ # warnings. See Issue3326 >+ AC_MSG_CHECKING(whether $CC accepts and needs -fno-strict-aliasing) > ac_save_cc="$CC" > CC="$CC -fno-strict-aliasing" >- AC_CACHE_VAL(ac_cv_no_strict_aliasing_ok, >+ save_CFLAGS="$CFLAGS" >+ AC_CACHE_VAL(ac_cv_no_strict_aliasing, > AC_COMPILE_IFELSE( >- [AC_LANG_PROGRAM([[]], [[]])], >- [ac_cv_no_strict_aliasing_ok=yes], >- [ac_cv_no_strict_aliasing_ok=no])) >+ [ >+ AC_LANG_PROGRAM([[]], [[]]) >+ ],[ >+ CC="$ac_save_cc -fstrict-aliasing" >+ CFLAGS="$CFLAGS -Werror -Wstrict-aliasing" >+ AC_COMPILE_IFELSE( >+ [ >+ AC_LANG_PROGRAM([[void f(int **x) {}]], >+ [[double *x; f((int **) &x);]]) >+ ],[ >+ ac_cv_no_strict_aliasing=no >+ ],[ >+ ac_cv_no_strict_aliasing=yes >+ ]) >+ ],[ >+ ac_cv_no_strict_aliasing=no >+ ])) >+ CFLAGS="$save_CFLAGS" > CC="$ac_save_cc" >- AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok) >- if test $ac_cv_no_strict_aliasing_ok = yes >+ AC_MSG_RESULT($ac_cv_no_strict_aliasing) >+ if test $ac_cv_no_strict_aliasing = yes > then > BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" > fi
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 430810
: 320912