AdaCore / gprbuild

GPRbuild is an advanced build system designed to help automate the construction of multi-language systems.
Other
65 stars 21 forks source link

How to specify project path in configuration project #103

Closed pmunts closed 2 years ago

pmunts commented 2 years ago

I am attempting to use gprbuild for cross-compiling, and am having some problems.

This command works:

gprbuild --target=aarch64-linux-gnu -p -aP/usr/local/share/libsimpleio-aarch64-linux-gnu test_hello

And with the default.cgpr from my cross-toolchain, this command works:

gprbuild -p -aP/usr/local/share/libsimpleio-aarch64-linux-gnu test_hello

But this command fails, because gprbuild chooses my precompiled library project from the native toolchain instead of the cross-toolchain:

gprbuild -p test_hello

Is there some way to set the project path in default.cgpr? I tried adding for Switches (others) use ("-aP/usr/local/share/libsimpleio-aarch64-linux-gnu"); to package Builder in default.cgpr, but then I get this error:

gprbuild: -aP/usr/local/share/libsimpleio-aarch64-linux-gnu can only be used on the command line

t-14 commented 2 years ago

The prefix for the project path is computed from Compiler'Driver attribute.