From 8d0bd00c4a04994e42ec62c958635ab5326df865 Mon Sep 17 00:00:00 2001 From: yykk Date: Thu, 25 Apr 2024 16:28:24 +0800 Subject: [PATCH] Adapt for LLVM-17, remove invalid compilation parameters --- ...-use-llvm-tools-version-15-for-build.patch | 4 +-- ...h => 0026-change-clang-compiler-path.patch | 0 0027-feat-adapt-for-llvm17.patch | 29 +++++++++++++++++++ distributed-build.spec | 7 ++++- 4 files changed, 37 insertions(+), 3 deletions(-) rename 0021-change-clang-compiler-path.patch => 0026-change-clang-compiler-path.patch (100%) create mode 100644 0027-feat-adapt-for-llvm17.patch diff --git a/0013-feature-use-llvm-tools-version-15-for-build.patch b/0013-feature-use-llvm-tools-version-15-for-build.patch index 2de1e9c..a69e606 100644 --- a/0013-feature-use-llvm-tools-version-15-for-build.patch +++ b/0013-feature-use-llvm-tools-version-15-for-build.patch @@ -71,7 +71,7 @@ index b7e1c45..e5d4d54 100644 } - libclang_rt_file = "${clang_base_path}/lib/clang/12.0.1/lib/${abi_target}/libclang_rt.builtins.a" -+ libclang_rt_file = "${clang_base_path}/lib/clang/15.0.7/lib/${abi_target}/libclang_rt.builtins.a" ++ libclang_rt_file = "${clang_base_path}/lib/clang/17.0.6/lib/${abi_target}/libclang_rt.builtins.a" } diff --git a/toolchain/gcc_toolchain.gni b/toolchain/gcc_toolchain.gni index 0c91ccf..6a68e42 100755 @@ -95,7 +95,7 @@ index 1e95b63..7794e6f 100755 if (is_clang) { # Clang compiler version. Clang files are placed at version-dependent paths. - clang_version = "12.0.1" -+ clang_version = "15.0.7" ++ clang_version = "17.0.6" } use_custom_clang = true } diff --git a/0021-change-clang-compiler-path.patch b/0026-change-clang-compiler-path.patch similarity index 100% rename from 0021-change-clang-compiler-path.patch rename to 0026-change-clang-compiler-path.patch diff --git a/0027-feat-adapt-for-llvm17.patch b/0027-feat-adapt-for-llvm17.patch new file mode 100644 index 0000000..99baa8b --- /dev/null +++ b/0027-feat-adapt-for-llvm17.patch @@ -0,0 +1,29 @@ +From 46c7f9e5780634e091f5bbe399602641e254f438 Mon Sep 17 00:00:00 2001 +From: yykk +Date: Fri, 26 Apr 2024 14:56:38 +0800 +Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8DLLVM17=EF=BC=8C=E5=88=A0?= + =?UTF-8?q?=E9=99=A4=E4=B8=8D=E6=94=AF=E6=8C=81=E7=9A=84=E5=8F=82=E6=95=B0?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + config/compiler/BUILD.gn | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn +index 0049dc0..6118cc2 100644 +--- a/config/compiler/BUILD.gn ++++ b/config/compiler/BUILD.gn +@@ -734,8 +734,6 @@ config("compiler_cpu_abi") { + } + cflags += [ + "-march=$arm_arch", +- "-mfloat-abi=$arm_float_abi", +- "-mfpu=$arm_fpu", + ] + ldflags += [ "-march=$arm_arch" ] + } +-- +2.38.1.windows.1 + diff --git a/distributed-build.spec b/distributed-build.spec index e78fb26..4211b77 100644 --- a/distributed-build.spec +++ b/distributed-build.spec @@ -2,7 +2,7 @@ %global openHarmony_source_release OpenHarmony-v3.2-Release Name: distributed-build Version: 1.0.0 -Release: 9 +Release: 10 Summary: openEuler embedded softbus build tools License: Apache-2.0 URL: https://gitee.com/openharmony/build @@ -33,6 +33,8 @@ Patch0022: 0022-add-build-gn-file-of-icu-jsoncpp-zlib.patch Patch0023: 0023-feat-for-embedded-comment-out-sysroot_hash.patch Patch0024: 0024-feat-for-embedded-add-linux_arm64-toolchain.patch Patch0025: 0025-feat-for-embedded-fix-sysroot-path.patch +Patch0026: 0026-change-clang-compiler-path.patch +Patch0027: 0027-feat-adapt-for-llvm17.patch BuildArch: noarch %description @@ -52,6 +54,9 @@ cp -rp %{_builddir}/build-%{openHarmony_source_release}/* %{buildroot}/opt/dist /opt/distributed-middleware-build %changelog +* Tue Mar 12 2024 s_c_c - 1.0.0-10 +- Adapt for LLVM-17, remove invalid compilation parameters + * Tue Mar 12 2024 s_c_c - 1.0.0-9 - Fix sysroot path and add toolchain for embedded -- Gitee