From fbb631b67089fe4173fe1c3f22508365c08befe1 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Fri, 22 May 2020 12:58:35 +0200 Subject: [PATCH] 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. --- gnatcoll.gpr | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnatcoll.gpr b/gnatcoll.gpr index b508adf9..20247f78 100644 --- a/gnatcoll.gpr +++ b/gnatcoll.gpr @@ -272,7 +272,12 @@ project GnatColl is end Naming; package Linker is - for Linker_Options use Extra_Libs; + case Library_Type is + when "relocatable" => + null; + when "static" | "static-pic" => + for Linker_Options use Extra_Libs; + end case; end Linker; package Install is