|
busybox-1.9.2版本:
Build Options 中选择:
Build BusyBox as a static binary (no shared libs) │ │
[ ] Build shared libbusybox │ │
Build with Large File Support (for accessing files > 2 GB)
执行make命令,出现如下错误:
[root@localhost busybox-1.9.2]# make
cat: /dev/null: 没有那个文件或目录
SPLIT include/autoconf.h -> include/config/*
GEN include/bbconfigopts.h
HOSTCC applets/usage
GEN include/usage_compressed.h
HOSTCC applets/applet_tables
GEN include/applet_tables.h
CC applets/applets.o
applets/applets.c:15:2: warning: #warning Static linking against glibc produces buggy executables
applets/applets.c:16:2: warning: #warning (glibc does not cope well with ld --gc-sections).
applets/applets.c:17:2: warning: #warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
applets/applets.c:18:2: warning: #warning Note that glibc is unsuitable for static linking anyway.
applets/applets.c:19:2: warning: #warning If you still want to do it, remove -Wl,--gc-sections
applets/applets.c:20:2: warning: #warning from scripts/trylink and remove this warning.
applets/applets.c:21:2: #error Aborting compilation.
make[1]: *** [applets/applets.o] 错误 1
make: *** [applets] 错误 2
查看applets/applets.c文件:
[root@localhost busybox-1.9.2]# vi applets/applets.c
#include <assert.h>
#include "busybox.h"
/* Apparently uclibc defines __GLIBC__ (compat trick?). Oh well. */
#if ENABLE_STATIC && defined(__GLIBC__) && !defined(__UCLIBC__)
#warning Static linking against glibc produces buggy executables
#warning (glibc does not cope well with ld --gc-sections).
#warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
#warning Note that glibc is unsuitable for static linking anyway.
#warning If you still want to do it, remove -Wl,--gc-sections
#warning from scripts/trylink and remove this warning.
#error Aborting compilation.
#endif
#if ENABLE_BUILD_LIBBUSYBOX
int main(int argc, char **argv)
{
return lbb_main(argc, argv);
}
#endif
#if ENABLE_STATIC && defined(__GLIBC__) && !defined(__UCLIBC__)-----这句在哪可以改设置?
谢谢!
[ 本帖最后由 albert198511 于 2008-5-4 08:41 编辑 ] |
|