cmd/dist: recognize darwin/arm as (host) goos/goarches. also hard
code GOARM=7 for darwin/arm.
make.bash: don't pass -mmacosx-version-min=10.6 when building for
darwin/arm.
Change-Id: If0ecd84a5179cd9bb61b801ac1899adc45f12f75
Reviewed-on: https://go-review.googlesource.com/2126
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
cmd/gc contains symbol references into the back end dirs like 6g.
It also contains a few files that include the back end header files and
are compiled separately for each back end, despite being in cmd/gc.
cmd/gc also defines main, which makes at least one reverse symbol
reference unavoidable. (Otherwise you can't get into back-end code.)
This was all expedient, but it's too tightly coupled, especially for a
program written Go.
Make cmd/gc into a true library, letting the back end define main and
call into cmd/gc after making the necessary references available.
cmd/gc being a real library will ease the transition to Go.
Change-Id: I4fb9a0e2b11a32f1d024b3c56fc3bd9ee458842c
Reviewed-on: https://go-review.googlesource.com/3277
Reviewed-by: Rob Pike <r@golang.org>
This CL adds the real cmd/internal/obj packages.
Collectively they correspond to the liblink library.
The conversion was done using rsc.io/c2go's run script
at rsc.io/c2go repo version 706fac7.
This is not the final conversion, just the first working draft.
There will be more updates, but this works well enough
to use with go tool objwriter and pass all.bash.
Change-Id: I9359e835425f995a392bb2fcdbebf29511477bed
Reviewed-on: https://go-review.googlesource.com/3046
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Bootstrap the Go parts of the Go toolchain using Go 1.4,
as described in https://golang.org/s/go15bootstrap.
The first Go part of the Go toolchain will be cmd/objwriter,
but for now that's just an empty program to test that this
new code works.
Once the build dashboard is okay with this change,
we'll make objwriter a real program depended upon by the build.
Change-Id: Iad3dce675571cbdb5ab6298fe6f98f53ede47d5c
Reviewed-on: https://go-review.googlesource.com/3044
Reviewed-by: Ian Lance Taylor <iant@golang.org>
cmd/internal/obj is the name for the Go translation of the C liblink library.
cmd/objwriter is the name of a Go binary that runs liblink's writeobj function.
When the bulk of liblink has been converted to Go but the assemblers and
compilers are still written in C, the C writeobj will shell out to the Go objwriter
to actually write the object file. This lets us manage the transition in smaller
pieces.
The objwriter tool is purely transitional.
It will not ship in any release (enforced in cmd/dist).
Adding a dummy program and some dummy imports here so that we
can work on the bootstrap mechanisms that will be necessary to build it.
Once the build process handles objwriter properly,
we'll work on the actual implementation.
Change-Id: I675c818b3a513c26bb91c6dba564c6ace3b7fcd4
Reviewed-on: https://go-review.googlesource.com/3043
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Needed for invoking a Go subprocess in the C code.
The Go tools live in $GOROOT/pkg/tool/$GOHOSTARCH_$GOHOSTOS.
Change-Id: I961b6b8a07de912de174b758b2fb87d77080546d
Reviewed-on: https://go-review.googlesource.com/3042
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This CL introduces the bootstrap requirement that in order to
build the current release (or development version) of Go, you
need an older Go release (1.4 or newer) already installed.
This requirement is the whole point of this CL.
To enforce the requirement, convert cmd/dist from C to Go.
With this bootstrapping out of the way, we can move on to
replacing other, larger C programs like the Go compiler,
the assemblers, and the linker.
See golang.org/s/go15bootstrap for details.
Change-Id: I53fd08ddacf3df9fae94fe2c986dba427ee4a21d
Reviewed-on: https://go-review.googlesource.com/2470
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
This CL makes the next one have nice cross-file diffs.
Change-Id: I9ce897dc505dea9923be4e823bae31f4f7fa2ee2
Reviewed-on: https://go-review.googlesource.com/2471
Reviewed-by: Ian Lance Taylor <iant@golang.org>