Link with -Wl,--no-undefined to detect errors at compile time

This was SVN commit r7022.
This commit is contained in:
Ykkrosh 2009-07-18 19:55:27 +00:00
parent abf84b25f8
commit 717db156fc
2 changed files with 28 additions and 14 deletions

View File

@ -78,6 +78,10 @@ extern_lib_defs = {
devil = { devil = {
unix_names = { "IL", "ILU" }, unix_names = { "IL", "ILU" },
}, },
dl = {
win_names = { },
unix_names = { "dl" },
},
-- rationale: see libraries_dir..enet/lib/rationale.txt -- rationale: see libraries_dir..enet/lib/rationale.txt
enet = enet =
{ {
@ -141,6 +145,15 @@ extern_lib_defs = {
osx_frameworks = { "OpenGL" }, osx_frameworks = { "OpenGL" },
dbg_suffix = "", dbg_suffix = "",
}, },
sdl = {
add_func = function()
add_extern_lib_paths("sdl")
if OS ~= "windows" then
tinsert(package.buildoptions, "`sdl-config --cflags`")
tinsert(package.linkoptions, "`sdl-config --libs`")
end
end
},
spidermonkey = { spidermonkey = {
win_names = { "js32" }, win_names = { "js32" },
unix_names = { "js" }, unix_names = { "js" },
@ -167,6 +180,10 @@ extern_lib_defs = {
end end
end, end,
}, },
x11 = {
win_names = { },
unix_names = { "X11" },
},
xerces = { xerces = {
win_names = { "xerces-c_2" }, win_names = { "xerces-c_2" },
unix_names = { "xerces-c" }, unix_names = { "xerces-c" },
@ -176,16 +193,6 @@ extern_lib_defs = {
win_names = { "zlib1" }, win_names = { "zlib1" },
unix_names = { "z" }, unix_names = { "z" },
}, },
sdl = {
add_func = function()
add_extern_lib_paths("sdl")
if OS ~= "windows" then
tinsert(package.buildoptions, "`sdl-config --cflags`")
tinsert(package.linkoptions, "`sdl-config --libs`")
end
end
}
} }

View File

@ -155,7 +155,7 @@ function package_set_build_flags()
"-Wno-reorder", -- order of initialization list in constructors "-Wno-reorder", -- order of initialization list in constructors
"-Wno-non-virtual-dtor", "-Wno-non-virtual-dtor",
"-Wno-invalid-offsetof", -- offsetof on non-POD types "-Wno-invalid-offsetof", -- offsetof on non-POD types
-- do something (?) so that ccache can handle compilation with PCH enabled -- do something (?) so that ccache can handle compilation with PCH enabled
"-fpch-preprocess", "-fpch-preprocess",
@ -166,6 +166,9 @@ function package_set_build_flags()
-- non-IEEE-conformant results, but haven't noticed any trouble so far. -- non-IEEE-conformant results, but haven't noticed any trouble so far.
"-ffast-math", "-ffast-math",
}) })
tinsert(package.linkoptions, {
"-Wl,--no-undefined",
})
end end
tinsert(package.buildoptions, { tinsert(package.buildoptions, {
@ -750,7 +753,8 @@ function setup_atlas_packages()
"spidermonkey", "spidermonkey",
"wxwidgets", "wxwidgets",
"comsuppw", "comsuppw",
"zlib" "zlib",
"x11",
},{ -- extra_params },{ -- extra_params
pch = (not has_broken_pch), pch = (not has_broken_pch),
extra_links = atlas_extra_links, extra_links = atlas_extra_links,
@ -812,9 +816,11 @@ end
function setup_atlas_frontends() function setup_atlas_frontends()
setup_atlas_frontend_package("ActorEditor") setup_atlas_frontend_package("ActorEditor")
setup_atlas_frontend_package("ArchiveViewer")
setup_atlas_frontend_package("ColourTester") setup_atlas_frontend_package("ColourTester")
setup_atlas_frontend_package("FileConverter") if options["aoe3ed"] then
setup_atlas_frontend_package("ArchiveViewer")
setup_atlas_frontend_package("FileConverter")
end
end end
@ -874,6 +880,7 @@ function setup_collada_packages()
},{ -- include },{ -- include
},{ -- extern_libs },{ -- extern_libs
"fcollada", "fcollada",
"dl",
},{ -- extra_params },{ -- extra_params
pch = 1, pch = 1,
}) })