aboutsummaryrefslogtreecommitdiff
path: root/tools/depends/native/python3/01-distutil-flags.patch
blob: 8ab20bf6db7f3f999035b1d765adc1ab442fc35e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- 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']