diff options
author | Tae-Young Chung <ty83.chung@samsung.com> | 2023-12-19 11:44:18 +0900 |
---|---|---|
committer | Tae-Young Chung <ty83.chung@samsung.com> | 2023-12-19 12:05:07 +0900 |
commit | f962d5b88cabc5c182a15ceb0d6a13b20cee5c3c (patch) | |
tree | 91220e2393520b3feeeb1498ad0997e3b4efe70b | |
parent | 7417d8ccded593c7131fd3c2079b0270e4696755 (diff) | |
download | lapack-accepted/tizen_unified_riscv.tar.gz lapack-accepted/tizen_unified_riscv.tar.bz2 lapack-accepted/tizen_unified_riscv.zip |
Apply -fallow-argument-mismatch option when gcc version is larger than 10.0.0tizen_9.0_m2_releaseaccepted/tizen/unified/riscv/20231219.110018accepted/tizen/unified/dev/20240620.010802accepted/tizen/unified/20231220.165119accepted/tizen/9.0/unified/20241030.233849tizen_9.0tizenaccepted/tizen_unified_riscvaccepted/tizen_unified_devaccepted/tizen_unifiedaccepted/tizen_9.0_unified
riscv64, armv7l, i586, x86_64 with gcc 13.1.0 in Riscv repository and
aarch64, armv7l, i586, x86_64 with gcc 9.2.0 in Unified repository should be built without build error.
With a previous commit, armv7l, i586, x86_64 in Riscv repo. got build
failed. So, remove %ifarch ~ %endif from a spec file.
Instead, add a patch checking gcc version and then applying the option if the version
is larger than 10.0.0.
Change-Id: Ie9d1dc7421eb91d116077b7abe6520d05af62836
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
-rw-r--r-- | packaging/1001-TIZEN-LAPACK-GCC13.patch | 14 | ||||
-rw-r--r-- | packaging/lapack.spec | 7 |
2 files changed, 18 insertions, 3 deletions
diff --git a/packaging/1001-TIZEN-LAPACK-GCC13.patch b/packaging/1001-TIZEN-LAPACK-GCC13.patch new file mode 100644 index 00000000..543365d1 --- /dev/null +++ b/packaging/1001-TIZEN-LAPACK-GCC13.patch @@ -0,0 +1,14 @@ +diff --git a/CMAKE/CheckLAPACKCompilerFlags.cmake b/CMAKE/CheckLAPACKCompilerFlags.cmake +index acc51629..ca51fd8d 100644 +--- a/CMAKE/CheckLAPACKCompilerFlags.cmake ++++ b/CMAKE/CheckLAPACKCompilerFlags.cmake +@@ -19,6 +19,9 @@ if( CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" ) + if( "${CMAKE_Fortran_FLAGS}" MATCHES "-ffpe-trap=[izoupd]") + set( FPE_EXIT TRUE ) + endif() ++ if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER 10.0.0) ++ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") ++ endif() + + # Intel Fortran + elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" ) diff --git a/packaging/lapack.spec b/packaging/lapack.spec index 000a0012..326e19d5 100644 --- a/packaging/lapack.spec +++ b/packaging/lapack.spec @@ -6,6 +6,7 @@ License: Public Domain, Freeware Group: Development/Libraries/Parallel Source0: %{name}-%{version}.tar.bz2 Url: http://www.netlib.org/lapack/ +Source1001: 1001-TIZEN-LAPACK-GCC13.patch BuildRequires: cmake BuildRequires: gcc-fortran @@ -116,10 +117,10 @@ linear algebra. %prep %setup -q +cp %{SOURCE1001} . +patch -p1 < %{SOURCE1001} + %build -%ifarch riscv64 -export FFLAGS="$FFLAGS -fallow-argument-mismatch" -%endif mkdir -p build cd build |