comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Upgrade to gnat 2015 now project not linking
Date: Wed, 30 Sep 2015 20:15:01 +0100
Date: 2015-09-30T20:15:01+01:00	[thread overview]
Message-ID: <ly1tdfk9ca.fsf@pushface.org> (raw)
In-Reply-To: e1530e58-a01f-41f4-805b-067d31aec960@googlegroups.com

Lucas Redding <lucas.redding@gmail.com> writes:

> Hold fire!
>
> I was too quick to come to conclusion. -M does not generate a map file.
>
> I need to look into how to generate a map file in 2015.
>
> I'll be back.

Gprbuild can do this.

You should be able to say, in package Builder, something like

   package Builder is
      for Default_Switches ("ada") use
        ("--create-map-file=" & project'Project_Dir & project'Name & ".map");
   end Builder;

(that's one of mine; it assumes there's only one main program, named
after the project, and works round the problem that the link is done in
the build directory).

assuming that the configuration is set up to know how to specify a map
file; if not, you could try (for GNU ld)

   package Linker is
      for Map_File_Option use "-Wl,-Map,";
   end Linker;

It occurs to me one could try to combine these:

   package Linker is
      for Map_File_Option use "-Wl,-Map,project'Project_Dir";
   end Linker;

and

   package Builder is
      for Default_Switches ("ada") use ("--create-map-file");
   end Builder;

If this works, you could omit (this part of) package Builder and just
use --create-map-file on the command line.

  parent reply	other threads:[~2015-09-30 19:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 12:27 Upgrade to gnat 2015 now project not linking Lucas Redding
2015-09-29 20:10 ` Shark8
2015-09-30  7:26   ` Lucas Redding
2015-09-30  8:51     ` Georg Bauhaus
2015-09-30 17:07       ` Lucas Redding
2015-09-30 17:20         ` Lucas Redding
2015-09-30 17:52           ` Lucas Redding
2015-09-30 19:15           ` Simon Wright [this message]
2015-10-01  6:26             ` Lucas Redding
2015-10-01  8:22             ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox