Description: Define the Fortran name-mangling macro for the library build.
 BLAS++ 2025.05.28 exports an empty blaspp_defines, so the Fortran
 name-mangling macro (BLAS_FORTRAN_ADD_) never reaches the compiled
 library nor the installed defines.h.  Force the gfortran trailing
 underscore convention used by the reference LAPACK on Debian/OpenKylin so
 that include/lapack/mangling.h can define LAPACK_GLOBAL for every source
 file.  The mangling is deterministic for amd64 gfortran; when BLAS++
 already provides it through its own interface definitions this is a
 harmless duplicate of the same empty macro.
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Origin: other
Forwarded: not-needed
Last-Update: 2026-09-04

--- lapackpp-2024.10.26.orig/CMakeLists.txt
+++ lapackpp-2024.10.26/CMakeLists.txt
@@ -757,6 +757,16 @@ set( lapackpp_defines ${lapackpp_defs_}
      ${lapackpp_defs_hip_} ${lapackpp_defs_sycl_}
      CACHE INTERNAL "")
 
+# BLAS++ 2025.05.28 exports an empty blaspp_defines, so the Fortran
+# name-mangling macro (BLAS_FORTRAN_ADD_) never reaches the compiled
+# library nor the installed defines.h.  Force the gfortran trailing
+# underscore convention used by the reference LAPACK on Debian/OpenKylin so
+# that include/lapack/mangling.h can define LAPACK_GLOBAL for every TU.
+# (The mangling define is deterministic for amd64 gfortran; when BLAS++
+# already provides it via its own interface definitions this is a harmless
+# duplicate of the same empty macro.)
+list( APPEND lapackpp_defines "-DBLAS_FORTRAN_ADD_" )
+
 if (true)
     # Extract definitions as #define VAR or #define VAR VALUE.
     set( lapackpp_header_defines "" )
