<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"><channel><title>MagicLen</title><link>https://magiclen.org/cn/tag/musl/</link><description>多元化原创文章，内容包罗万象，有编程语言、网站应用、软件介绍、硬件介绍、操作系统、旅行游记、专题采访、益智问题、文学创作，以及作者们的知识分享和作品分享。</description><language>zh-CN</language><lastBuildDate>Sun, 22 Nov 2026 17:50:19 +0800</lastBuildDate><atom:link href="https://magiclen.org/cn/tag/musl/feed/" rel="self" type="application/rss+xml"/><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>8</sy:updateFrequency><sy:updateBase>1970-01-01T00:00+00:00</sy:updateBase><item><title>在 Linux 操作系统上使用 musl libc 来编译出静态可携的程序，摆脱对于 glibc 的依赖</title><link>https://magiclen.org/cn/musl-libc/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2022/07/program-942487_1920-220x162.jpg" srcset="https://magiclen.org/wp-content/uploads/2022/07/program-942487_1920-220x162.jpg 1x, https://magiclen.org/wp-content/uploads/2022/07/program-942487_1920-440x324.jpg 2x, https://magiclen.org/wp-content/uploads/2022/07/program-942487_1920-660x486.jpg 3x" alt>
musl libc 是 C 语言的一种标准函数库，代码干净且高效，针对静态连接(static linking)设计，适合被用来制作可携的程序，且也很容易进行交叉编译(cross compile)，编译出运行在不同系统环境的程序。GCC (GNU Compiler Collection)是 GNU 的 C/C++ 编译器套装，大部分的 Linux 发行版使用的 C 标准函数库是 glibc，其所提供...]]></description><category>C &amp; C++</category><category>研究分享</category><category>Linux</category><category>musl</category><category>GCC</category><guid>https://magiclen.org/cn/musl-libc</guid><pubDate>Tue, 27 Sep 2022 12:00:00 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>如何编译出完全静态的 Rust 程序？</title><link>https://magiclen.org/cn/rust-static-musl/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png 1x, https://magiclen.org/wp-content/uploads/2018/04/rust-440x324.png 2x, https://magiclen.org/wp-content/uploads/2018/04/rust-660x486.png 3x" alt>
在 Linux 操作系统上编译 Rust 程序时，预设使用的目标(target)为「*-unknown-linux-gnu*」（例如 x86_64-unknown-linux-gnu、i686-unknown-linux-gnu 等），因此编译出来的可执行文件会与「glibc」进行动态链接。如果使用较新的 Linux 操作系统来编译 Rust 程序，该程序很可能就会因为 glibc 版本也较新的关...]]></description><category>Rust</category><category>Rust</category><category>musl</category><guid>https://magiclen.org/cn/rust-static-musl</guid><pubDate>Mon, 5 Nov 2018 20:00:16 +0800</pubDate><dc:creator>Magic Len</dc:creator></item></channel></rss>