build fails on AIX(-std=c99 is not valid)

Bug #1321752 reported by Brent S Elmer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python-Crypto
New
Undecided
Unassigned

Bug Description

When building on AIX using the xlc family of compilers, -std=c99 is not
valid. Instead it should be -qlanglvl=stdc99. Here is a patch to
setup.py to test and apply the change.

$ diff -u setup.py ../../pycrypto-2.6.1/setup.py
--- setup.py 2013-10-14 17:38:10.000000000 -0400
+++ ../../pycrypto-2.6.1/setup.py 2014-05-07 15:39:32.000000000
-0400
@@ -118,8 +118,12 @@
              self.__add_compiler_option("-std=c99")

              # ... but don't tell that to the aCC compiler on HP-UX
+ # or the xlc compiler on AIX
              if self.compiler.compiler_so[0] == 'cc' and
sys.platform.startswith('hp-ux'):
                  self.__remove_compiler_option("-std=c99")
+ elif self.compiler.compiler_so[0].startswith('xlc') and
sys.platform.startswith('aix'):
+ self.__remove_compiler_option("-std=c99")
+ self.__add_compiler_option("-qlanglvl=stdc99")

              # Make assert() statements always work
              self.__remove_compiler_option("-DNDEBUG")

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.