diff --git a/0001-Backport-RISCV-Handle-o-inline-asm-memory-constraint.patch b/0001-Backport-RISCV-Handle-o-inline-asm-memory-constraint.patch deleted file mode 100644 index c3a5f0a90f7cddf730aa8b710d8a581847ce4dc5..0000000000000000000000000000000000000000 --- a/0001-Backport-RISCV-Handle-o-inline-asm-memory-constraint.patch +++ /dev/null @@ -1,98 +0,0 @@ -From a831cf03a32854ac193389819189e6ee93b0ecaf Mon Sep 17 00:00:00 2001 -From: wangpc -Date: Tue, 6 Jun 2023 17:49:58 +0800 -Subject: [Backport][RISCV] Handle "o" inline asm memory constraint - -Reference: https://reviews.llvm.org/rG26e41a80d07c - -Originally By: wangpc - -This is the same as D100412. - -We just found the same crash when we tried to compile some packages -like mariadb, php, etc. - -For constraint "o", it means "A memory operand is allowed, but -only if the address is offsettable". So I think it can be handled -just like constraint "m" for RISCV target. - -And we print verbose information when unsupported constraints occur. - -Reviewed By: asb - -Differential Revision: https://reviews.llvm.org/D151979 ---- - lib/Target/RISCV/RISCVISelDAGToDAG.cpp | 4 +- - test/CodeGen/RISCV/inline-asm.ll | 53 ++++++++++++++++++++++++++ - 2 files changed, 56 insertions(+), 1 deletion(-) - -diff --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp -index d5826b46d738..a98dcea7dd8d 100644 ---- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp -+++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp -@@ -1733,6 +1733,7 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) { - bool RISCVDAGToDAGISel::SelectInlineAsmMemoryOperand( - const SDValue &Op, unsigned ConstraintID, std::vector &OutOps) { - switch (ConstraintID) { -+ case InlineAsm::Constraint_o: - case InlineAsm::Constraint_m: - // We just support simple memory operands that have a single address - // operand and need no special handling. -@@ -1742,7 +1743,8 @@ bool RISCVDAGToDAGISel::SelectInlineAsmMemoryOperand( - OutOps.push_back(Op); - return false; - default: -- break; -+ report_fatal_error("Unexpected asm memory constraint " + -+ InlineAsm::getMemConstraintName(ConstraintID)); - } - - return true; -diff --git a/llvm/test/CodeGen/RISCV/inline-asm.ll b/llvm/test/CodeGen/RISCV/inline-asm.ll -index 0b04a7df2d18..feaa40b14e9d 100644 ---- a/llvm/test/CodeGen/RISCV/inline-asm.ll -+++ b/llvm/test/CodeGen/RISCV/inline-asm.ll -@@ -82,6 +82,40 @@ define i32 @constraint_m2(i32* %a) nounwind { - ret i32 %1 - } - -+define void @constraint_o(i32* %a) nounwind { -+; RV32I-LABEL: constraint_o: -+; RV32I: # %bb.0: -+; RV32I-NEXT: #APP -+; RV32I-NEXT: #NO_APP -+; RV32I-NEXT: ret -+; -+; RV64I-LABEL: constraint_o: -+; RV64I: # %bb.0: -+; RV64I-NEXT: #APP -+; RV64I-NEXT: #NO_APP -+; RV64I-NEXT: ret -+ call void asm sideeffect "", "=*o"(i32* elementtype(i32) %a) -+ ret void -+} -+ -+define i32 @constraint_o2(i32* %a) nounwind { -+; RV32I-LABEL: constraint_o2: -+; RV32I: # %bb.0: -+; RV32I-NEXT: #APP -+; RV32I-NEXT: lw a0, 0(a0) -+; RV32I-NEXT: #NO_APP -+; RV32I-NEXT: ret -+; -+; RV64I-LABEL: constraint_o2: -+; RV64I: # %bb.0: -+; RV64I-NEXT: #APP -+; RV64I-NEXT: lw a0, 0(a0) -+; RV64I-NEXT: #NO_APP -+; RV64I-NEXT: ret -+ %1 = tail call i32 asm "lw $0, $1", "=r,*o"(i32* elementtype(i32) %a) -+ ret i32 %1 -+} -+ - define void @constraint_I() nounwind { - ; RV32I-LABEL: constraint_I: - ; RV32I: # %bb.0: --- -2.28.0.windows.1 - diff --git a/0002-Prevent-environment-variables-from-exceeding-NAME_MA.patch b/0002-Prevent-environment-variables-from-exceeding-NAME_MA.patch deleted file mode 100644 index ca210c0f281592f8aa3a8b091fed20ea3348a9ee..0000000000000000000000000000000000000000 --- a/0002-Prevent-environment-variables-from-exceeding-NAME_MA.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 4673c2eaba443678c4dc6ae74ea16a489b415fed Mon Sep 17 00:00:00 2001 -From: liyunfei -Date: Tue, 19 Sep 2023 09:31:43 +0800 -Subject: [PATCH] Prevent environment variables from exceeding NAME_MAX - ---- - llvm/lib/Support/Unix/Path.inc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc -index 2ae7c6dc..f13f3165 100644 ---- a/llvm/lib/Support/Unix/Path.inc -+++ b/llvm/lib/Support/Unix/Path.inc -@@ -1427,8 +1427,12 @@ static const char *getEnvTempDir() { - // variable. - const char *EnvironmentVariables[] = {"TMPDIR", "TMP", "TEMP", "TEMPDIR"}; - for (const char *Env : EnvironmentVariables) { -- if (const char *Dir = std::getenv(Env)) -+ if (const char *Dir = std::getenv(Env)) { -+ if(std::strlen(Dir) > NAME_MAX) { -+ continue; -+ } - return Dir; -+ } - } - - return nullptr; --- -2.28.0.windows.1 - diff --git a/README.en.md b/README.en.md index 2badc1cd3f01ab325eb9e5ba1dff589e6aa8e519..f03a807d1c9d22fbc98f02c172ff27c5be107018 100644 --- a/README.en.md +++ b/README.en.md @@ -1,36 +1,3 @@ # llvm-15 -#### Description -The LLVM Compiler Infrastructure - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +This package has been deprecated \ No newline at end of file diff --git a/README.md b/README.md index 53337a6b037b7f4a5cbab3d15e37b3f7c3d992d9..97cac09e03b550d71986256dc3b0b1462c273e2f 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,3 @@ # The LLVM Compiler Infrastructure -#### 介绍 -The LLVM Core libraries provide a modern source- and target-independent optimizer, along with code generation support for many popular CPUs (as well as some less common ones!) These libraries are built around a well specified code representation known as the LLVM intermediate representation ("LLVM IR"). - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +该软件包已废弃 \ No newline at end of file diff --git a/cmake-15.0.7.src.tar.xz b/cmake-15.0.7.src.tar.xz deleted file mode 100644 index 8a482e177d194a1d9ba1fe3fee79a2f3930b0c18..0000000000000000000000000000000000000000 Binary files a/cmake-15.0.7.src.tar.xz and /dev/null differ diff --git a/llvm-15.0.7.src.tar.xz b/llvm-15.0.7.src.tar.xz deleted file mode 100644 index 4d65c526e65470b13f02af75b021132756db47a3..0000000000000000000000000000000000000000 Binary files a/llvm-15.0.7.src.tar.xz and /dev/null differ diff --git a/llvm.spec b/llvm.spec deleted file mode 100644 index 89fe33a2ed52ad8d3c58daeb2fad8caf77bf2e40..0000000000000000000000000000000000000000 --- a/llvm.spec +++ /dev/null @@ -1,325 +0,0 @@ -%bcond_with sys_llvm -%bcond_without check - -%global maj_ver 15 -%global min_ver 0 -%global patch_ver 7 - -%if %{with sys_llvm} -%global pkg_name llvm -%global install_prefix %{_prefix} -%else -%global pkg_name llvm%{maj_ver} -%global install_prefix %{_libdir}/%{name} -%endif - -%global install_bindir %{install_prefix}/bin -%global install_includedir %{install_prefix}/include -%if 0%{?__isa_bits} == 64 -%global install_libdir %{install_prefix}/lib64 -%else -%global install_libdir %{install_prefix}/lib -%endif -%global install_srcdir %{install_prefix}/src -%global install_docdir %{install_prefix}/share/doc - -%global max_link_jobs %{_smp_build_ncpus} -%global targets_to_build "all" -%global experimental_targets_to_build "" - -%global build_install_prefix %{buildroot}%{install_prefix} -%global llvm_triple %{_host} - -# Disable LTO as this causes crash if gcc lto enabled. -%define _lto_cflags %{nil} - -Name: %{pkg_name} -Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 7 -Summary: The Low Level Virtual Machine - -License: NCSA -URL: http://llvm.org -Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/llvm-%{version}.src.tar.xz -Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/cmake-%{version}.src.tar.xz - -Patch1: 0001-Backport-RISCV-Handle-o-inline-asm-memory-constraint.patch -Patch2: 0002-Prevent-environment-variables-from-exceeding-NAME_MA.patch - -BuildRequires: binutils-devel -BuildRequires: cmake -BuildRequires: gcc -BuildRequires: gcc-c++ -BuildRequires: libedit-devel -BuildRequires: libffi-devel -BuildRequires: multilib-rpm-config -BuildRequires: ncurses-devel -BuildRequires: ninja-build -BuildRequires: python3-devel -BuildRequires: python3-psutil -BuildRequires: python3-recommonmark -BuildRequires: python3-sphinx -BuildRequires: python3-setuptools -BuildRequires: zlib-devel - -Requires: %{name}-libs%{?_isa} = %{version}-%{release} - -Provides: llvm(major) = %{maj_ver} - -%description -LLVM is a compiler infrastructure designed for compile-time, link-time, -runtime, and idle-time optimization of programs from arbitrary programming -languages. The compiler infrastructure includes mirror sets of programming -tools as well as libraries with equivalent functionality. - -%package devel -Summary: Libraries and header files for LLVM -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: %{name}-libs%{?_isa} = %{version}-%{release} -Requires: libedit-devel -Requires: %{name}-static%{?_isa} = %{version}-%{release} - -Requires(post): %{_sbindir}/alternatives -Requires(postun): %{_sbindir}/alternatives - -Provides: llvm-devel(major) = %{maj_ver} - -%description devel -This package contains library and header files needed to develop new native -programs that use the LLVM infrastructure. - -%package doc -Summary: Documentation for LLVM -BuildArch: noarch -Requires: %{name} = %{version}-%{release} - -%description doc -Documentation for the LLVM compiler infrastructure. - -%package libs -Summary: LLVM shared libraries - -%description libs -Shared libraries for the LLVM compiler infrastructure. - -%package static -Summary: LLVM static libraries -Conflicts: %{name}-devel < 8 - -Provides: llvm-static(major) = %{maj_ver} - -%description static -Static libraries for the LLVM compiler infrastructure. - -%package test -Summary: LLVM regression tests -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: %{name}-libs%{?_isa} = %{version}-%{release} - -Provides: llvm-test(major) = %{maj_ver} - -%description test -LLVM regression tests. - -%package googletest -Summary: LLVM's modified googletest sources - -%description googletest -LLVM's modified googletest sources. - -%prep -%setup -T -q -b 1 -n cmake-%{version}.src -cd .. -mv cmake-%{version}.src cmake -%setup -T -q -b 0 -n llvm-%{version}.src -%autopatch -p2 - -pathfix.py -i %{__python3} -pn \ - test/BugPoint/compile-custom.ll.py \ - tools/opt-viewer/*.py \ - utils/update_cc_test_checks.py - -%build -mkdir -p _build -cd _build - -%cmake .. -G Ninja \ - -DBUILD_SHARED_LIBS:BOOL=OFF \ - -DLLVM_PARALLEL_LINK_JOBS=%{max_link_jobs} \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_SKIP_RPATH:BOOL=ON \ - -DLLVM_TARGETS_TO_BUILD=%{targets_to_build} \ - -DLLVM_ENABLE_LIBCXX:BOOL=OFF \ - -DLLVM_ENABLE_ZLIB:BOOL=ON \ - -DLLVM_ENABLE_FFI:BOOL=ON \ - -DLLVM_ENABLE_RTTI:BOOL=ON \ - -DLLVM_USE_PERF:BOOL=ON \ - -DLLVM_BINUTILS_INCDIR=%{_includedir} \ - -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{experimental_targets_to_build} \ - -DLLVM_BUILD_RUNTIME:BOOL=ON \ - -DLLVM_INCLUDE_TOOLS:BOOL=ON \ - -DLLVM_BUILD_TOOLS:BOOL=ON \ - -DLLVM_INCLUDE_TESTS:BOOL=ON \ - -DLLVM_BUILD_TESTS:BOOL=ON \ - -DLLVM_LIT_ARGS=-v \ - -DLLVM_INCLUDE_EXAMPLES:BOOL=ON \ - -DLLVM_BUILD_EXAMPLES:BOOL=OFF \ - -DLLVM_INCLUDE_UTILS:BOOL=ON \ - -DLLVM_INSTALL_UTILS:BOOL=ON \ - -DLLVM_INCLUDE_DOCS:BOOL=ON \ - -DLLVM_BUILD_DOCS:BOOL=ON \ - -DLLVM_ENABLE_SPHINX:BOOL=ON \ - -DLLVM_ENABLE_DOXYGEN:BOOL=OFF \ - -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \ - -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ - -DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON \ - -DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \ - -DLLVM_DEFAULT_TARGET_TRIPLE=%{llvm_triple} \ - -DSPHINX_WARNINGS_AS_ERRORS=OFF \ - -DCMAKE_INSTALL_PREFIX=%{install_prefix} \ - -DLLVM_INSTALL_SPHINX_HTML_DIR=%{install_docdir}/html \ - -DSPHINX_EXECUTABLE=%{_bindir}/sphinx-build-3 \ -%if 0%{?__isa_bits} == 64 - -DLLVM_LIBDIR_SUFFIX=64 \ -%else - -DLLVM_LIBDIR_SUFFIX= \ -%endif - -DLLVM_INCLUDE_BENCHMARKS=OFF - -%ninja_build LLVM -%ninja_build - -%install -%ninja_install -C _build - -mkdir -p %{buildroot}/%{_bindir} - -# Install binaries needed for lit tests -for f in llvm-isel-fuzzer llvm-opt-fuzzer -do - install -m 0755 %{_builddir}/llvm-%{version}.src/_build/bin/$f %{buildroot}%{install_bindir} -done - -%if 0%{?__isa_bits} == 64 -install %{_builddir}/llvm-%{version}.src/_build/lib64/libLLVMTestingSupport.a %{buildroot}%{install_libdir} -%else -install %{_builddir}/llvm-%{version}.src/_build/lib/libLLVMTestingSupport.a %{buildroot}%{install_libdir} -%endif - -# Install gtest sources so clang can use them for gtest -install -d %{buildroot}%{install_srcdir} -install -d %{buildroot}%{install_srcdir}/utils/ -cp -R %{_builddir}/llvm-%{version}.src/utils/unittest %{buildroot}%{install_srcdir}/utils/ - -# Clang needs these for running lit tests. -cp %{_builddir}/llvm-%{version}.src/utils/update_cc_test_checks.py %{buildroot}%{install_srcdir}/utils/ -cp -R %{_builddir}/llvm-%{version}.src/utils/UpdateTestChecks %{buildroot}%{install_srcdir}/utils/ - -# Move header files -mkdir -p %{buildroot}/%{install_includedir} -ln -s ../../../%{install_includedir}/llvm %{buildroot}/%{install_includedir}/llvm -ln -s ../../../%{install_includedir}/llvm-c %{buildroot}/%{install_includedir}/llvm-c - -# Fix multi-lib -%multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h - -# Create ld.so.conf.d entry -mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d -cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf << EOF -%{install_libdir} -EOF - -# Remove opt-viewer, since this is just a compatibility package. -rm -Rf %{build_install_prefix}/share/opt-viewer - -cp -Rv ../cmake/Modules/* %{buildroot}%{install_libdir}/cmake/llvm - -%check -%if %{with check} -LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C ./_build/ -%endif - -%ldconfig_scriptlets libs - -%files -%license LICENSE.TXT -%{install_prefix}/share/man/man1/* -%{install_bindir}/* -%exclude %{install_bindir}/not -%exclude %{install_bindir}/count -%exclude %{install_bindir}/yaml-bench -%exclude %{install_bindir}/lli-child-target -%exclude %{install_bindir}/llvm-isel-fuzzer -%exclude %{install_bindir}/llvm-opt-fuzzer - -%files libs -%license LICENSE.TXT -%{install_libdir}/libLLVM-%{maj_ver}.so -%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf -%{install_libdir}/LLVMgold.so -%{install_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so -%{install_libdir}/libLTO.so* -%exclude %{install_libdir}/libLTO.so -%{install_libdir}/libRemarks.so* - -%files devel -%license LICENSE.TXT -%{install_includedir}/llvm -%{install_includedir}/llvm-c -%{install_libdir}/libLTO.so -%{install_libdir}/libLLVM.so -%{install_libdir}/cmake/llvm - -%files doc -%license LICENSE.TXT -%doc %{install_docdir}/html - -%files static -%license LICENSE.TXT -%{install_libdir}/*.a -%exclude %{install_libdir}/libLLVMTestingSupport.a - -%files test -%license LICENSE.TXT -%{install_bindir}/not -%{install_bindir}/count -%{install_bindir}/yaml-bench -%{install_bindir}/lli-child-target -%{install_bindir}/llvm-isel-fuzzer -%{install_bindir}/llvm-opt-fuzzer - -%files googletest -%license LICENSE.TXT -%{install_srcdir}/utils -%{install_libdir}/libLLVMTestingSupport.a - -%changelog -* Wed Jan 3 2024 liyunfei - 15.0.7-7 -- Remove sys_llvm for clang-15 toolchain. - -* Tue Sep 19 2023 liyunfei - 15.0.7-6 -- Prevent environment variables from exceeding NAME_MAX. - -* Wed Aug 9 2023 liyunfei - 15.0.7-5 -- Solve opaque pointer issue in Backport testcase. - -* Wed Jul 19 2023 liyunfei - 15.0.7-4 -- [RISCV] Handle "o" inline asm memory constraint. - -* Fri May 19 2023 cf-zhao - 15.0.7-3 -- Make this spec file support both system-version and multi-version. - -* Wed Jun 7 2023 Chenxi Mao - 15.0.7-2 -- Disable LTO as this causes crash if gcc lto enabled. - -* Mon Feb 20 2023 Chenxi Mao - 15.0.7-1 -- Upgrade to 15.0.7. - -* Wed Feb 8 2023 Chenxi Mao - 15.0.6-3 -- Create llvm-test/googletest to support clang/lld unit test. - -* Fri Feb 3 2023 Chenxi Mao - 15.0.6-2 -- Enable llvm utils tools. - -* Mon Jan 2 2023 Chenxi Mao - 15.0.6-1 -- Package init