代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/flang 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
%bcond_without sys_llvm
%bcond_without check
%global maj_ver 17
%global min_ver 0
%global patch_ver 6
%if %{with sys_llvm}
%global pkg_name flang
%global bin_suffix %{nil}
%global install_prefix %{_prefix}
%else
%global pkg_name flang%{maj_ver}
%global bin_suffix -%{maj_ver}
%global install_prefix %{_libdir}/%{name}
%endif
%global install_bindir %{install_prefix}/bin
%global install_bindir %{install_prefix}/bin
%global install_includedir %{install_prefix}/include
%global install_libdir %{install_prefix}/%{_lib}
%global flang_version %{maj_ver}.%{min_ver}.%{patch_ver}
%global flang_srcdir flang-%{flang_version}.src
%global mlir_srcdir mlir-%{flang_version}.src
# Disable LTO as this causes crash if gcc lto enabled.
%global _lto_cflags %{nil}
%global _smp_mflags -j20
%global max_link_jobs 2
Name: %{pkg_name}
Version: %{flang_version}
Release: 1
Summary: a Fortran language front-end designed for integration with LLVM
License: Apache-2.0 WITH LLVM-exception
URL: https://flang.llvm.org
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{flang_version}/%{flang_srcdir}.tar.xz
# Flang test include mlir/test/lib/Analysis/TestAliasAnalysis.h, to fix build error
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{mlir_version}/%{mlir_srcdir}.tar.xz
# The Bye plugin is not distributed
Patch0: fedora-0001-flang-Remove-the-dependency-on-Bye.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: zlib-devel
BuildRequires: mlir-devel = %{version}
BuildRequires: ninja-build
BuildRequires: python3-lit >= 12.0.0
BuildRequires: clang-tools-extra = %{version}
# The new flang drive requires clang-devel
BuildRequires: clang-devel = %{version}
BuildRequires: clang = %{version}
%if %{with sys_llvm}
BuildRequires: llvm-devel = %{version}
BuildRequires: llvm-googletest = %{version}
BuildRequires: llvm-test = %{version}
BuildRequires: llvm-cmake-utils = %{version}
%else
BuildRequires: llvm%{maj_ver}-devel = %{version}
BuildRequires: llvm%{maj_ver}-googletest = %{version}
BuildRequires: llvm%{maj_ver}-test = %{version}
BuildRequires: llvm%{maj_ver}-cmake-utils = %{version}
%endif
%description
Flang is a ground-up implementation of a Fortran front end written in modern
C++.
%package devel
Summary: Flang header files
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Flang header files.
%prep
%setup -T -q -b 1 -n %{mlir_srcdir}
%autosetup -n %{flang_srcdir} -p2
mkdir -p include/mlir/test/lib/Analysis/
cp ../%{mlir_srcdir}/test/lib/Analysis/TestAliasAnalysis.h include/mlir/test/lib/Analysis/
%build
mkdir -p _build
cd _build
%cmake .. -GNinja \
-DMLIR_TABLEGEN_EXE=%{install_bindir}/mlir-tblgen \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DCLANG_DIR=%{install_libdir}/cmake/clang \
-DCLANG_LINK_CLANG_DYLIB:BOOL=ON \
-DLLVM_MAIN_SRC_DIR=%{install_prefix}/src \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
-DLLVM_PARALLEL_LINK_JOBS=%{max_link_jobs} \
-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
-DCMAKE_PREFIX_PATH=%{install_libdir}/cmake/llvm/ \
-DLLVM_COMMON_CMAKE_UTILS=%{_datadir}/llvm/cmake \
\
%if 0%{?__isa_bits} == 64
-DLLVM_LIBDIR_SUFFIX=64
%else
-DLLVM_LIBDIR_SUFFIX=
%endif
export LD_LIBRARY_PATH=%{_builddir}/%{flang_srcdir}/_build/lib
%ninja_build
%install
%ninja_install -C _build
# this is a test binary
rm -f %{buildroot}%{_bindir}/f18-parse-demo
%check
%if %{with check}
# fail on both aarch64 and x86_64, need to be find the casue.
rm -f test/Driver/fast_math.f90
export LD_LIBRARY_PATH=%{_builddir}/%{flang_srcdir}/_build/lib
%{ninja_build} check-flang -C ./_build/
%endif
%files
%license LICENSE.TXT
%{install_bindir}/tco
%{install_bindir}/bbc
%{install_bindir}/flang-to-external-fc
%{install_bindir}/fir-opt
%{install_bindir}/flang-new
%{install_libdir}/libFortranLower.so.%{maj_ver}*
%{install_libdir}/libFortranSemantics.so.%{maj_ver}*
%{install_libdir}/libFortranCommon.so.%{maj_ver}*
%{install_libdir}/libFortranRuntime.so.%{maj_ver}*
%{install_libdir}/libFortranDecimal.so.%{maj_ver}*
%{install_libdir}/libFortranEvaluate.so.%{maj_ver}*
%{install_libdir}/libFortranParser.so.%{maj_ver}*
%{install_libdir}/libflangFrontend.so.%{maj_ver}*
%{install_libdir}/libflangFrontendTool.so.%{maj_ver}*
%{install_libdir}/libFIRAnalysis.so.%{maj_ver}
%{install_libdir}/libFIRBuilder.so.%{maj_ver}*
%{install_libdir}/libFIRCodeGen.so.%{maj_ver}*
%{install_libdir}/libFIRDialect.so.%{maj_ver}*
%{install_libdir}/libFIRDialectSupport.so.%{maj_ver}
%{install_libdir}/libFIRSupport.so.%{maj_ver}*
%{install_libdir}/libFIRTestAnalysis.so.%{maj_ver}
%{install_libdir}/libFIRTransforms.so.%{maj_ver}*
%{install_libdir}/libHLFIRDialect.so.%{maj_ver}
%{install_libdir}/libHLFIRTransforms.so.%{maj_ver}
%files devel
%{install_libdir}/libFortranLower.so
%{install_libdir}/libFortranParser.so
%{install_libdir}/libFortranCommon.so
%{install_libdir}/libFortranSemantics.so
%{install_libdir}/libFortran_main.a
%{install_libdir}/libFIRAnalysis.so
%{install_libdir}/libFIRBuilder.so
%{install_libdir}/libFIRCodeGen.so
%{install_libdir}/libFIRDialect.so
%{install_libdir}/libFIRDialectSupport.so
%{install_libdir}/libFIRSupport.so
%{install_libdir}/libFIRTestAnalysis.so
%{install_libdir}/libFIRTransforms.so
%{install_libdir}/libFortranDecimal.so
%{install_libdir}/libFortranRuntime.so
%{install_libdir}/libFortranEvaluate.so
%{install_libdir}/libflangFrontend.so
%{install_libdir}/libflangFrontendTool.so
%{install_libdir}/libHLFIRDialect.so
%{install_libdir}/libHLFIRTransforms.so
%{install_includedir}/flang
%{install_libdir}/cmake/
%changelog
* Tue Dec 5 2023 zhoujing <zhoujing106@huawei.com> - 17.0.6-1
- Update to 17.0.6
* Wed Oct 25 2023 HuQingYuan <huqingyuan429@mail.ustc.edu.cn> - flang_20210324-29
- Add patch for add align pragma for scalar variables
* Mon Sep 11 2023 xieyihui <yihui@isrc.iscas.ac.cn> - flang_20210324-28
- Add patch for fix retun dynamic multidimensional array bug
* Mon Sep 11 2023 xieyihui <yihui@isrc.iscas.ac.cn> - flang_20210324-27
- Add patch for fix sizeof for data with Bind(C) bug
* Fri July 7 2023 zhushengtao1 <zhushengtao1@huawei.com> - flang_20210324-26
- Add patch for fix import use bug
* Fri May 19 2023 yinjiawei2023 <yinjiawei@isrc.iscas.ac.cn> - flang_20210324-25
- Add patch for add align prgma for fix shape array/character and add some relative test cases
* Thu May 18 2023 yinjiawei2023 <yinjiawei@isrc.iscas.ac.cn> - flang_20210324-24
- Add patch for add align prgma for derived type and add some relative test cases
* Thu Feb 16 2023 xieyihui <yihui@isrc.iscas.ac.cn> - flang_20210324-23
- Fix patch 4-add-test-cases-for-openmp-optimization.patch to correct test007 and test020 and change the way of measuring time in test008
* Fri Jan 20 2023 MinchaoLiang <minchao@isrc.iscas.ac.cn> - flang_20210324-22
- Add patch for add test cases for types 3
* Mon Jan 23 2023 wangzhewei <zhewei@isrc.iscas.ac.cn> - flang_20210324-21
- Add patch for add test cases for attribute declarations and specifications 3
* Mon Jan 16 2023 wangzhewei <zhewei@isrc.iscas.ac.cn> - flang_20210324-20
- Fix patch 7 and patch 14
* Tue Dec 20 2022 huwei <huwei@isrc.iscas.ac.cn> - flang_20210324-19
- Add 17-add-fortran-memory-align-investigation.patch for add fortran memory align investigation
* Tue Dec 13 2022 huwei <huwei@isrc.iscas.ac.cn> - flang_20210324-18
- Add 16-add-c-and-cxx-memory-align-investigation.patch for add c and cxx memory align investigation
* Thu Dec 8 2022 xieyihui <yihui@isrc.iscas.ac.cn> - flang_20210324-17
- Fix 4-add-test-cases-for-openmp-optimization.patch for add new test cases for OpenMP optimization and modify the test method
* Wed Dec 7 2022 MinchaoLiang <minchao@isrc.iscas.ac.cn> - flang_20210324-16
- Add patch for add test cases for types 2
* Tue Nov 29 2022 wangzhewei <zhewei@isrc.iscas.ac.cn> - flang_20210324-15
- Add patch for add test cases for attribute declarations and specifications 2
* Fri Nov 18 2022 xieyihui <yihui@isrc.iscas.ac.cn> - flang_20210324-14
- Add test cases for procedure pointer, function about array and global and split patches about interoperability with C
* Fri Nov 4 2022 xieyihui <yihui@isrc.iscas.ac.cn> - flang_20210324-13
- Fix 4-add-test-cases-for-openmp-optimization.patch for add new test cases for OpenMP optimization
* Thu Oct 27 2022 wangzhewei <zhewei@isrc.iscas.ac.cn> - flang_20210324-12
- Add patch for add test cases for attribute declarations and specifications
* Mon Oct 24 2022 MinchaoLiang <minchao@isrc.iscas.ac.cn> - flang_20210324-11
- Add patch for add test cases for types
* Fri Oct 21 2022 xieyihui <yihui@isrc.iscas.ac.cn> - flang_20210324-10
- Fix 3-test-for-interoperability-with-c-fortran-call-c.patch for add new test cases and fix test cases about bindc and Fix 5-test-for-interoperability-with-c-c-call-fortran.patch for test cases about function
* Sun Oct 16 2022 xieyihui <yihui@isrc.iscas.ac.cn> - flang_20210324-9
- Add patch for add test cases for interoperability with C about C call fortran
* Mon Sep 19 2022 xieyihui <yihui@isrc.iscas.ac.cn> - flang_20210324-8
- Add patch for add test cases for OpenMP optimization
* Thu Sep 8 2022 a <yihui@isrc.iscas.ac.cn> - flang_20210324-7
- Add patch for add test cases for interoperability with C about fortran call C
* Thu Sep 8 2022 wangzhewei <51215902151@stu.ecnu.edu.cn> - flang_20210324-6
- Add patch for inline of runtime function inline_f90_str_copy_klen
* Fri Aug 26 2022 wangzhewei <51215902151@stu.ecnu.edu.cn> - flang_20210324-5
- Fix patch 1 to apply on flang-flang_20210324.tar.gz
* Thu Jul 14 2022 qiaopeixin <qiaopeixin@huawei.com> - flang_20210324-4
- Add patch for inline of runtime functions
* Wed May 18 2022 liukuo <liukuo@kylinos.cn> - flang_20210324-3
- License compliance rectification
* Mon Dec 13 2021 heyitao <heyitao@uniontech.com> - flang_20210324-2
- Remove the dist tag in the version.
* Thu Nov 25 2021 qiaopeixin <qiaopeixin@huawei.com> - flang_20210324-20211125.1
- Add flang source tar file
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。