mirror of
https://github.com/golang/go
synced 2024-11-23 07:10:05 -07:00
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
This commit is contained in:
parent
ebf35167ee
commit
d795f07718
2
src/cmd/dist/a.h
vendored
2
src/cmd/dist/a.h
vendored
@ -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);
|
||||
|
4
src/cmd/dist/build.c
vendored
4
src/cmd/dist/build.c
vendored
@ -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");
|
||||
}
|
||||
|
2
src/cmd/dist/plan9.c
vendored
2
src/cmd/dist/plan9.c
vendored
@ -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.
|
||||
|
2
src/cmd/dist/unix.c
vendored
2
src/cmd/dist/unix.c
vendored
@ -780,7 +780,7 @@ __cpuid(int dst[4], int ax)
|
||||
}
|
||||
|
||||
bool
|
||||
cansse(void)
|
||||
cansse2(void)
|
||||
{
|
||||
int info[4];
|
||||
|
||||
|
2
src/cmd/dist/windows.c
vendored
2
src/cmd/dist/windows.c
vendored
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user