diff --git a/1-flang-runtime-inline.patch b/1-flang-runtime-inline.patch index b3f03c7d50202944192e978bcf21af17236e5230..08a0190c2394784fc40f57595510ef8d0f415e10 100644 --- a/1-flang-runtime-inline.patch +++ b/1-flang-runtime-inline.patch @@ -331,7 +331,7 @@ new file mode 100644 index 00000000..dc09aa67 --- /dev/null +++ b/tools/flang2/flang2exe/inline_runtime.cpp -@@ -0,0 +1,815 @@ +@@ -0,0 +1,812 @@ +/* + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. @@ -682,7 +682,7 @@ index 00000000..dc09aa67 + OPERAND *result_minus_one_opnd, int mode) +{ + INSTR_LIST *cmp1, *cmp2, *save_tmps_instr; -+ OPERAND *curr0_opnd, *curr1_opnd, *curr2_opnd, *opnd_zero, *final_opnd; ++ OPERAND *curr0_opnd, *curr1_opnd, *curr2_opnd; + INSTR_LIST *s1_instr = runtime_instr->operands->next->tmps->info.idef; + INSTR_LIST *s2_instr = runtime_instr->operands->next->next->tmps->info.idef; + @@ -866,14 +866,11 @@ index 00000000..dc09aa67 + dbg_line_op = runtime_instr->dbg_line_op; + INSTR_LIST *s1_len, *s2_len, *strcmp_res, *iter; + INSTR_LIST *head_instr; -+ INSTR_LIST *cmp1, *cmp2, *save_tmps_instr; -+ OPERAND *curr0_opnd, *curr1_opnd, *curr2_opnd, *opnd_zero, *final_opnd; ++ INSTR_LIST *cmp1, *cmp2; ++ OPERAND *curr0_opnd, *curr1_opnd, *curr2_opnd, *final_opnd; + OPERAND *result_zero_opnd, *result_one_opnd, *result_minus_one_opnd; + OPERAND *s1_len_opnd, *s2_len_opnd, *strcmp_res_opnd, *iter_opnd; + INSTR_LIST *prev_instr = runtime_instr->prev; -+ INSTR_LIST *next_instr = runtime_instr->next; -+ INSTR_LIST *s1_instr = runtime_instr->operands->next->tmps->info.idef; -+ INSTR_LIST *s2_instr = runtime_instr->operands->next->next->tmps->info.idef; + TMPS *s1_len_tmps = runtime_instr->operands->next->next->next->tmps; + TMPS *s2_len_tmps = runtime_instr->operands->next->next->next->next->tmps; + @@ -1138,7 +1135,7 @@ index 00000000..dc09aa67 + call_name_op->tmps->info.idef) { + INSTR_LIST *call_iface_instr = call_name_op->tmps->info.idef; + if (call_iface_instr->i_name == I_BITCAST && call_iface_instr->operands) { -+ char *call_name = call_iface_instr->operands->string; ++ const char *call_name = call_iface_instr->operands->string; + if (call_name && + inline_calls.find(std::string(call_name)) != inline_calls.end()) + return inline_calls[std::string(call_name)]; diff --git a/flang.spec b/flang.spec index 822d39aef85358670855b60ae2f5d25c2cc34cef..b8e35a60be33bc536121d79fc7dc4afbb32e7255 100644 --- a/flang.spec +++ b/flang.spec @@ -2,7 +2,7 @@ Name: flang Version: flang_20210324 -Release: 4 +Release: 5 Summary: Fortran language compiler targeting LLVM License: Apache-2.0 @@ -11,6 +11,7 @@ Source0: flang-flang_20210324.tar.gz BuildRequires: gcc Requires: gcc >= 9.3.0 +Patch0: 1-flang-runtime-inline.patch %description Flang depends on a fork of the LLVM project (https://github.com/flang-compiler/classic-flang-llvm-project). The fork made some changes to the upstream LLVM project to support Flang toolchain. Flang cannot build independently for now. @@ -18,7 +19,7 @@ Link to build Flang based on the fork of LLVM project: https://github.com/flang- TODO: support build Flang. %prep -%autosetup +%autosetup -p1 %build @@ -32,6 +33,9 @@ TODO: support build Flang. %changelog +* 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 - flang_20210324-4 - Add patch for inline of runtime functions