Skip to content

Commit f050ada

Browse files
committed
Only copy Library_Options to Linker'Linker_Options for static kinds
A program embedding a static library must be linked with indirect dependencies, but a shared library is already linked with Library_Options, and a program linking with it does not need to repeat indirect dependencies. Overlinking even causes maintenance problems.
1 parent 5e25a5b commit f050ada

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

gnatcoll.gpr

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,12 @@ project GnatColl is
170170
end Naming;
171171

172172
package Linker is
173-
for Linker_Options use Extra_Libs;
173+
case Library_Type is
174+
when "relocatable" =>
175+
null;
176+
when "static" | "static-pic" =>
177+
for Linker_Options use Extra_Libs;
178+
end case;
174179
end Linker;
175180

176181
package Install is

0 commit comments

Comments
 (0)