Commit d795f077 authored by Russ Cox's avatar Russ Cox

build: change GO386=sse to GO386=sse2

sse2 is a more precise description of the requirement,
and it matches what people will see in, for example
        grep sse2 /proc/cpuinfo # linux
        sysctl hw.optional.sse2 # os x

R=golang-dev, dsymonds, iant
CC=golang-dev
https://golang.org/cl/7057050
parent ebf35167
......@@ -123,7 +123,7 @@ void runv(Buf *b, char *dir, int mode, Vec *argv);
void bgrunv(char *dir, int mode, Vec *argv);
void bgwait(void);
bool streq(char*, char*);
bool cansse(void);
bool cansse2(void);
void writefile(Buf*, char*, int);
void xatexit(void (*f)(void));
void xexit(int);
......
......@@ -105,8 +105,8 @@ init(void)
xgetenv(&b, "GO386");
if(b.len == 0) {
if(cansse())
bwritestr(&b, "sse");
if(cansse2())
bwritestr(&b, "sse2");
else
bwritestr(&b, "387");
}
......
......@@ -759,7 +759,7 @@ xtryexecfunc(void (*f)(void))
}
bool
cansse(void)
cansse2(void)
{
// if we had access to cpuid, could answer this question
// less conservatively.
......
......@@ -780,7 +780,7 @@ __cpuid(int dst[4], int ax)
}
bool
cansse(void)
cansse2(void)
{
int info[4];
......
......@@ -987,7 +987,7 @@ cpuid(int dst[4], int ax)
}
bool
cansse(void)
cansse2(void)
{
int info[4];
......
......@@ -217,7 +217,6 @@ main(int argc, char *argv[])
goroot = getgoroot();
goos = getgoos();
goarch = thestring;
use_sse = strcmp(getgo386(), "sse") == 0;
setexp();
......@@ -261,6 +260,9 @@ main(int argc, char *argv[])
flagparse(&argc, &argv, usage);
if(argc < 1)
usage();
if(flag_race) {
racepkg = mkpkg(strlit("runtime/race"));
racepkg->name = "race";
......@@ -273,8 +275,15 @@ main(int argc, char *argv[])
if(debug['l'] <= 1)
debug['l'] = 1 - debug['l'];
if(argc < 1)
usage();
if(thechar == '8') {
p = getgo386();
if(strcmp(p, "387") == 0)
use_sse = 0;
else if(strcmp(p, "sse2") == 0)
use_sse = 1;
else
sysfatal("unsupported setting GO386=%s", p);
}
pathname = mal(1000);
if(getwd(pathname, 999) == 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