summaryrefslogtreecommitdiffstats
path: root/tools/depends/native/python3/01-distutil-flags.patch
blob: 28cd2f98baa7ca00320aa7e186eb8b51353b6f23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -214,6 +214,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']