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 = {
unix_names = { "IL", "ILU" },
},
dl = {
win_names = { },
unix_names = { "dl" },
},
-- rationale: see libraries_dir..enet/lib/rationale.txt
enet =
{
@ -141,6 +145,15 @@ extern_lib_defs = {
osx_frameworks = { "OpenGL" },
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 = {
win_names = { "js32" },
unix_names = { "js" },
@ -167,6 +180,10 @@ extern_lib_defs = {
end
end,
},
x11 = {
win_names = { },
unix_names = { "X11" },
},
xerces = {
win_names = { "xerces-c_2" },
unix_names = { "xerces-c" },
@ -176,16 +193,6 @@ extern_lib_defs = {
win_names = { "zlib1" },
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-non-virtual-dtor",
"-Wno-invalid-offsetof", -- offsetof on non-POD types
-- do something (?) so that ccache can handle compilation with PCH enabled
"-fpch-preprocess",
@ -166,6 +166,9 @@ function package_set_build_flags()
-- non-IEEE-conformant results, but haven't noticed any trouble so far.
"-ffast-math",
})
tinsert(package.linkoptions, {
"-Wl,--no-undefined",
})
end
tinsert(package.buildoptions, {
@ -750,7 +753,8 @@ function setup_atlas_packages()
"spidermonkey",
"wxwidgets",
"comsuppw",
"zlib"
"zlib",
"x11",
},{ -- extra_params
pch = (not has_broken_pch),
extra_links = atlas_extra_links,
@ -812,9 +816,11 @@ end
function setup_atlas_frontends()
setup_atlas_frontend_package("ActorEditor")
setup_atlas_frontend_package("ArchiveViewer")
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
@ -874,6 +880,7 @@ function setup_collada_packages()
},{ -- include
},{ -- extern_libs
"fcollada",
"dl",
},{ -- extra_params
pch = 1,
})