mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
Merge topic 'lfortran-0.55'
3b85cc1a8e
Tests: Extend RunCMake.ParseImplicitLinkInfo for LFortran 0.55.07e8f76dad2
LFortran: Update flags renamed by version 0.55 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !11184
This commit is contained in:
@@ -104,7 +104,12 @@ target_link_libraries(symbols PUBLIC myfort)
|
||||
set_property(TARGET symbols PROPERTY POSITION_INDEPENDENT_CODE 1)
|
||||
|
||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran")
|
||||
add_compile_options(--implicit-interface --generate-object-code)
|
||||
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "0.55")
|
||||
set(_LFORTRAN_SC_FLAG --separate-compilation)
|
||||
else()
|
||||
set(_LFORTRAN_SC_FLAG --generate-object-code)
|
||||
endif()
|
||||
add_compile_options(--implicit-interface ${_LFORTRAN_SC_FLAG})
|
||||
endif()
|
||||
|
||||
# Require symbols through Fortran.
|
||||
|
@@ -5,7 +5,12 @@ cmake_minimum_required(VERSION ${CMAKE_VERSION})
|
||||
project(VerifyFortranC C Fortran)
|
||||
|
||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran")
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:--generate-object-code>")
|
||||
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "0.55")
|
||||
set(_LFORTRAN_SC_FLAG --separate-compilation)
|
||||
else()
|
||||
set(_LFORTRAN_SC_FLAG --generate-object-code)
|
||||
endif()
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:${_LFORTRAN_SC_FLAG}>")
|
||||
endif()
|
||||
|
||||
option(VERIFY_CXX "Whether to verify C++ and Fortran" OFF)
|
||||
|
@@ -38,7 +38,12 @@ if(WIN32 AND NOT CYGWIN)
|
||||
endif()
|
||||
|
||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran")
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:--implicit-interface;--generate-object-code>")
|
||||
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "0.55")
|
||||
set(_LFORTRAN_SC_FLAG --separate-compilation)
|
||||
else()
|
||||
set(_LFORTRAN_SC_FLAG --generate-object-code)
|
||||
endif()
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:--implicit-interface;${_LFORTRAN_SC_FLAG}>")
|
||||
endif()
|
||||
|
||||
add_library(hello STATIC hello.f)
|
||||
|
@@ -11,7 +11,12 @@ if("${CMAKE_Fortran_COMPILER_ID};${CMAKE_Fortran_SIMULATE_ID}" MATCHES "^Intel(L
|
||||
endif()
|
||||
|
||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran")
|
||||
add_compile_options(--implicit-interface --generate-object-code)
|
||||
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "0.55")
|
||||
set(_LFORTRAN_SC_FLAG --separate-compilation)
|
||||
else()
|
||||
set(_LFORTRAN_SC_FLAG --generate-object-code)
|
||||
endif()
|
||||
add_compile_options(--implicit-interface ${_LFORTRAN_SC_FLAG})
|
||||
endif()
|
||||
|
||||
# create a library with hello and world functions
|
||||
|
@@ -4,7 +4,12 @@ project(CheckIPOSupported-Fortran LANGUAGES Fortran)
|
||||
cmake_policy(SET CMP0069 NEW)
|
||||
|
||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran")
|
||||
add_compile_options(--implicit-interface --generate-object-code)
|
||||
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "0.55")
|
||||
set(_LFORTRAN_SC_FLAG --separate-compilation)
|
||||
else()
|
||||
set(_LFORTRAN_SC_FLAG --generate-object-code)
|
||||
endif()
|
||||
add_compile_options(--implicit-interface ${_LFORTRAN_SC_FLAG})
|
||||
endif()
|
||||
|
||||
include(CheckIPOSupported)
|
||||
|
@@ -0,0 +1,38 @@
|
||||
CMAKE_LANG=Fortran
|
||||
CMAKE_LINKER=/usr/bin/ld
|
||||
CMAKE_Fortran_COMPILER_ABI=ELF
|
||||
CMAKE_Fortran_COMPILER_AR=
|
||||
CMAKE_Fortran_COMPILER_ARCHITECTURE_ID=x86_64
|
||||
CMAKE_Fortran_COMPILER_EXTERNAL_TOOLCHAIN=
|
||||
CMAKE_Fortran_COMPILER_ID=LFortran
|
||||
CMAKE_Fortran_COMPILER_LAUNCHER=
|
||||
CMAKE_Fortran_COMPILER_LOADED=1
|
||||
CMAKE_Fortran_COMPILER_RANLIB=
|
||||
CMAKE_Fortran_COMPILER_TARGET=
|
||||
CMAKE_Fortran_COMPILER_VERSION=0.55.0
|
||||
CMAKE_Fortran_COMPILER_VERSION_INTERNAL=
|
||||
Change Dir: '/tmp/ii/CMakeFiles/CMakeTmp'
|
||||
|
||||
Run Build Command(s): /tmp/CMake/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_1058c/fast
|
||||
/usr/bin/gmake -f CMakeFiles/cmTC_1058c.dir/build.make CMakeFiles/cmTC_1058c.dir/build
|
||||
gmake[1]: Entering directory '/tmp/ii/CMakeFiles/CMakeTmp'
|
||||
Building Fortran object CMakeFiles/cmTC_1058c.dir/CMakeFortranCompilerABI.F.o
|
||||
/usr/bin/lfortran --cpp-infer --linker=clang -v -Wl,-v -c /tmp/CMake/Modules/CMakeFortranCompilerABI.F -o CMakeFiles/cmTC_1058c.dir/CMakeFortranCompilerABI.F.o
|
||||
Linking Fortran executable cmTC_1058c
|
||||
/tmp/CMake/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1058c.dir/link.txt --verbose=1
|
||||
clang -o cmTC_1058c CMakeFiles/cmTC_1058c.dir/CMakeFortranCompilerABI.F.o -L"/usr/bin/../lib64" -Wl,-rpath,"/usr/bin/../lib64" -Wl,-v -llfortran_runtime -lm -v
|
||||
clang version 21.1.1 (Fedora 21.1.1-1.fc43)
|
||||
Target: x86_64-redhat-linux-gnu
|
||||
Thread model: posix
|
||||
InstalledDir: /usr/bin
|
||||
Configuration file: /etc/clang/x86_64-redhat-linux-gnu-clang.cfg
|
||||
System configuration file directory: /etc/clang/
|
||||
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/15
|
||||
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/15
|
||||
Candidate multilib: .@m64
|
||||
Candidate multilib: 32@m32
|
||||
Selected multilib: .@m64
|
||||
"/usr/bin/ld" --hash-style=gnu --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_1058c /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crt1.o /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crti.o /usr/bin/../lib/gcc/x86_64-redhat-linux/15/crtbegin.o -L/usr/bin/../lib64 -L/usr/bin/../lib/clang/21/lib/x86_64-redhat-linux-gnu -L/usr/bin/../lib/gcc/x86_64-redhat-linux/15 -L/usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../lib64 -L/lib/../lib64 -L/usr/lib64 -L/lib -L/usr/lib CMakeFiles/cmTC_1058c.dir/CMakeFortranCompilerABI.F.o -rpath /usr/bin/../lib64 -v -llfortran_runtime -lm -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-redhat-linux/15/crtend.o /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crtn.o
|
||||
GNU ld version 2.45-1.fc43
|
||||
/usr/bin/lfortran -v -Wl,-v --linker=clang CMakeFiles/cmTC_1058c.dir/CMakeFortranCompilerABI.F.o -o cmTC_1058c
|
||||
gmake[1]: Leaving directory '/tmp/ii/CMakeFiles/CMakeTmp'
|
@@ -0,0 +1,43 @@
|
||||
CMAKE_LANG=Fortran
|
||||
CMAKE_LINKER=/usr/bin/ld
|
||||
CMAKE_Fortran_COMPILER_ABI=ELF
|
||||
CMAKE_Fortran_COMPILER_AR=
|
||||
CMAKE_Fortran_COMPILER_ARCHITECTURE_ID=x86_64
|
||||
CMAKE_Fortran_COMPILER_EXTERNAL_TOOLCHAIN=
|
||||
CMAKE_Fortran_COMPILER_ID=LFortran
|
||||
CMAKE_Fortran_COMPILER_LAUNCHER=
|
||||
CMAKE_Fortran_COMPILER_LOADED=1
|
||||
CMAKE_Fortran_COMPILER_RANLIB=
|
||||
CMAKE_Fortran_COMPILER_TARGET=
|
||||
CMAKE_Fortran_COMPILER_VERSION=0.55.0
|
||||
CMAKE_Fortran_COMPILER_VERSION_INTERNAL=
|
||||
Change Dir: '/tmp/ii/CMakeFiles/CMakeTmp'
|
||||
|
||||
Run Build Command(s): /tmp/CMake/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_e5d48/fast
|
||||
/usr/bin/gmake -f CMakeFiles/cmTC_e5d48.dir/build.make CMakeFiles/cmTC_e5d48.dir/build
|
||||
gmake[1]: Entering directory '/tmp/ii/CMakeFiles/CMakeTmp'
|
||||
Building Fortran object CMakeFiles/cmTC_e5d48.dir/CMakeFortranCompilerABI.F.o
|
||||
/usr/bin/lfortran --cpp-infer --linker=gcc -v -Wl,-v -c /tmp/CMake/Modules/CMakeFortranCompilerABI.F -o CMakeFiles/cmTC_e5d48.dir/CMakeFortranCompilerABI.F.o
|
||||
Linking Fortran executable cmTC_e5d48
|
||||
/tmp/CMake/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e5d48.dir/link.txt --verbose=1
|
||||
gcc -o cmTC_e5d48 CMakeFiles/cmTC_e5d48.dir/CMakeFortranCompilerABI.F.o -L"/usr/bin/../lib64" -Wl,-rpath,"/usr/bin/../lib64" -Wl,-v -llfortran_runtime -lm -v
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=gcc
|
||||
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/15/lto-wrapper
|
||||
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
|
||||
OFFLOAD_TARGET_DEFAULT=1
|
||||
Target: x86_64-redhat-linux
|
||||
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,m2,cobol,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=/usr/share/zoneinfo --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-15.2.1-build/gcc-15.2.1-20250808/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none,amdgcn-amdhsa --enable-offload-defaulted --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
|
||||
Thread model: posix
|
||||
Supported LTO compression algorithms: zlib zstd
|
||||
gcc version 15.2.1 20250808 (Red Hat 15.2.1-1) (GCC)
|
||||
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/15/:/usr/libexec/gcc/x86_64-redhat-linux/15/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/15/:/usr/lib/gcc/x86_64-redhat-linux/
|
||||
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/15/:/usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/15/../../../:/lib/:/usr/lib/
|
||||
COLLECT_GCC_OPTIONS='-o' 'cmTC_e5d48' '-L/usr/bin/../lib64' '-foffload-options=-l_GCC_m' '-v' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_e5d48.'
|
||||
/usr/libexec/gcc/x86_64-redhat-linux/15/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/15/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/15/lto-wrapper -plugin-opt=-fresolution=/tmp/cc5Ml5eq.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_e5d48 /usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/15/crtbegin.o -L/usr/bin/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/15 -L/usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/15/../../.. -L/lib -L/usr/lib CMakeFiles/cmTC_e5d48.dir/CMakeFortranCompilerABI.F.o -rpath /usr/bin/../lib64 -v -llfortran_runtime -lm -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-redhat-linux/15/crtend.o /usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crtn.o
|
||||
collect2 version 15.2.1 20250808 (Red Hat 15.2.1-1)
|
||||
/usr/bin/ld -plugin /usr/libexec/gcc/x86_64-redhat-linux/15/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/15/lto-wrapper -plugin-opt=-fresolution=/tmp/cc5Ml5eq.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_e5d48 /usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/15/crtbegin.o -L/usr/bin/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/15 -L/usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/15/../../.. -L/lib -L/usr/lib CMakeFiles/cmTC_e5d48.dir/CMakeFortranCompilerABI.F.o -rpath /usr/bin/../lib64 -v -llfortran_runtime -lm -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-redhat-linux/15/crtend.o /usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crtn.o
|
||||
GNU ld version 2.45-1.fc43
|
||||
COLLECT_GCC_OPTIONS='-o' 'cmTC_e5d48' '-L/usr/bin/../lib64' '-foffload-options=-l_GCC_m' '-v' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_e5d48.'
|
||||
/usr/bin/lfortran -v -Wl,-v --linker=gcc CMakeFiles/cmTC_e5d48.dir/CMakeFortranCompilerABI.F.o -o cmTC_e5d48
|
||||
gmake[1]: Leaving directory '/tmp/ii/CMakeFiles/CMakeTmp'
|
@@ -48,6 +48,8 @@ set(targets
|
||||
linux-Fortran-LFortran-0.35.0-gcc
|
||||
linux-Fortran-LFortran-0.41.0-clang
|
||||
linux-Fortran-LFortran-0.41.0-gcc
|
||||
linux-Fortran-LFortran-0.55.0-clang
|
||||
linux-Fortran-LFortran-0.55.0-gcc
|
||||
linux-custom_clang-C-Clang-13.0.0 linux-custom_clang-CXX-Clang-13.0.0
|
||||
mingw.org-C-GNU-4.9.3 mingw.org-CXX-GNU-4.9.3
|
||||
netbsd-C-GNU-4.8.5 netbsd-CXX-GNU-4.8.5
|
||||
|
@@ -0,0 +1,4 @@
|
||||
libs=lfortran_runtime;m;gcc;gcc_s;c;gcc;gcc_s
|
||||
dirs=/usr/lib64;/usr/lib/clang/21/lib/x86_64-redhat-linux-gnu;/usr/lib/gcc/x86_64-redhat-linux/15;/lib64;/lib;/usr/lib
|
||||
library_arch=x86_64-redhat-linux-gnu
|
||||
linker_tool=/usr/bin/ld
|
@@ -0,0 +1,4 @@
|
||||
libs=lfortran_runtime;m;gcc;gcc_s;c;gcc;gcc_s
|
||||
dirs=/usr/lib64;/usr/lib/gcc/x86_64-redhat-linux/15;/lib64;/usr/lib;/lib
|
||||
library_arch=
|
||||
linker_tool=/usr/bin/ld
|
@@ -26,7 +26,12 @@ target_link_libraries(sunq sunquad)
|
||||
endfunction()
|
||||
|
||||
if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran")
|
||||
add_compile_options(--implicit-interface --generate-object-code)
|
||||
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "0.55")
|
||||
set(_LFORTRAN_SC_FLAG --separate-compilation)
|
||||
else()
|
||||
set(_LFORTRAN_SC_FLAG --generate-object-code)
|
||||
endif()
|
||||
add_compile_options(--implicit-interface ${_LFORTRAN_SC_FLAG})
|
||||
endif()
|
||||
|
||||
# check for the fortran c interface mangling
|
||||
|
Reference in New Issue
Block a user