如何从源代码编译我自己的glibc C标准库并使用它? [英] How to compile my own glibc C standard library from source and use it?

查看:556
本文介绍了如何从源代码编译我自己的glibc C标准库并使用它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编译自己的glibc.我有一个目录glibc,其中包含我从互联网上下载的glibc源代码.在该目录中,键入mkdir ../build-glibc.现在,从build-glibc目录中键入../glibc/configure,它执行了配置.现在,我不确定如何调用make.我没有从glibc目录调用它,因为它没有配置设置,我也不能从build-glibc调用它,因为makefile不在该目录中.我该如何解决这个问题?

I am trying to compile my own glibc. I have a directory glibc, which contain the glibc source code I downloaded from the internet. From that directory I typed mkdir ../build-glibc. Now from the build-glibc directory I typed ../glibc/configure, which performed the configuration. Now I'm not sure how to call make. I can't call it from glibc directory since it doesn't have the configuration set, neither I can call it from build-glibc, since makefile is not in that directory. How do I solve this problem?

推荐答案

如果configure脚本成功完成,则Makefile将存在于您的build-glibc目录中.

The Makefile is going to exist in your build-glibc directory if the configure script finishes successfully.

如果在configure期间所有内容似乎顺利进行,但仍然没有Makefile,则您可能错过了特质:

If everything seems to have gone smoothly during configure and still no Makefile, then you probably missed an idiosyncrasy:

在为glibc执行configure时,通常希望您提供备用的--prefix,因为安装到默认位置(/usr/local)可能会削弱系统.如果您不提供,则需要打开--disable-sanity-checks.

While doing a configure for glibc, it is expected that you normally provide an alternative --prefix, because installing to the default location (/usr/local) can potentially cripple the system. If you don't provide one, then you need to switch on --disable-sanity-checks.

如果不是这种情况,请查找config.log文件并读取其内容.

If this is not the case either, look for a config.log file, and read its contents.

这篇关于如何从源代码编译我自己的glibc C标准库并使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆