Configuring the Cross Compilation Environment
If the OS architecture in the development environment differs from that in the operating environment, you need to use a cross compiler and library files of the operating environment's architecture to perform compilation in the development environment. In this way, the compiled executable file can be executed in the operating environment.
For example, if the runtime environment is an edge device and you are using an x86 server (or PC) to build the development environment, you must use a cross-compilation tool and aarch64-architecture library files for compilation.
Currently, compilation is supported using either the cross-compilation tools provided in the CANN Toolkit package or the g++ cross-compilers supported on Linux. For supported OSs (e.g., openEuler, Ubuntu), you can directly use the cross-compilation tools bundled with the CANN Toolkit package. For unsupported OSs and other Ascend AI Processors, you must manually install the appropriate g++ cross-compiler. For details, see Table 1.
Development Environment Architecture |
Operating Environment Architecture |
Compilation Environment Configuration |
|---|---|---|
x86_64 |
AArch64 |
|