components/python/greenlet/CC.sh
changeset 1605 7fc7910b6d94
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/greenlet/CC.sh	Tue Dec 17 15:59:46 2013 -0800
@@ -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 $@; do
+	case ${arg} in
+	'-KPIC')
+		continue
+		;;
+	*)
+		newargs="${newargs} ${arg}"
+		;;
+	esac
+done
+
+exec ${GCC} ${newargs}