在 Solaris SPARC 上编译 Lua 时出现很多警告?
当我在 Solaris SPARC 上编译 Lua (5.1.4) 时,我收到以下警告...而且很多...
下面只是一个片段:
# /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 进行任何更改吗?
感谢您的帮助;-)
林顿
When I compile Lua (5.1.4) on Solaris SPARC I am getting the following warnings...and LOTS of them...
Below is just a snippet:
# /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':
Any idea what this could mean? Will it influence Lua on Solaris at all? Any changes I should make to the Makefile in /src folder?
Thanks for the help ;-)
Lynton
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Lua 猜测任何 ELF 平台上任何足够新的 GCC 都支持 GCC 的
visibility("hidden")
属性。但如果 GCC 使用的汇编器不支持设置符号可见性的指令,GCC 将发出此警告。我认为这就是这里发生的事情。
将内部符号设置为“隐藏”可以在构建为共享库时进行更多优化,但实际上并不是必需的,因此这应该是无害的。
如果它们打扰您,请将 src/luaconf.h 中的行更改
为
Lua guesses that GCC's
visibility("hidden")
attribute is supported on any sufficiently recent GCC on any ELF platform.But if the assembler being used by GCC does not support the directives for setting symbol visibility, GCC will issue this warning. I think that's what's happening here.
Setting internal symbols as "hidden" allows more optimisation when building as a shared library, but is not actually necessary, so this should be harmless.
If they are bothering you, change the line in
src/luaconf.h
which readsto