24363750 setting COMPILER=gcc with setup.py.mk doesn't affect all parts of the build
--- a/components/python/greenlet/CC.sh Tue Jul 26 16:57:10 2016 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-#! /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}
--- a/components/python/greenlet/Makefile Tue Jul 26 16:57:10 2016 -0700
+++ b/components/python/greenlet/Makefile Thu Jul 28 13:18:02 2016 -0700
@@ -45,14 +45,9 @@
ASLR_MODE = $(ASLR_NOT_APPLICABLE)
-CC = $(COMPONENT_DIR)/CC.sh
-
COMPONENT_PRE_BUILD_ACTION = \
$(MKDIR) $(SOURCE_DIR)/64
-LDSHARED= $(CC) -shared
-PYTHON_ENV += LDSHARED="$(LDSHARED)"
-
# One of the tests, test_exception_switch (tests.test_cpp.CPPTests),
# failed in 64-bit. Skip it for now.
COMPONENT_TEST_ENV += GREENLET_TEST_CPP=no
--- a/components/python/librabbitmq/Makefile Tue Jul 26 16:57:10 2016 -0700
+++ b/components/python/librabbitmq/Makefile Thu Jul 28 13:18:02 2016 -0700
@@ -50,8 +50,6 @@
ASLR_MODE = $(ASLR_NOT_APPLICABLE)
-PYTHON_ENV += LDSHARED="gcc -shared"
-
# common targets
build: $(BUILD_32_and_64)
--- a/make-rules/setup.py.mk Tue Jul 26 16:57:10 2016 -0700
+++ b/make-rules/setup.py.mk Thu Jul 28 13:18:02 2016 -0700
@@ -85,6 +85,11 @@
endif
PYTHON_ENV = CC="$(CC)"
+ifeq ($(COMPILER),gcc)
+PYTHON_ENV += CXX="$(CXX)"
+PYTHON_ENV += LDSHARED="$(CC) -shared"
+PYTHON_ENV += LDCXXSHARED="$(CXX) -shared"
+endif
PYTHON_ENV += CFLAGS="$(CFLAGS)"
PYTHON_ENV += PATH="$(PATH):$(SPRO_VROOT)/bin"