Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to specify .cgpr file in .gpr file

67 views
Skip to first unread message

philip...@gmail.com

unread,
Mar 1, 2021, 2:08:19 PM3/1/21
to
I have a GNAT cross-toolchain setup that works fine. I have been using a generic project file named default.gpr, which gprbuild will use automatically, in my project directory. So the command for a native compile is:

gprbuild -p test_adc

And the command for a cross-compile for a Raspberry Pi 4 target is:

gprbuild -p --config=/usr/local/gcc-aarch64-linux-gnu-muntsos-crosstool/share/gpr/aarch64-linux-gnu.cgpr test_adc

For working from the command line, passing --config=blah to gprbuild to select cross-compilation works perfectly well. But when using gps, it isn't quite as convenient. Is there some way to move --config=blah from the gprbuild command line to the project file?

I've looked through the gprbuild documentation but haven't found any obvious way to accomplish this. The Target attribute doesn't quite work, as my cross-compilation .cgpr files are not in a place known to gprbuild, and I'd rather not mess with environment variables with gps.
0 new messages