[Bug ada/56616] gnatmake builds SAL incorrectly if library_kind is "static"

2016-04-27 Thread simon at pushface dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56616

--- Comment #3 from simon at pushface dot org ---
This PR was down to a lack of appreciation of the resources available.

If you provide a Library_Interface and you're building a dynamic
library, gprbuild populates the include Library_Src_Dir directory with
the library interface units and builds a dynamic library with
auto-initialization.

If you provide a Library_Interface and you're building a static library,
gprbuild uses the same rule to populate the include directory; but this
mey be wrong if the non-visible units require elaboration (e.g. they
call in the tasking runtime).

The patch I provided meant that if you provided a Library_Interface for
a static library, the include directory would be populated with all the
units regardless of whether they were actually listed; I now see that
using Interfaces and naming all the source files achieves the same
effect! so no need for a patch (but maybe a blog posting?)

For the BCs this would mean

   case Library_Type is
  when "relocatable" =>
 for Library_Src_Dir use "./include";
 for Library_Interface use Source_Units;
  when "static" =>
 for Library_Src_Dir use "./include";
 for Interfaces use Sources;
   end case;

where I already have

   Source_Units :=
 (
  "BC.Containers.Bags.Bounded",
  "BC.Containers.Bags.Dynamic",
  ...

and

   Sources :=
 (
  "bc-containers-bags-bounded.adb",
  "bc-containers-bags-bounded.ads",
  "bc-containers-bags-dynamic.adb",
  "bc-containers-bags-dynamic.ads",
  ...

[Bug ada/56616] gnatmake builds SAL incorrectly if library_kind is "static"

2015-12-06 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56616

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||ebotcazou at gcc dot gnu.org
 Resolution|--- |WONTFIX

--- Comment #2 from Eric Botcazou  ---
Support for projects is deprecated and will be removed in future releases.

[Bug ada/56616] gnatmake builds SAL incorrectly if library_kind is static

2013-03-14 Thread simon at pushface dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56616



--- Comment #1 from simon at pushface dot org 2013-03-14 12:30:33 UTC ---

Created attachment 29667

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29667

Proposed patch