MSYS2-packages/libtool/0004-Allow-statically-linking-Flang-support-libraries-whe.patch
Markus Mützel bc75e1f0ac libtool: Add new LLVM Flang runtime library name to exceptions
The Flang runtime library was renamed in LLVM 21. Add the new name of the
Flang runtime library to the list of static libraries that are allowed
exceptionally to be linked into shared libraries.
2025-09-22 14:55:29 +02:00

28 lines
749 B
Diff

[PATCH] Allow statically linking Flang support libraries when linking
a library
---
build-aux/ltmain.in | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 5f9af8c2..97810d08 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -7439,6 +7439,15 @@ func_mode_link ()
a_deplib=
break 2
fi
+ # Linking compiler provided static libraries into shared
+ # libraries is allowed, but linking other static libraries is
+ # non-portable.
+ case $potlib in
+ */libFortran*.$libext | */libflang_rt*.$libext)
+ func_append newdeplibs " $potlib"
+ a_deplib=
+ ;;
+ esac
done
done
fi