17531161 greenlet doesn't build with gcc 4.7.X (add missing file) s11-update
authorDrew Fisher <drew.fisher@oracle.com>
Mon, 31 Mar 2014 21:40:30 -0700
branchs11-update
changeset 3033 c90fa3307f21
parent 3028 5e73a3a3f66a
child 3034 98abf9cbe649
17531161 greenlet doesn't build with gcc 4.7.X (add missing file)
components/python/greenlet/CC.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/greenlet/CC.sh	Mon Mar 31 21:40:30 2014 -0700
@@ -0,0 +1,21 @@
+#! /bin/sh
+
+# Wrapper script to work-around the fact that for Python 2.6,
+# /usr/lib/python2.6/config/Makefile always inserts -KPIC when
+# building shared objects regardless of the compiler version.
+
+GCC=/usr/gcc/4.7/bin/gcc
+
+newargs=""
+for arg in [email protected]; do
+	case ${arg} in
+	'-KPIC')
+		continue
+		;;
+	*)
+		newargs="${newargs} ${arg}"
+		;;
+	esac
+done
+
+exec ${GCC} ${newargs}