diff options
| -rw-r--r-- | meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb b/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb index fef9d3a80e..4357515b71 100644 --- a/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb +++ b/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb | |||
| @@ -33,6 +33,37 @@ OECMAKE_GENERATOR = "Unix Makefiles" | |||
| 33 | inherit cmake pkgconfig ptest | 33 | inherit cmake pkgconfig ptest |
| 34 | EXCLUDE_FROM_WORLD = "1" | 34 | EXCLUDE_FROM_WORLD = "1" |
| 35 | 35 | ||
| 36 | # The `xerbla.o` file contains an absolute path in `xerbla.f.o`, but the options | ||
| 37 | # `-fdebug-prefix-map` and `-ffile-prefix-map` cannot be used because gfortran does not support them. | ||
| 38 | # To address this issue, we manually replace the absolute path with a relative path | ||
| 39 | # in the generated `build.make` file. | ||
| 40 | # | ||
| 41 | # An issue has been reported: https://github.com/Reference-LAPACK/lapack/issues/1087, | ||
| 42 | # requesting a fix in the source code. | ||
| 43 | # | ||
| 44 | # This workaround resolves the TMPDIR [buildpaths] issue by converting the absolute path | ||
| 45 | # of `xerbla.f` to a relative path. The steps are as follows: | ||
| 46 | # | ||
| 47 | # 1. Locate all `build.make` files after the `do_configure` step is completed. | ||
| 48 | # 2. Compute the relative path for `xerbla.f` based on the current build directory. | ||
| 49 | # 3. Replace the absolute path with the calculated relative path in the `build.make` files | ||
| 50 | # | ||
| 51 | # Additionally, when ptests are enabled, apply a simpler workaround for ptest code: | ||
| 52 | # - Replace occurrences of `${WORKDIR}` in all `build.make` files under the TESTING directory, excluding | ||
| 53 | # the MATGEN subdirectory, with a relative path prefix of `"../../.."`. | ||
| 54 | do_configure:append(){ | ||
| 55 | for file in `find ${B} -name build.make`; do | ||
| 56 | sed -i -e "s#\(.*-c \).*\(/xerbla\.f \)#\1$(grep '\-c .*xerbla\.f' $file | awk -F'cd ' '{print $2}'| \ | ||
| 57 | awk '{src=$1; sub(/.*-c /, ""); sub(/xerbla\.f.*/, ""); obj=$0; print src, obj}' | \ | ||
| 58 | while read src obj; do echo "$(realpath --relative-to="$src" "$obj")"; done)\2#g" $file | ||
| 59 | done | ||
| 60 | if (${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)});then | ||
| 61 | for file in `find . -name build.make -path '*TESTING*' -not -path '*MATGEN*'`; do | ||
| 62 | sed -i -e "s#\(.*-c \)\(${WORKDIR}\)\(.*.[f|F] \)#\1../../..\3#g" $file | ||
| 63 | done | ||
| 64 | fi | ||
| 65 | } | ||
| 66 | |||
| 36 | do_install_ptest () { | 67 | do_install_ptest () { |
| 37 | rsync -a ${B}/TESTING ${D}${PTEST_PATH} \ | 68 | rsync -a ${B}/TESTING ${D}${PTEST_PATH} \ |
| 38 | --exclude CMakeFiles \ | 69 | --exclude CMakeFiles \ |
