Rate This Document
Findability
Accuracy
Completeness
Readability

Introduction

The Porting Advisor tool is designed for developers, users, and ISVs' developers of the Kunpeng platform. It is used to migrate x86 Linux software to the Kunpeng Linux system. It can automatically scan and analyze applications and generate guidance reports, greatly improving code porting efficiency.

Table 1 Task description

Task Type

Description

Software porting assessment

Analyzes software packages (but not source packages) and installed software, and provides porting assessment reports.

  • Checks the shared object (SO) dependency libraries and executable files contained in software packages (RPM, DEB, TAR, ZIP, GZIP, and others) and assesses the portability of these files.
  • Checks the SO dependency libraries and binary files in the Java software packages (JAR, WAR, and EAR) and assesses the portability of these files.
  • Checks the SO dependency libraries and executable files in the specified software installation path and assesses the portability of these files.

Source code porting

Analyzes source files written in C/C++/ASM/Fortran/Go/interpreted languages, identifies the code to be ported, and provides porting suggestions. It also supports source code editing and one-click code replacement.

  • Checks the C/C++/ASM/Fortran/Go software build project files and provides porting suggestions.
  • Checks the link libraries used by C/C++/Fortran/Go/interpreted language software build project files and provides porting suggestions.
  • Checks the C/C++/ASM/Fortran/Go/interpreted language software source code and provides porting suggestions. The tool supports porting of Fortran source code from the Intel Fortran compiler to the GCC Fortran compiler, and checks of compiler features and syntax extensions.
  • Checks the compatibility of the SO files loaded by the Python/Java/Scala program through the ctypes module.
  • Analyzes some x86 assembly instructions and converts them into equivalent Kunpeng assembly instructions.

Software package rebuild

Analyzes the composition of the software package to be ported on the Kunpeng platform, rebuilds and generates a software package compatible with the Kunpeng platform, or directly provides a software package that can be used.

Use Restrictions

Table 2 Use restrictions

Task Type

Description

Build file

  • The Find function in CMake parsing depends on the GCC compilation result. If the tool runs in a Kunpeng environment, CMake cannot successfully parse or detect x86-specific compilation options such as -m64.
  • Makefile supports the shell commands in $(shell shell_command) format, but does not support the build configuration files using shell scripts.

C/C++ code analysis

If the custom macro header files, third-party header files, or some system header files are missing, some macros to be modified may not be identified and accurate modification suggestions cannot be provided.

Intrinsic functions

The tool cannot provide accurate replacement suggestions for more than 130 intrinsic functions related to the Intel coprocessors.

Assembly code

  • The tool cannot provide absolutely accurate modification suggestions in any of the following scenarios:
    • When a function contains parameters, a message will be displayed indicating that the function conversion may fail due to a special structure.
    • When parameters are transferred to a stack, the parameter type is integer by default.
  • Manual conversion is prompted in any of the following scenarios:
    • The GOTO, CALL, and RET statements are used.
    • A segment register or a physical register without a value is used.
    • Global symbols are accessed.
    • The bit width of the input and output variables is greater than 128 bits.
    • The number of input and output global variables is greater than 21.
    • The bit width of instructions is different from that of variables.
    • The hybrid Intel and AT&T assembly format is used.
    • A syntax error exists in the assembly.
      NOTE: