gcc - 构建 glibc 时防止构建静态库
问题描述
我正在交叉编译 glibc 以在自定义 Linux 系统中使用。我只需要共享 glibc 库,所以我试图阻止 glibc 构建静态库,例如“libc.a”。我曾尝试使用“--disable-static”标志,但这似乎不起作用。
我当前的配置命令:
../configure \
CFLAGS="-O2" \
--host=arm-linux-gnueabihf \
--prefix= \
--includedir=/usr/include \
--libexecdir=/usr/libexec \
--datarootdir=/tmp \
--localstatedir=/tmp \
--with-__thread \
--with-tls \
--with-fp \
--with-headers=/opt/sysroot/usr/include \
--without-cvs \
--without-gd \
--enable-kernel=3.18.0 \
--enable-stack-protector=strong \
--enable-shared \
--enable-add-ons=no \
--enable-obsolete-rpc \
--disable-profile \
--disable-debug \
--disable-sanity-checks \
--disable-static \
--disable-werror
解决方案
由于这不会让您在构建时间上获得任何胜利(将一堆文件转储到.a
文件中并创建索引与将它们链接到共享库相比应该没什么),我认为您所追求的是一种方便的安装方式只是你需要的部分。
我自己没有尝试过,但没有make install-no-libc.a
做你想做的事?
推荐阅读
- javascript - 手风琴菜单的CSS完全不透明度
- go - 我可以将 struct slice 指针作为 []interface 指针传递吗
- r - 如何在ggplot x轴上设置开始时间和顺序
- amazon-web-services - 如何在授权中使用 AWS 签名的机器人框架中编写关键字
- javascript - React:映射数据数组
- javascript - 如何使用 React-Router 6 访问 React 中的历史记录
- php - 如何避免显示一次后刷新日期时间更改?
- python-3.x - 根据包含的字符串过滤行,然后比较 Python 中的两列
- amazon-web-services - aws S3 同步命令不适用于 S3 中的复制对象
- spinnaker - 如何对不存在的上下文属性进行 Spinnaker SpEL 引用返回 null(或 None 或 '')?