--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -196,6 +196,9 @@
         (cc, cxx, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
             get_config_vars('CC', 'CXX', 'CFLAGS',
                             'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
+        # get_config_vars returns host vars. clear cflags, ldshared for crosscompile use
+        cflags = ""
+        ldshared = cc + " -shared"

         if 'CC' in os.environ:
             newcc = os.environ['CC']