New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: deprecate GOARM in favor of GOARCH or fix GOARM caching #9737
Comments
If installation is the only problem you are trying to solve, I recommend the -installsuffix flag. If we support additional GOARCH values for arm, we would need special rules to set the "arm" build tag when GOARCH is "arm5" or whatever. That is possible; I'm just noting it for the record. |
Prior to android support landing in the tree splitting arm into three However, when android was added an exception was included in cmd/go to It may be acceptable (I'm not the decision maker) to define On Sat, Jan 31, 2015 at 12:35 AM, Ian Lance Taylor <notifications@github.com
|
@ianlancetaylor uhm... arm8 will come out in Go. It's avaliable in both 32-bit and 64-bit flavors. Do we still keep BTW, |
@davecheney that is: we have a common runtime for building the arm5/6/7? that makes sense, but what will we do with 64-bits arm8? and with 32-bits? |
On Sat, Jan 31, 2015 at 1:47 AM, Vasily Korytov notifications@github.com
|
frankly, I like the idea of keeping a common toolchain for (all possible 32-bit) ARM flavors. but I also like the idea of separation of |
On Sat, Jan 31, 2015 at 1:51 AM, Vasily Korytov notifications@github.com
To your second question, no 64bit arm is a new compiler, 7g, just as 64bit
|
thanks a lot for explaining this, @davecheney |
for details about the -installsuffix workaround, see my comment in #9672 (Actually, I think this is a dup of #9672.) |
Uhm, the > rm -rf $GOPATH/bin/linux_arm/
> ls ~/Go/bin/linux_arm/
ls: cannot access /Users/.../Go/bin/linux_arm/: No such file or directory
> env GOOS=linux GOARCH=arm GOARM=7 go install -installsuffix arm7
> ls $GOPATH/bin/*arm* -d
/Users/.../Go/bin/linux_arm/
> go version
go version go1.3.3 darwin/amd64 Am I doing it wrong? My binary in that directory is not suffixed either, so I wonder, how it should work. |
On Jan 30, 2015 3:22 PM, "Vasily Korytov" notifications@github.com wrote:
GOOS=linux GOARCH=arm GOARM=7 go install -installsuffix arm7 -a -v std
|
@minux
The compiled binary is |
That command will only install packages with the given suffix, all binaries |
That does not work for me either:
How is it supposed to work? It seems like it's not working for me in giving suffix nor to binaries, nor to directories. What can I discover more? |
-installsuffix will only add suffixes to packages under pkg, for example, I'm not sure if it should also add the suffix to the bin directory. |
I think -installsuffix ought to apply to the bin directory as well. I can't think of a reason that it should not. However, doing that might break the race build. I'm not sure. |
Bumping this to Go 1.9 to decide, since we need to figure out other GOARM and ARM5 stuff this cycle. |
This just almost bit me again. Fortunately I remembered there might be a bug here and caught myself before trusting |
We should just put GOARM into the build ID for any compiled package, which will trigger appropriate rebuilds. We shouldn't deprecate GOARM. Same for GO386, GOMIPS(?), and any other env vars that the compiler or linker looks at. |
CL https://golang.org/cl/43855 mentions this issue. |
At the moment we have two variables affecting the target architecture: GOARCH and GOARM (for GOARCH=arm). That's very inconvenient, probably we should use
arm5
,arm6
andarm7
GOARCH
values, deprecating theGOARM
.Let me illustrate that. I'm a developer, that wants to cross-compile application for Linux/armv5 and Linux/armv7. I do:
GOOS=linux GOARCH=arm GOARM=5 go install
. I get the results in$GOROOT/bin/linux_arm
. But if I want to build the armv7 binary, it goes to the same path as the v5 one, overwriting it (and that's rather frustrating).But if we had a single
GOARCH
, that incorporates the arm version, we would get:GOOS=linux GOARCH=arm5 go install => $GOROOT/bin/linux_arm5
GOOS=linux GOARCH=arm7 go install => $GOROOT/bin/linux_arm7
Personally I find it a much more logical and useful solution. Or I'm overlooking something?
The text was updated successfully, but these errors were encountered: