forked from 0ad/0ad
Add premake hack to produce elf64 assembly on amd64/x86_64
This was SVN commit r6952.
This commit is contained in:
parent
89b687de6f
commit
f28ab0c473
@ -40,6 +40,10 @@ if OS == "windows" then
|
||||
has_broken_pch = false
|
||||
else
|
||||
project.cxxtestpath = "../../build/bin/cxxtestgen.pl"
|
||||
if arch == "amd64" then
|
||||
-- Hack for amd64 linux - tell nasm to product 64-bit elf.
|
||||
project.nasmformat = "elf64"
|
||||
end
|
||||
|
||||
-- GCC bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10591) - PCH breaks anonymous namespaces
|
||||
-- Fixed in 4.2.0, but we have to disable PCH for earlier versions, else
|
||||
|
@ -438,7 +438,8 @@ static const char* listCppTargets(const char* name)
|
||||
{
|
||||
const char* ext = path_getextension(name);
|
||||
const char* pchHeader = prj_get_pch_header();
|
||||
const char *pchSource = prj_get_pch_source();
|
||||
const char* pchSource = prj_get_pch_source();
|
||||
const char* nasm_format = prj_get_nasm_format();
|
||||
|
||||
int use_pch = pchHeader?1:0, gen_pch=0;
|
||||
const char* pchExt = (matches(g_cc, "icc") ? "pchi" : "h.gch");
|
||||
@ -514,7 +515,9 @@ static const char* listCppTargets(const char* name)
|
||||
strcat(g_buffer, "nasm "); strcat(g_buffer, opts);
|
||||
strcat(g_buffer, " -i"); strcat(g_buffer,input_dir );
|
||||
strcat(g_buffer, " -f ");
|
||||
if (os_is("macosx"))
|
||||
if (nasm_format)
|
||||
strcat(g_buffer, nasm_format);
|
||||
else if (os_is("macosx"))
|
||||
strcat(g_buffer, "macho");
|
||||
else
|
||||
strcat(g_buffer, "elf");
|
||||
|
@ -248,6 +248,11 @@ const char* prj_get_nasmpath()
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const char* prj_get_nasm_format()
|
||||
{
|
||||
return my_cfg->prjConfig->nasm_format;
|
||||
}
|
||||
|
||||
const char* prj_get_cxxtestpath()
|
||||
{
|
||||
strcpy(buffer, path_build(my_pkg->path, my_cfg->prjConfig->cxxtest_path));
|
||||
|
@ -28,6 +28,7 @@ typedef struct tagPrjConfig
|
||||
const char* bindir;
|
||||
const char* libdir;
|
||||
const char* nasmpath;
|
||||
const char* nasm_format;
|
||||
const char* cxxtest_path;
|
||||
} PrjConfig;
|
||||
|
||||
@ -117,6 +118,7 @@ const char* prj_get_objdir();
|
||||
const char* prj_get_prefix();
|
||||
const char* prj_get_name();
|
||||
const char* prj_get_nasmpath();
|
||||
const char* prj_get_nasm_format();
|
||||
const char* prj_get_cxxtestpath();
|
||||
int prj_get_numbuildoptions();
|
||||
int prj_get_numconfigs();
|
||||
|
@ -421,6 +421,7 @@ int script_export()
|
||||
config->bindir = export_value(tbl, obj, "bindir");
|
||||
config->libdir = export_value(tbl, obj, "libdir");
|
||||
config->nasmpath = export_value(tbl, obj, "nasmpath");
|
||||
config->nasm_format = export_value(tbl, obj, "nasmformat");
|
||||
config->cxxtest_path = export_value(tbl, obj, "cxxtestpath");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user