14 Star 85 Fork 112

OpenHarmony / prebuilts_lite_sysroot

Create your Gitee Account
Explore and code with more than 8 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)
├── 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 make in the build directory, respectively. The new libc library will be stored in the /prebuilts/lite/sysroot/usr directory.

Usage

  • Add the bin directory to the PATH environment variable. For details about how to set up the compilation environment, see Quick start.
  • The following is a sample script for compiling the helloworld.c program:
clang -o helloworld helloworld.c -target arm-liteos --sysroot=/my_ohos_root_path/prebuilts/lite/sysroot/

Repositories Involved

Kernel subsystem

prebuilts_lite_sysroot

Repository Comments ( 0 )

Sign in to post a comment

About

System header files and standard libraries | 系统头文件和标准库 expand collapse
Cancel

Releases (1)

All

OpenHarmony

Contributors

All

Activities

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

Search