From 31b4818c7f90dd3060fc5f52283a3d55e1f2d377 Mon Sep 17 00:00:00 2001 From: liujia178 Date: Sat, 20 Apr 2024 14:43:12 +0800 Subject: [PATCH] Cross-compilation capability for OHOS system support. Issue: https://gitee.com/openharmony/third_party_llvm-project/issues/I9GMT2 Signed-off-by: liujia178 Change-Id: I07008b572f0b47085cb78030a20031335fc0df96 --- cross_compile_support_ohos.patch | 34 ++++++++++++++++++++++++++++++++ ncurses.spec | 9 +++++++++ 2 files changed, 43 insertions(+) create mode 100644 cross_compile_support_ohos.patch diff --git a/cross_compile_support_ohos.patch b/cross_compile_support_ohos.patch new file mode 100644 index 0000000..f93b67c --- /dev/null +++ b/cross_compile_support_ohos.patch @@ -0,0 +1,34 @@ +--- ncurses/config.sub 2021-08-15 00:20:38.000000000 +0800 ++++ ncurses/config.sub 2024-03-06 16:39:06.453008203 +0800 +@@ -1748,7 +1748,7 @@ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ +- | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*) ++ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* | ohos*) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) +@@ -1786,6 +1786,8 @@ + ;; + *-eabi* | *-gnueabi*) + ;; ++ *-ohos*) ++ ;; + -*) + # Blank kernel with real OS is always fine. + ;; +--- ncurses/configure 2024-03-15 17:43:30.098557323 +0800 ++++ ncurses/configure 2024-03-15 17:39:42.282556871 +0800 +@@ -16508,6 +16508,10 @@ + INSTALL_OPT_S= + fi + ++if test "${with_strip_program+set}" = set; then ++ INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=$with_strip_program" ++fi ++ + : "${INSTALL:=install}" + echo "$as_me:16512: checking if install accepts -p option" >&5 + echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6 + diff --git a/ncurses.spec b/ncurses.spec index dacd126..ecaad20 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -15,6 +15,8 @@ Patch14: backport-0001-CVE-2023-29491-fix-configure-root-args-option.patch Patch15: backport-0002-CVE-2023-29491-env-access.patch Patch18: backport-CVE-2023-50495.patch Patch19: backport-CVE-2023-45918.patch +# OHOS_LOCAL +Patch99: cross_compile_support_ohos.patch BuildRequires: gcc gcc-c++ gpm-devel pkgconfig @@ -250,6 +252,13 @@ xz NEWS %{_mandir}/man7/* %changelog +# OHOS_LOCAL begin +* Fri Mar 15 2024 liujia178 - 6.3-oh-0 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:cross-compilation capability for OHOS system support. +# OHOS_LOCAL end * Tue Jan 30 2024 yanglu - 6.3-10 - Type:CVE - CVE:CVE-2023-45918