2011-11-27 30 views
1

当我在Solaris SPARC编译的Lua(5.1.4),我收到以下警告...和他们的地段...许多在Solaris SPARC上编译Lua的警告?

以下仅仅是一个片段:

# /usr/ccs/bin/make solaris 
cd src && /usr/ccs/bin/make solaris 
/usr/ccs/bin/make all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl" 
/usr/sfw/bin/gcc -O2 -Wall -DLUA_USE_POSIX -DLUA_USE_DLOPEN -c lapi.c 
lapi.c: In function `luaA_pushobject': 
lapi.c:92: warning: visibility attribute not supported in this configuration; ignored 
/usr/sfw/bin/gcc -O2 -Wall -DLUA_USE_POSIX -DLUA_USE_DLOPEN -c lcode.c 
lcode.c: In function `luaK_getlabel': 
lcode.c:97: warning: visibility attribute not supported in this configuration; ignored 
lcode.c: In function `luaK_concat': 
lcode.c:196: warning: visibility attribute not supported in this configuration; ignored 
lcode.c: In function `luaK_patchtohere': 
lcode.c:182: warning: visibility attribute not supported in this configuration; ignored 
lcode.c: In function `luaK_patchlist': 
lcode.c:176: warning: visibility attribute not supported in this configuration; ignored 
lcode.c: In function `luaK_checkstack': 
lcode.c:206: warning: visibility attribute not supported in this configuration; ignored 
lcode.c: In function `luaK_reserveregs': 
lcode.c:212: warning: visibility attribute not supported in this configuration; ignored 
lcode.c: In function `luaK_stringK': 

任何想法这意味着什么?它会不会影响Solaris上的Lua?我应该对/ src文件夹中的Makefile进行任何更改?

感谢您的帮助;-)

林顿

+0

什么编译您使用其内容? – kikito

回答

5

Lua的猜测GCC的visibility("hidden")属性支持在任何平台上ELF任何足够近GCC。

但是,如果GCC使用的汇编程序不支持用于设置符号可见性的指令,则GCC将发出此警告。我想这就是发生在这里的事情。

将内部符号设置为“隐藏”允许在构建为共享库时进行更多优化,但实际上并非必要,因此这应该是无害的。

如果他们困扰着你,改线src/luaconf.h

#define LUAI_FUNC  __attribute__((visibility("hidden"))) extern 

#define LUAI_FUNC  extern 
+0

这意味着解决它....感谢您的帮助;-) –