Fix (or at least, work around) an issue with library order. Make sure the Basic
error symbols are actually defined.
This commit is contained in:
parent
f52cb45e49
commit
e9fe1d70a6
|
@ -729,9 +729,10 @@ definerule("simplerule",
|
|||
definerule("installable",
|
||||
{
|
||||
map = { type="targets", default={} },
|
||||
deps = { type="targets", default={} },
|
||||
},
|
||||
function (e)
|
||||
local deps = {}
|
||||
local deps = filenamesof(e.deps)
|
||||
local commands = {}
|
||||
local srcs = {}
|
||||
local outs = {}
|
||||
|
|
|
@ -226,6 +226,7 @@ definerule("cprogram",
|
|||
},
|
||||
function (e)
|
||||
local libs = matching(filenamesof(e.deps), "%.a$")
|
||||
local srcs = {}
|
||||
if (#e.srcs > 0) then
|
||||
for _, f in pairs(
|
||||
matching(
|
||||
|
@ -240,7 +241,7 @@ definerule("cprogram",
|
|||
"%.a$"
|
||||
)
|
||||
) do
|
||||
libs[#libs+1] = f
|
||||
srcs[#srcs+1] = f
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -248,7 +249,7 @@ definerule("cprogram",
|
|||
name = e.name,
|
||||
cwd = e.cwd,
|
||||
deps = e.deps,
|
||||
ins = libs,
|
||||
ins = { srcs, libs },
|
||||
outleaves = { e.name },
|
||||
commands = e.commands,
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int _errsym;
|
||||
int _erlsym;
|
||||
|
||||
/* error takes an error value in the range of 0-255 */
|
||||
/* and generates a trap */
|
||||
|
||||
|
@ -52,9 +55,6 @@ char *errortable[255]={
|
|||
error(index)
|
||||
int index;
|
||||
{
|
||||
extern int _errsym;
|
||||
extern int _erlsym;
|
||||
|
||||
_setline();
|
||||
if( index<0 || index >40 )
|
||||
printf("LINE %d:ERROR %d: Unprintable error\n",_erlsym,index);
|
||||
|
|
Loading…
Reference in a new issue