--- Python-2.7.6/Lib/distutils/sysconfig.py.~1~ 2013-11-09 23:36:40.000000000 -0800 +++ Python-2.7.6/Lib/distutils/sysconfig.py 2014-05-14 13:33:21.453593946 -0700 @@ -208,6 +208,15 @@ else: archiver = ar + ' ' + ar_flags + # Force PIC compilation. Determine if GNU compiler or otherwise + # and set the PIC flag(s) accordingly. Defaults to Studio compiler. + out = os.popen(cc + ' --version 2>/dev/null', 'r') + out_string = out.read() + out.close() + result = re.search(' (\d+\.\d+(\.\d+)*)', out_string) + kpic_flags = "-fPIC -DPIC" if result else "-KPIC -DPIC" + cflags += ' ' + kpic_flags + cc_cmd = cc + ' ' + cflags compiler.set_executables( preprocessor=cpp,