• 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 5aa91cb..219426d 100644
25--- a/configure.ac
26+++ b/configure.ac
27@@ -742,6 +742,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@@ -760,8 +762,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@@ -876,7 +880,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 43e807f..b1d0c0a 100644
59--- a/setup.py
60+++ b/setup.py
61@@ -827,10 +827,11 @@ def configure_compiler(self):
62         if not CROSS_COMPILING:
63             add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
64             add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
65+            self.add_multiarch_paths()
66         # only change this for cross builds for 3.3, issues on Mageia
67         if CROSS_COMPILING:
68             self.add_cross_compiling_paths()
69-        self.add_multiarch_paths()
70+        self.compiler.add_library('python%s' % sys.version.split()[0][:4])
71         self.add_ldflags_cppflags()
72
73     def init_inc_lib_dirs(self):
74diff --git a/support_ohos_ignorefile.txt b/support_ohos_ignorefile.txt
75new file mode 100644
76index 0000000000..dc3802e6c5
77--- /dev/null
78+++ b/support_ohos_ignorefile.txt