pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/cmake



Module Name:    pkgsrc
Committed By:   tnn
Date:           Wed Aug  9 06:45:06 UTC 2023

Modified Files:
        pkgsrc/devel/cmake: Makefile distinfo
Added Files:
        pkgsrc/devel/cmake/patches:
            patch-Modules_FortranCInterface_CMakeLists.txt

Log Message:
cmake: don't attempt to use LTO with GCC 12 when building Fortran code


To generate a diff of this commit:
cvs rdiff -u -r1.210 -r1.211 pkgsrc/devel/cmake/Makefile
cvs rdiff -u -r1.213 -r1.214 pkgsrc/devel/cmake/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/cmake/patches/patch-Modules_FortranCInterface_CMakeLists.txt

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/cmake/Makefile
diff -u pkgsrc/devel/cmake/Makefile:1.210 pkgsrc/devel/cmake/Makefile:1.211
--- pkgsrc/devel/cmake/Makefile:1.210   Wed Aug  2 15:25:21 2023
+++ pkgsrc/devel/cmake/Makefile Wed Aug  9 06:45:06 2023
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.210 2023/08/02 15:25:21 adam Exp $
+# $NetBSD: Makefile,v 1.211 2023/08/09 06:45:06 tnn Exp $
 
 .include "Makefile.common"
+PKGREVISION=   1
 
 COMMENT=       Cross platform make
 
@@ -69,7 +70,7 @@ pre-configure:
        ${CP} ${FILESDIR}/Source_Checks_cm_cxx_cbegin.cxx ${WRKSRC}/Source/Checks/cm_cxx_cbegin.cxx
        ${CP} ${FILESDIR}/Source_Checks_cm_cxx_cend.cxx ${WRKSRC}/Source/Checks/cm_cxx_cend.cxx
        ${CP} ${FILESDIR}/Source_Checks_cm_cxx_size_t.cxx ${WRKSRC}/Source/Checks/cm_cxx_size_t.cxx
-       ${RM} -f ${WRKSRC}/Modules/*.orig ${WRKSRC}/Modules/Compiler/*.orig ${WRKSRC}/Modules/Platform/*.orig ${WRKSRC}/Modules/FindPython/*.orig
+       ${FIND} ${WRKSRC}/Modules -type f -a -name "*.orig" -print | ${XARGS} ${RM}
        ${LN} -f ${WRKSRC}/Modules/Platform/OpenBSD.cmake ${WRKSRC}/Modules/Platform/MirBSD.cmake
 .for lang in C CXX Fortran
        ${LN} -f ${WRKSRC}/Modules/Platform/SunOS-GNU-${lang}.cmake \

Index: pkgsrc/devel/cmake/distinfo
diff -u pkgsrc/devel/cmake/distinfo:1.213 pkgsrc/devel/cmake/distinfo:1.214
--- pkgsrc/devel/cmake/distinfo:1.213   Wed Jul 26 08:46:53 2023
+++ pkgsrc/devel/cmake/distinfo Wed Aug  9 06:45:06 2023
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.213 2023/07/26 08:46:53 adam Exp $
+$NetBSD: distinfo,v 1.214 2023/08/09 06:45:06 tnn Exp $
 
 BLAKE2s (cmake-3.27.1.tar.gz) = 62f93b37fa71ed78684719f0f7afb08027112065152596aa5467adaefcf5a129
 SHA512 (cmake-3.27.1.tar.gz) = d8831105fed3772bcb821a2b184fe0ffbff15795a5b0a89f2ad1cb0372a40c8f22f2bab72c671a6d17464521b7337067df929a5c3ece99f84848cc3a2fe6716f
@@ -12,6 +12,7 @@ SHA1 (patch-Modules_FindPythonInterp.cma
 SHA1 (patch-Modules_FindPythonLibs.cmake) = b5cedc6a2354beaf08e06d416c150154a7dc1f05
 SHA1 (patch-Modules_FindPython_Support.cmake) = aaec7767cad795dd269c851bd110ccefbfc87eb3
 SHA1 (patch-Modules_FindX11.cmake) = 124a2d51155cb4455e8b829dc74598cbd50a4e1c
+SHA1 (patch-Modules_FortranCInterface_CMakeLists.txt) = 9782cba399e47770efc51a254267d6013fce9b50
 SHA1 (patch-Modules_Platform_Darwin.cmake) = 7629f034111ff64b144ff41316299d5edcfe081a
 SHA1 (patch-Modules_Platform_UnixPaths.cmake) = 911271546d3ac52be0e8000857bdb236ac50ec1c
 SHA1 (patch-Source_Checks_Curses_CMakeLists.txt) = 88b6eb834ce7f186f2ebf63a5c40355d0ace9cd9

Added files:

Index: pkgsrc/devel/cmake/patches/patch-Modules_FortranCInterface_CMakeLists.txt
diff -u /dev/null pkgsrc/devel/cmake/patches/patch-Modules_FortranCInterface_CMakeLists.txt:1.1
--- /dev/null   Wed Aug  9 06:45:06 2023
+++ pkgsrc/devel/cmake/patches/patch-Modules_FortranCInterface_CMakeLists.txt   Wed Aug  9 06:45:06 2023
@@ -0,0 +1,24 @@
+$NetBSD: patch-Modules_FortranCInterface_CMakeLists.txt,v 1.1 2023/08/09 06:45:06 tnn Exp $
+
+Don't attempt to use LTO with GCC 12 when building Fortran code.
+It breaks FortranCInterface (math/lapack and others) when the compiler
+lacks working LTO support. Such as with lang/gcc12 from pkgsrc.
+Upstream PR about the problem:
+https://gitlab.kitware.com/cmake/cmake/-/issues/23525
+
+--- Modules/FortranCInterface/CMakeLists.txt.orig      2023-07-25 17:58:09.000000000 +0000
++++ Modules/FortranCInterface/CMakeLists.txt
+@@ -113,11 +113,11 @@ target_link_libraries(FortranCInterface 
+ if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND
+   CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
+   target_compile_options(FortranCInterface PRIVATE "-fno-lto")
+-  target_compile_options(myfort PRIVATE "-flto=auto" "-ffat-lto-objects")
++  target_compile_options(myfort PRIVATE "-fno-lto")
+ endif()
+ if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND
+   CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
+-  target_compile_options(symbols PRIVATE "-flto=auto" "-ffat-lto-objects")
++  target_compile_options(symbols PRIVATE "-fno-lto")
+ endif()
+ 
+ file(GENERATE OUTPUT exe-$<CONFIG>.cmake CONTENT [[



Home | Main Index | Thread Index | Old Index