Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
3ffb556c
T
Third Party Musl
项目概览
OpenHarmony
/
Third Party Musl
大约 1 年 前同步成功
通知
37
Star
125
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Musl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3ffb556c
编写于
10月 26, 2012
作者:
R
Rich Felker
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update documentation
上级
cd31a1fc
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
67 addition
and
33 deletion
+67
-33
INSTALL
INSTALL
+49
-16
README
README
+18
-17
未找到文件。
INSTALL
浏览文件 @
3ffb556c
...
@@ -5,35 +5,68 @@ musl may be installed either as an alternate C library alongside the
...
@@ -5,35 +5,68 @@ musl may be installed either as an alternate C library alongside the
existing libraries on a system, or as the primary C library for a new
existing libraries on a system, or as the primary C library for a new
or existing musl-based system.
or existing musl-based system.
First, some prerequisites:
This document covers the prerequisites and procedures for compiling
and installation.
- A C99 compiler with gcc-style inline assembly support, support for
weak aliases, and support for building stand-alone assembly files.
gcc 3.x and 4.x are known to work. pcc and LLVM/clang may work but
are untested, and pcc is known to have some bugs.
- GNU make
- Linux, preferably 2.6.22 or later. Older versions are known to have
==== Build Prerequisites ====
serious bugs that will make some interfaces non-conformant, but if
you don't need threads or POSIX 2008 features, even 2.4 is probably
okay.
- A supported CPU architecture (currently i386, x86_64, arm, or mips).
The only build-time prerequisites for musl are GNU Make and a
freestanding C99 compiler toolchain targeting the desired instruction
set architecture and ABI, with support for gcc-style inline assembly,
weak aliases, and stand-alone assembly source files.
- If you want to use dynamic linking, it's recommended that you have
The system used to build musl does not need to be Linux-based, nor do
permissions to write to /lib and /etc. Otherwise your binaries will
the Linux kernel headers need to be available.
have to use a nonstandard dynamic linker path.
If support for dynamic linking is desired, some further requriements
are placed on the compiler and linker. In particular, the linker must
support the -Bsymbolic-functions option.
At present, GCC 4.6 or later is the recommended compiler for building
musl. Any earlier version of GCC with full C99 support should also
work, but may be subject to minor floating point conformance issues on
i386 targets. Sufficiently recent versions of PCC and LLVM/clang are
also believed to work, but have not been tested as heavily; prior to
Fall 2012, both had known bugs that affected musl.
== Option 1: Installing musl as an alternate C library ==
=== Supported Targets ====
musl can be built for the following CPU instruction set architecture
and ABI combinations:
- i386 (requires 387 math and 486 cmpxchg instructions)
- x86_64
- arm (EABI)
- mips (o32 ABI, requires fpu or float emulation in kernel)
- microblaze (requires a cpu with lwx/swx instructions)
For architectures with both little- and big-endian options, both are
supported unless otherwise noted.
In general, musl assumes the availability of all Linux syscall
interfaces available in Linux 2.6.0. Some programs that do not use
threads or other modern functionality may be able to run on 2.4.x
kernels. Other kernels (such as BSD) that provide a Linux-compatible
syscall ABI should also work but have not been extensively tested.
==== Option 1: Installing musl as an alternate C library ====
In this setup, musl and any third-party libraries linked to musl will
In this setup, musl and any third-party libraries linked to musl will
reside under an alternate prefix such as /usr/local/musl or /opt/musl.
reside under an alternate prefix such as /usr/local/musl or /opt/musl.
A wrapper script for gcc, called musl-gcc, can be used in place of gcc
A wrapper script for gcc, called musl-gcc, can be used in place of gcc
to compile and link programs and libraries against musl.
to compile and link programs and libraries against musl.
(Note: There are not yet corresponding wrapper scripts for other
compilers, so if you wish to compile and link against musl using
another compiler, you are responsible for providing the correct
options to override the default include and library search paths.)
To install musl as an alternate libc, follow these steps:
To install musl as an alternate libc, follow these steps:
1. Configure musl's build with a command similar to:
1. Configure musl's build with a command similar to:
...
@@ -92,7 +125,7 @@ source/build tree.
...
@@ -92,7 +125,7 @@ source/build tree.
==
Option 2: Installing musl as the primary C library
==
==
== Option 2: Installing musl as the primary C library ==
==
In this setup, you will need an existing compiler/toolchain. It
In this setup, you will need an existing compiler/toolchain. It
shouldnt matter whether it was configured for glibc, uClibc, musl, or
shouldnt matter whether it was configured for glibc, uClibc, musl, or
...
...
README
浏览文件 @
3ffb556c
...
@@ -8,7 +8,7 @@ musl is an alternative to glibc, eglibc, uClibc, dietlibc, and klibc.
...
@@ -8,7 +8,7 @@ musl is an alternative to glibc, eglibc, uClibc, dietlibc, and klibc.
For reasons why one might prefer musl, please see the FAQ and libc
For reasons why one might prefer musl, please see the FAQ and libc
comparison chart on the project website,
comparison chart on the project website,
http://www.
etalabs.net/musl
/
http://www.
musl-libc.org
/
For installation instructions, see the INSTALL file.
For installation instructions, see the INSTALL file.
...
@@ -19,22 +19,23 @@ license status of code included in musl (standard MIT license).
...
@@ -19,22 +19,23 @@ license status of code included in musl (standard MIT license).
Greetings!
Greetings!
With the 0.9.0 release, musl has reached a milestone in completeness
The 0.9.x release series for musl features interface coverage for all
and compatibility. All interfaces in ISO C99 and POSIX 2008 base exist
interfaces defined in ISO C99 and POSIX 2008 base, along with a number
in musl, along with a number of non-standardized interfaces based on
of non-standardized interfaces for compatibility with Linux, BSD, and
GNU and BSD libraries and syscall interfaces for Linux-kernel-specific
glibc functionality. As the release series progresses, we are
functions. Some interfaces lack obscure or rarely-used functionality
gradually adding support for incomplete functionality in existing
needed for strict conformance, but the vast majority of interfaces go
interfaces, additional functions that are deemed to be important due
above and beyond the requirements for conformance, often promising
to their use in real-world software, and support for new library and
success where other implementations can fail under resource exhaustion
language features in C11 such as thread-local storage, which is now
or other corner-case conditions.
supported on all targets. In addition, support for additional target
cpu architectures is being added.
At this point, hundreds of packages have been successfully built
against musl - either out-of-the-box or with minor patches to address
The number of packages build successfully against musl - either
portability errors - ranging from low-level system utilities and
out-of-the-box or with minor patches to address portability errors -
network daemons to major gui applications. Testing has been conducted
has exceeded 5000 and is steadily growing. In addition to application
using three separate test frameworks and numerous additional
compatibility testing, unit testing has been conducted using three
standalone test cases to verify the correctness of the implementation.
separate test frameworks and numerous additional standalone test cases
to verify the correctness of the implementation.
Included with this package is a gcc wrapper script (musl-gcc) which
Included with this package is a gcc wrapper script (musl-gcc) which
allows you to build musl-linked programs using an existing gcc 3.x or
allows you to build musl-linked programs using an existing gcc 3.x or
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录