1 Star 0 Fork 86

Zachery Wu / prebuilts_lite_sysroot

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

sysroot

Introduction

sysroot is a root directory used by the Clang compiler to search for standard libraries and header files. The libc library is generated from the open-source musl library by compilation.

Directory Structure

/prebuilts/lite/sysroot
├── build                   # Toolchain building (including build scripts)
├── thirdparty              # Temporary third-party header files required for toolchain building
├── usr                     # C library and header files exposed externally
│   ├── include             # Header files exposed externally
│   │  └── arm-liteos       # Chip architecture for the toolchain
│   └── lib                 # C library exposed externally
│       └── arm-liteos      # Chip architecture for the toolchain

Constraints

sysroot applies only to the OpenHarmony kernel.

Compilation and Building

When bugs in the musl library are fixed or the version is updated, you need to compile and build a new libc library by executing thirdparty_headers.sh and build_musl_clang.sh scripts in the build directory, respectively. The new libc library will be stored in the /prebuilts/lite/sysroot/build/usr directory. Then, you need to replace the header files and libc library in the /prebuilts/lite/sysroot/usr directory.

Usage

clang -o helloworld helloworld.c -target arm-liteos -L ~/llvm/lib/clang/9.0.0/lib/arm-liteos/a7_softfp_neon-vfpv4 --sysroot=/usr/xxx/OS/prebuilts/lite/sysroot/

The compiler directory is ~/llvm.

Repositories Involved

Kernel subsystem

prebuilts_lite_sysroot

About

System header files and standard libraries | 系统头文件和标准库 spread retract
Apache-2.0
Cancel

Releases

No release

Contributors

All

Activities

load more
can not load any more
1
https://gitee.com/zzzuo/prebuilts_lite_sysroot.git
git@gitee.com:zzzuo/prebuilts_lite_sysroot.git
zzzuo
prebuilts_lite_sysroot
prebuilts_lite_sysroot
master

Search