From dab606c70cf29945071a040f5edd4bbf4dde63eb Mon Sep 17 00:00:00 2001 From: luofeng14 Date: Mon, 6 May 2024 09:51:22 +0800 Subject: [PATCH] Add usage documents --- README.en.md | 41 ++++++++++++++++++++++++++++++++--------- README.md | 42 ++++++++++++++++++++++++++++++++---------- classic-flang.spec | 6 ++++-- 3 files changed, 68 insertions(+), 21 deletions(-) diff --git a/README.en.md b/README.en.md index 6aef079..053c3e0 100644 --- a/README.en.md +++ b/README.en.md @@ -4,19 +4,42 @@ Classic Flang is a Fortran language front-end designed for integration with LLVM. #### Software Architecture -Software architecture description +Applicable to the X86 and Aarch64 architectures #### Installation - -1. xxxx -2. xxxx -3. xxxx +1. Install via yum and dnf +``` +yum install classic-flang-llvm +yum install classic-flang +``` +2. Or download the rpm package and install. +``` +rpm -ivh classic-flang-llvm-17.0.6-1.*.aarch64.rpm +rpm -ivh classic-flang-17.0.6-1.*.aarch64.rpm +``` #### Instructions - -1. xxxx -2. xxxx -3. xxxx +1. Configuring Environment Variables +``` +# Configure the executable file path of classi-flang +export PATH=/opt/openEuler/classic-flang-17/root/bin:$PATH +# Configure the dynamic library path of classi-flang +export LIBRARY_PATH=/opt/openEuler/classic-flang-17/root/lib64:$LIBRARY_PATH +# Configure the header file path when classi-flang and clang compiles C +export C_INCLUDE_PATH=/opt/openEuler/classic-flang-17/root/include:$C_INCLUDE_PATH +# Configure the header file path when classi-flang and clang compiles C++ +export CPLUS_INCLUDE_PATH=/opt/openEuler/classic-flang-17/root/include:$CPLUS_INCLUDE_PATH +# Configure runtime dynamic library Path +export LD_LIBRARY_PATH=/opt/openEuler/classic-flang-17/root/lib64:$LD_LIBRARY_PATH +``` +2. Compiled with classic-flang +``` +make CC=clang FC=flang F77=flang +``` +or +``` +flang test.f90 +``` #### Contribution diff --git a/README.md b/README.md index a02991b..e986fbc 100644 --- a/README.md +++ b/README.md @@ -4,20 +4,42 @@ Classic Flang is a Fortran language front-end designed for integration with LLVM. #### 软件架构 -软件架构说明 - +适用于X86, Aarch64架构 #### 安装教程 - -1. xxxx -2. xxxx -3. xxxx +1. 通过yum、dnf安装即可 +``` +yum install classic-flang-llvm +yum install classic-flang +``` +2. 或者下载rpm包安装 +``` +rpm -ivh classic-flang-llvm-17.0.6-1.*.aarch64.rpm +rpm -ivh classic-flang-17.0.6-1.*.aarch64.rpm +``` #### 使用说明 - -1. xxxx -2. xxxx -3. xxxx +1. 配置环境变量 +``` +# 配置classi-flang可执行文件路径 +export PATH=/opt/openEuler/classic-flang-17/root/bin:$PATH +# 配置classi-flang编译时需要的动态链接库路径 +export LIBRARY_PATH=/opt/openEuler/classic-flang-17/root/lib64:$LIBRARY_PATH +# 配置classi-flang编译C时头文件路径 +export C_INCLUDE_PATH=/opt/openEuler/classic-flang-17/root/include:$C_INCLUDE_PATH +# 配置classi-flang编译C++时头文件路径 +export CPLUS_INCLUDE_PATH=/opt/openEuler/classic-flang-17/root/include:$CPLUS_INCLUDE_PATH +# 配置运行时动态链接库路径 +export LD_LIBRARY_PATH=/opt/openEuler/classic-flang-17/root/lib64:$LD_LIBRARY_PATH +``` +2. 使用classic-flang编译 +``` +make CC=clang FC=flang F77=flang +``` +或者 +``` +flang test.f90 +``` #### 参与贡献 diff --git a/classic-flang.spec b/classic-flang.spec index 926c923..3b03996 100644 --- a/classic-flang.spec +++ b/classic-flang.spec @@ -29,7 +29,7 @@ Name: %{pkg_name} Version: %{flang_version} -Release: 1 +Release: 2 Summary: a Fortran language front-end designed for integration with LLVM License: Apache-2.0 WITH LLVM-exception @@ -63,7 +63,6 @@ Flang header files. %package llvm Summary: llvm dependency by classic-flang -Requires: %{name}%{?_isa} = %{version}-%{release} %description llvm LLVM bin include lib files. @@ -221,5 +220,8 @@ popd %exclude %{install_prefix}/bin/llvm-symbolizer %changelog +* Mon Apr 29 2024 luofeng - 17.0.6-2 +- Add usage documents + * Fri Mar 1 2024 luofeng - 17.0.6-1 - Enable classic flang rpm build -- Gitee