Bug 666966

Summary: Minimize non-standard compiler flags needed for PyPy
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: pypyAssignee: Dave Malcolm <dmalcolm>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: dmalcolm, fijall
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: pypy-1.7-2.fc17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-16 22:20:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dave Malcolm 2011-01-03 20:40:58 UTC
Description of problem:
pypy.spec currently filters our "standard" distro-wide CFLAGS, with this comment and code:

  # https://bugzilla.redhat.com/show_bug.cgi?id=588941#c18
  # The generated Makefile compiles the .c files into assembler (.s), rather
  # than direct to .o  It then post-processes this assembler to locate
  # garbage-collection roots (building .lbl.s and .gcmap files, and a
  # "gcmaptable.s").  (The modified .lbl.s files have extra code injected
  # within them).
  # Unfortunately, the code to do this:
  #   pypy-1.4/pypy/translator/c/gcc/trackgcroot.py
  # doesn't interract well with the results of using our standard build flags.
  # For now, filter our CFLAGS of everything that could be conflicting with
  # pypy.  Need to check these and reenable ones that are okay later.
  export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//')

I'm filing this bug to track this TODO item.

Version-Release number of selected component (if applicable):
pypy-1.4.1-3.fc15.x86_64

Comment 1 Maciej Fijalkowski 2011-01-04 11:29:41 UTC
This is a "won't fix" on pypy side.

Comment 2 Dave Malcolm 2011-05-25 23:09:37 UTC
(See also https://bugzilla.redhat.com/show_bug.cgi?id=707707#c8 onwards)

Comment 3 Dave Malcolm 2011-12-16 22:20:27 UTC
As of 1.7-2, I'm using --gcrootfinder=shadowstack (to avoid relying on implementation details of gcc), and using the distro-wide compilation flags:
http://pkgs.fedoraproject.org/gitweb/?p=pypy.git;a=commitdiff;h=416c353a67345f32fa7da698b18eef5ad1d1e77e