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.
28 lines
749 B
Diff
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
|