Files
shredos.x86_64/package
Anisse Astier ed36d20daa package/go: fix building host go toolchain when target isn't supported
The go toolchain can cross-compile by default. So most of the time,
building a toolchain that supports a target, allows us to also build go
binaries for the host. This is how support for host go packages was
added: we use the same toolchain that was initially built only for
target.

But we might want to build a go binary for the host, when compiling a
target for which go isn't supported. Then, building host-go will fail:
by default, we build go for a specific target, and give the toolchain
bootstrap scripts the cross compiler we'll use.

This change modifies this behaviour: we only assume the go toolchain is
cross-capable if we know the current target is supported. Otherwise this
is a simple host go tool. We don't need to set any of the options needed
for cross-compilation in that case.

Thus, only set all the target-specific go options under a condition that
the target arch is supported. The only option we still set is
HOST_GO_CGO_ENABLED, and we always set it to enabled.

It was also considered to create a separate package to build the
go-for-host compiler which would be used for host-go-packages, but that
would lead to a lot of duplication and is completely unnecessary.

Fixes:
http://autobuild.buildroot.net/results/98b9c7aaff2af4d19adfedac00b768d92530ce94
http://autobuild.buildroot.net/results/bed228995ce3778720f991df9b41345a7c724a46
http://autobuild.buildroot.net/results/3b3ea148165b96513ea511ee0d4adb334a6afac8

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-04-17 09:00:19 +02:00
..
2019-04-03 22:24:46 +02:00
2019-03-26 22:14:04 +01:00
2019-04-17 08:55:19 +02:00
2019-04-14 17:20:26 +02:00
2019-04-13 21:12:25 +02:00
2019-03-24 09:04:57 +01:00
2019-03-17 12:00:26 +01:00
2019-04-01 22:43:00 +02:00
2019-04-07 08:07:15 +02:00
2019-04-11 18:28:28 +02:00
2019-04-10 19:09:12 +02:00
2019-03-17 17:39:22 +01:00
2019-03-17 11:11:16 +01:00
2019-04-03 22:51:45 +02:00
2019-04-13 22:41:28 +02:00
2019-03-14 21:53:44 +01:00
2019-04-07 08:54:00 +02:00
2019-03-31 20:57:34 +02:00
2019-03-31 12:06:03 +02:00
2019-03-31 12:06:07 +02:00
2019-03-24 09:06:19 +01:00
2019-04-14 14:57:07 +02:00
2019-04-07 15:14:06 +02:00
2019-04-07 10:45:48 +02:00
2019-04-13 15:51:43 +02:00
2019-04-14 15:00:36 +02:00
2019-04-07 08:09:29 +02:00
2019-03-14 21:33:21 +01:00
2019-04-07 16:02:44 +02:00
2019-04-04 23:23:45 +02:00
2019-04-15 21:40:10 +02:00
2019-04-17 08:43:24 +02:00
2019-03-27 00:13:04 +01:00
2019-03-27 20:11:31 +01:00
2019-03-18 22:07:03 +01:00
2019-04-03 21:38:15 +02:00
2019-03-24 23:01:08 +01:00
2019-04-01 22:47:47 +02:00
2019-04-11 08:30:52 +02:00
2019-04-13 21:13:23 +02:00
2019-04-17 08:56:08 +02:00
2019-03-17 11:05:45 +01:00
2019-04-17 08:47:09 +02:00
2019-03-31 13:56:52 +02:00
2019-03-17 12:15:44 +01:00
2019-04-11 08:19:26 +02:00
2019-03-12 23:09:32 +01:00
2019-04-16 22:13:36 +02:00
2019-04-04 21:31:58 +02:00