On 26 Apr 2016, at 17:59, Stephen Leake <[email protected]> wrote:
> 
> Simon Wright <[email protected]> writes:
>> 
>>   arm-eabi-gnat list -v -P project.gpr --RTS=ravenscar-sfp-stm32f4
> 
> Makes sense, although it would be nice if RTS was in project.gpr.

It _is_! the problem is that arm-eabi-gnat list doesn't look. A bug report is 
needed.

>> While working on this, I kept on finding that exec-path had lost the
>> setting I gave it in ~/.emacs; so I've used
>> 
>>         (target-gnat-exec (locate-file
>>                            target-gnat
>>                            (split-string (getenv "PATH")
>>                            path-separator)))
> 
> That works for me; I alwas set PATH and exec-path together. But others
> might not. You'll have to keep this as a separate patch until you find
> the cause of your problem with exec-path. This should not be the only
> place it causes problems.

It turns out that I had managed somehow to customise exec-path :-(
I've removed that change.

>> Eventually, this can be put into gpr_query, I think, but I got lost in
>> there 
> 
> gpr_query should be updated for GNAT GPL 2015 before anything else; GPL
> 2015 gnatcoll.projects supports aggregrate projects.

I don't use aggregate projects; the only time I tried to they didn't actually 
do what I needed. But I don't remember what the problem was.

>> so used .prj file settings: e.g.
>> 
>> gpr_file=io_expander.gpr
>> target=arm-eabi-
>> runtime=ravenscar-sfp-stm32f4
>> 
>> Patch attached. Let us know how you get on!
> 
> Why this change:
[...]
> gpr_file contains the path of the .gpr file, relative to the .prj file;
> it does not need to be in the same directory as the .prj file. But
> default-directory at this point is the directory containing the .gpr
> file (or at least, it's supposed to be).
> 
> Same issue in gnat-core.el gnat-run-gnat.

It must have gone wrong at one of the points, or I wouldn't have noticed the 
code or changed it. The other was one I noticed in passing. Not needed now the 
rest is working, so removed.

New version of patch attached.


Attachment: cross-compilation.diff
Description: Binary data

_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://stephe-leake.org/mailman/listinfo/emacs-ada-mode_stephe-leake.org

Reply via email to