簡體   English   中英

在Solaris SPARC上編譯Lua有很多警告?

[英]Lots of warnings compiling Lua on Solaris SPARC?

當我在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':

知道這意味着什么嗎? 它會完全影響Lua在Solaris上嗎? 我應該對/ src文件夾中的Makefile進行任何更改嗎?

謝謝您的幫助 ;-)

林頓

Lua猜測,任何ELF平台上任何足夠新近的GCC都支持GCC的visibility("hidden")屬性。

但是,如果GCC使用的匯編器不支持用於設置符號可見性的指令,則GCC將發出此警告。 我認為這就是這里正在發生的事情。

將內部符號設置為“隱藏”可在構建共享庫時進行更多優化,但這實際上不是必需的,因此這應該是無害的。

如果他們在打擾您,請更改src/luaconf.h的行,內容為

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

#define LUAI_FUNC       extern

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM