aboutsummaryrefslogtreecommitdiff
path: root/tools/depends/target/python3/crosscompile.patch
blob: bf9b4f6a26e819fc521a0f50f6987506ef43d3c4 (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
64
--- a/configure.ac
+++ b/configure.ac
@@ -1589,15 +1589,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
@@ -2227,10 +2227,11 @@
 # This goes into $(exec_prefix)
 sharedinstall: all
 	$(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
@@ -77,7 +77,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')
@@ -488,6 +488,7 @@
         self.compiler.set_executables(**args)
 
     def build_extensions(self):
+        return
         self.set_srcdir()
         self.set_compiler_executables()
         self.configure_compiler()
@@ -1343,7 +1343,7 @@
         # These are extensions are required to bootstrap the interpreter or
         # build process.
         self.detect_simple_extensions()
-        self.detect_test_extensions()
+        #self.detect_test_extensions()
         self.detect_readline_curses()
         self.detect_crypt()
         self.detect_openssl_hashlib()