lfortran: Bump to 0.19.0

This commit is contained in:
Tee KOBAYASHI 2023-05-04 15:58:13 +09:00 committed by xtkoba
parent f79b895c77
commit 9935201c92
6 changed files with 26 additions and 26 deletions

View File

@ -0,0 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -331,6 +331,8 @@
if (WITH_RUNTIME_LIBRARY)
if(WIN32)
set(LFORTRAN_PATH "${CMAKE_BINARY_DIR}/src/bin/lfortran.exe")
+ elseif(CMAKE_CROSSCOMPILING)
+ set(LFORTRAN_PATH "@TERMUX_PKG_HOSTBUILD_DIR@/src/bin/lfortran")
else()
set(LFORTRAN_PATH "${CMAKE_BINARY_DIR}/src/bin/lfortran")
endif()

View File

@ -2,8 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://lfortran.org/
TERMUX_PKG_DESCRIPTION="A modern open-source interactive Fortran compiler"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.18.0
TERMUX_PKG_REVISION=2
TERMUX_PKG_VERSION=0.19.0
TERMUX_PKG_SRCURL=git+https://github.com/lfortran/lfortran
TERMUX_PKG_DEPENDS="clang, libandroid-complex-math, libc++, ncurses, zlib, zstd"
TERMUX_PKG_BUILD_DEPENDS="libllvm-static"
@ -35,6 +34,10 @@ termux_step_host_build() {
termux_step_pre_configure() {
PATH=$TERMUX_PKG_HOSTBUILD_DIR/src/bin:$PATH
echo "Applying CMakeLists.txt.diff"
sed "s|@TERMUX_PKG_HOSTBUILD_DIR@|${TERMUX_PKG_HOSTBUILD_DIR}|g" \
$TERMUX_PKG_BUILDER_DIR/CMakeLists.txt.diff \
| patch --silent -p1
( cd $TERMUX_PKG_SRCDIR && sh build0.sh )

View File

@ -28,6 +28,15 @@
builder->SetInsertPoint(bb);
}
@@ -4718,7 +4718,7 @@
start_new_block(blockstart);
llvm::BasicBlock *blockend = llvm::BasicBlock::Create(context, blockend_name);
llvm::Function *fn = blockstart->getParent();
- fn->getBasicBlockList().push_back(blockend);
+ fn->insert(fn->end(), blockend);
builder->SetInsertPoint(blockstart);
loop_or_block_end.push_back(blockend);
loop_or_block_end_names.push_back(blockend_name);
--- a/src/libasr/codegen/evaluator.cpp
+++ b/src/libasr/codegen/evaluator.cpp
@@ -1,5 +1,6 @@

View File

@ -1,11 +0,0 @@
--- a/src/bin/CMakeLists.txt
+++ b/src/bin/CMakeLists.txt
@@ -43,7 +43,7 @@
macro(LFORTRAN_COMPILE_RUNTIME name dir)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/../runtime/${name}.mod
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/lfortran
+ COMMAND lfortran
ARGS --backend=cpp -c ${CMAKE_CURRENT_SOURCE_DIR}/../runtime/${dir}/${name}.f90 -o ${name}.o
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../runtime
DEPENDS lfortran ${CMAKE_CURRENT_SOURCE_DIR}/../runtime/${dir}/${name}.f90 ${ARGN}

View File

@ -27,7 +27,7 @@
+#ifdef __ANDROID__
+ std::cerr << "Or install this package through \"pkg install libkokkos\"." << std::endl;
+#endif
throw LFortran::LCompilersException("LFORTRAN_KOKKOS_DIR is not defined");
throw LCompilers::LCompilersException("LFORTRAN_KOKKOS_DIR is not defined");
}
@@ -1086,7 +1099,11 @@

View File

@ -1,12 +0,0 @@
When building with -DBUILD_SHARED_LIBS=ON, libasr will be a shared library but not installed.
--- a/src/libasr/CMakeLists.txt
+++ b/src/libasr/CMakeLists.txt
@@ -72,7 +72,7 @@
COMPILE_FLAGS -Wno-deprecated-declarations)
endif()
endif()
-add_library(asr ${SRC})
+add_library(asr STATIC ${SRC})
target_include_directories(asr BEFORE PUBLIC ${libasr_SOURCE_DIR}/..)
target_include_directories(asr BEFORE PUBLIC ${libasr_BINARY_DIR}/..)
if (WITH_BFD)