Skip to content

Commit

Permalink
workaround compiler bug on RHEL 3 / CentOS 3
Browse files Browse the repository at this point in the history
compile with -Os on RHEL 3 / CentOS 3

see #4
  • Loading branch information
schmir committed Jan 31, 2012
1 parent 26c4643 commit 199563f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#! /usr/bin/env python

import sys, os, glob
import sys, os, glob, platform

# workaround segfaults on openbsd. see
# workaround segfaults on openbsd and RHEL 3 / CentOS 3 . see
# https://bitbucket.org/ambroff/greenlet/issue/11/segfault-on-openbsd-i386
if sys.platform == "openbsd4" and os.uname()[-1] == "i386":
# https://github.com/python-greenlet/greenlet/issues/4
if ((sys.platform == "openbsd4" and os.uname()[-1] == "i386")
or ".EL-i686-with-redhat-3." in platform.platform()):
os.environ["CFLAGS"] = ("%s %s" % (os.environ.get("CFLAGS", ""), "-Os")).lstrip()

try:
Expand Down

0 comments on commit 199563f

Please sign in to comment.