aboutsummaryrefslogtreecommitdiff
path: root/tools/depends/target/python3/crosscompile.patch
blob: ac431315935cd3fca779c30886b73f35687aef6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
--- a/configure.ac
+++ b/configure.ac
@@ -1221,15 +1221,6 @@
         ARFLAGS="rcs"
 fi
 
-AC_CHECK_TOOLS([READELF], [readelf], [:])
-if test "$cross_compiling" = yes; then
-    case "$READELF" in
-	readelf|:)
-	AC_MSG_ERROR([readelf for the host is required for cross builds])
-	;;
-    esac
-fi
-AC_SUBST(READELF)
 
 
 case $MACHDEP in
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1695,10 +1695,11 @@
 # This goes into $(exec_prefix)
 sharedinstall: sharedmods
 	$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
+ 	    --skip-build \
 	   	--prefix=$(prefix) \
-		--install-scripts=$(BINDIR) \
-		--install-platlib=$(DESTSHARED) \
-		--root=$(DESTDIR)/
+		--install-scripts=$(DESTDIR)$(BINDIR) \
+		--install-platlib=$(DESTDIR)$(DESTSHARED) \
+		--root=/
 	-rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py
 	-rm -r $(DESTDIR)$(DESTSHARED)/__pycache__
 
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,7 @@
 
 
 # Compile extensions used to test Python?
-TEST_EXTENSIONS = True
+TEST_EXTENSIONS = False
 
 # This global variable is used to hold the list of modules to be disabled.
 DISABLED_MODULE_LIST = []
@@ -58,7 +58,7 @@
     return sys.platform
 
 
-CROSS_COMPILING = ("_PYTHON_HOST_PLATFORM" in os.environ)
+CROSS_COMPILING = ("_PYTHON_HOST_PLATFORM" in os.environ) or ('CROSS_COMPILE_TARGET' in os.environ)
 HOST_PLATFORM = get_platform()
 MS_WINDOWS = (HOST_PLATFORM == 'win32')
 CYGWIN = (HOST_PLATFORM == 'cygwin')
@@ -445,6 +445,7 @@
         self.compiler.set_executables(**args)
 
     def build_extensions(self):
+        return
         self.set_srcdir()
         self.set_compiler_executables()
         self.configure_compiler()