Commit 1fddbab7 authored by Russ Cox's avatar Russ Cox

5l: fix softfloat nits

Need to load math.a so that sqrtGoC is available.
Also was missing prototype.

R=ken2
CC=golang-dev
https://golang.org/cl/4517148
parent 900c5fa9
......@@ -235,24 +235,34 @@ addlibpath(char *srcref, char *objref, char *file, char *pkg)
}
void
loadlib(void)
loadinternal(char *name)
{
char pname[1024];
int i, found;
found = 0;
for(i=0; i<nlibdir; i++) {
snprint(pname, sizeof pname, "%s/runtime.a", libdir[i]);
snprint(pname, sizeof pname, "%s/%s.a", libdir[i], name);
if(debug['v'])
Bprint(&bso, "searching for runtime.a in %s\n", pname);
Bprint(&bso, "searching for %s.a in %s\n", name, pname);
if(access(pname, AEXIST) >= 0) {
addlibpath("internal", "internal", pname, "runtime");
addlibpath("internal", "internal", pname, name);
found = 1;
break;
}
}
if(!found)
Bprint(&bso, "warning: unable to find runtime.a\n");
Bprint(&bso, "warning: unable to find %s.a\n", name);
}
void
loadlib(void)
{
int i;
loadinternal("runtime");
if(thechar == '5')
loadinternal("math");
for(i=0; i<libraryp; i++) {
if(debug['v'])
......
......@@ -15,6 +15,7 @@
#define FLAGS_V (1 << 28)
void runtime·abort(void);
void math·sqrtGoC(uint64, uint64*);
static uint32 trace = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment