• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff --git a/config.sub b/config.sub
2index d74fb6d..e5e15e4 100755
3--- a/config.sub
4+++ b/config.sub
5@@ -1748,7 +1748,7 @@ case $os in
6 	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
7 	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
8 	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
9-	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*)
10+	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* | ohos*)
11 		;;
12 	# This one is extra strict with allowed versions
13 	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
14@@ -1786,6 +1786,8 @@ case $kernel-$os in
15 		;;
16 	*-eabi* | *-gnueabi*)
17 		;;
18+	*-ohos*)
19+		;;
20 	-*)
21 		# Blank kernel with real OS is always fine.
22 		;;
23diff --git a/configure.ac b/configure.ac
24index 1c25abd..1f5a417 100644
25--- a/configure.ac
26+++ b/configure.ac
27@@ -941,6 +941,8 @@ cat > conftest.c <<EOF
28 # elif defined(__aarch64__) && defined(__AARCH64EL__)
29 #  if defined(__ILP32__)
30         aarch64_ilp32-linux-gnu
31+#  elif defined(__OHOS__)
32+        aarch64-linux-ohos
33 #  else
34         aarch64-linux-gnu
35 #  endif
36@@ -959,8 +961,10 @@ cat > conftest.c <<EOF
37         armeb-linux-gnueabihf
38 #  endif
39 # elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
40-#  if defined(__ARMEL__)
41+#  if defined(__ARMEL__) && !defined(__OHOS__)
42         arm-linux-gnueabi
43+#  elif defined(__OHOS__)
44+        arm-linux-ohos
45 #  else
46         armeb-linux-gnueabi
47 #  endif
48@@ -1096,7 +1100,7 @@ AC_MSG_CHECKING([for multiarch])
49 AS_CASE([$ac_sys_system],
50   [Darwin*], [MULTIARCH=""],
51   [FreeBSD*], [MULTIARCH=""],
52-  [MULTIARCH=$($CC --print-multiarch 2>/dev/null)]
53+  [MULTIARCH=$($CC $CFLAGS --print-multiarch 2>/dev/null)]
54 )
55 AC_SUBST([MULTIARCH])
56 AC_MSG_RESULT([$MULTIARCH])
57diff --git a/setup.py b/setup.py
58index 4f122b6..fbff78a 100644
59--- a/setup.py
60+++ b/setup.py
61@@ -56,7 +56,7 @@
62
63
64 # This global variable is used to hold the list of modules to be disabled.
65-DISABLED_MODULE_LIST = []
66+DISABLED_MODULE_LIST = ['_uuid', '_socket', 'zlib', '_ctypes', 'binascii']
67
68 # --list-module-names option used by Tools/scripts/generate_module_names.py
69 LIST_MODULE_NAMES = False
70@@ -849,10 +849,11 @@ def configure_compiler(self):
71         if not CROSS_COMPILING:
72             add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
73             add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
74+            self.add_multiarch_paths()
75         # only change this for cross builds for 3.3, issues on Mageia
76         if CROSS_COMPILING:
77             self.add_cross_compiling_paths()
78-        self.add_multiarch_paths()
79+        self.compiler.add_library('python%s' % sys.version.split()[0][:4])
80         self.add_ldflags_cppflags()
81
82     def init_inc_lib_dirs(self):
83diff --git a/support_ohos_ignorefile.txt b/support_ohos_ignorefile.txt
84new file mode 100644
85index 0000000..e69de29
86