package/go: rename BR2_PACKAGE_HOST_GO_{ARCH_SUPPORTS,CGO_LINKING_SUPPORTS}
authorAngelo Compagnucci <angelo@amarulasolutions.com>
Wed, 6 Feb 2019 13:23:57 +0000 (14:23 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 17 Mar 2019 16:20:53 +0000 (17:20 +0100)
The hidden Config.in option BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS name is
not very clear as to whether it says whether Go is available for the
target architecture or the host architecture.

Until now, this was fine since there was support for host Go
packages. But as we are about to introduce support for building host
Go packages, we need to clarify the meaning of
BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS. Since it says whether the target
architecture has support for Go or not, we rename it to
BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS.

And since BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS is tightly related,
we rename it to BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Tested-by: Adam Duskett <aduskett@gmail.com>
[Thomas: entirely rewrite commit log]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
docs/manual/adding-packages-golang.txt
package/docker-cli/Config.in
package/docker-containerd/Config.in
package/docker-engine/Config.in
package/docker-proxy/Config.in
package/flannel/Config.in
package/go/Config.in.host
package/mender/Config.in
package/runc/Config.in

index efcf6968676dfca2d4383be456d577bbb0497694..ae90eb7d4fe9f2faf454f57453220a513ec58697 100644 (file)
@@ -45,9 +45,11 @@ built.
 ==== +golang-package+ reference
 
 In their +Config.in+ file, packages using the +golang-package+
-infrastructure should depend on +BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS+
-and +BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS+ because Buildroot will
-automatically add a dependency on +host-go+ to such packages.
+infrastructure should depend on +BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS+
+because Buildroot will automatically add a dependency on +host-go+
+to such packages.
+If you need CGO support in your package, you must add a dependency on
++BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS+.
 
 The main macro of the Go package infrastructure is
 +golang-package+. It is similar to the +generic-package+ macro. Only
index 82c35c453d4c05cace206d230c400d20c0600c54..6f187c9d2224e86a760786715777faf17d145b22 100644 (file)
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_DOCKER_CLI
        bool "docker-cli"
-       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
-       depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
        depends on BR2_TOOLCHAIN_HAS_THREADS
        help
          Docker is a platform to build, ship,
@@ -20,6 +20,6 @@ config BR2_PACKAGE_DOCKER_CLI_STATIC
 endif
 
 comment "docker-cli needs a toolchain w/ threads"
-       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
-       depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
        depends on !BR2_TOOLCHAIN_HAS_THREADS
index 4a4db1cde1df4fa18fb5ed0254a8493fa39ce534..ffa2b208f2e56e67b49f9a6cf2b258619aaf24f9 100644 (file)
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_DOCKER_CONTAINERD
        bool "docker-containerd"
-       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
-       depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
        depends on BR2_TOOLCHAIN_HAS_THREADS
        depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 # runc
        depends on !BR2_TOOLCHAIN_USES_UCLIBC # runc
@@ -31,8 +31,8 @@ config BR2_PACKAGE_DOCKER_CONTAINERD_DRIVER_BTRFS
 endif
 
 comment "docker-containerd needs a glibc or musl toolchain w/ threads"
-       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
-       depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
        depends on BR2_USE_MMU
        depends on !BR2_TOOLCHAIN_HAS_THREADS || \
                !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 || BR2_TOOLCHAIN_USES_UCLIBC
index 08f30e434a402e138306074d13c702e6729c049c..bc36b05bed9f7d2b10c1d5d19701e55cb1154bd7 100644 (file)
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_DOCKER_ENGINE
        bool "docker-engine"
-       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
-       depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
        depends on BR2_TOOLCHAIN_HAS_THREADS
        depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 # docker-containerd -> runc
        depends on !BR2_TOOLCHAIN_USES_UCLIBC # docker-containerd -> runc
@@ -53,8 +53,8 @@ config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS
 endif
 
 comment "docker-engine needs a glibc or musl toolchain w/ threads, headers >= 3.11"
-       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
-       depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
        depends on !BR2_TOOLCHAIN_HAS_THREADS || \
                !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 || BR2_TOOLCHAIN_USES_UCLIBC
        depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
index 596e18a3f32d30e5e14a643f9cd455d8c8e0bfda..7e40536537589ab95521d62c22a286fe48d639a1 100644 (file)
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_DOCKER_PROXY
        bool "docker-proxy"
-       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
-       depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
        depends on BR2_TOOLCHAIN_HAS_THREADS
        help
          Libnetwork is a Container Network Model that provides a
@@ -14,6 +14,6 @@ config BR2_PACKAGE_DOCKER_PROXY
          https://github.com/docker/libnetwork
 
 comment "docker-proxy needs a toolchain w/ threads"
-       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
-       depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
        depends on !BR2_TOOLCHAIN_HAS_THREADS
index 134111b1c081fa55d2f3b22e04e4b564b5bcc504..326361080f9de14b88e02b2253cfe729b02d494c 100644 (file)
@@ -1,12 +1,12 @@
 comment "flannel needs a toolchain w/ threads"
-       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS && \
-               BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
        depends on !BR2_TOOLCHAIN_HAS_THREADS
 
 config BR2_PACKAGE_FLANNEL
        bool "flannel"
-       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
-       depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
        depends on BR2_TOOLCHAIN_HAS_THREADS
        help
          Flannel is a virtual network that gives a subnet to each
index f619ca0073eff0bcf88cdf17ed582242d4c9ad69..893a44870930e0d57ebcc3141f4468facb575134 100644 (file)
@@ -1,4 +1,5 @@
-config BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+# Target go packages should depend on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+config BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
        bool
        default y
        depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_20006
@@ -10,10 +11,10 @@ config BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
        # MIPS R6 support in Go has not yet been developed.
        depends on !BR2_MIPS_CPU_MIPS64R6
 
-config BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+config BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
        bool
        default y
-       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
        # Go doesn't support CGO linking on MIPS64x platforms
        # See: https://github.com/karalabe/xgo/issues/46
        depends on !BR2_mips64 && !BR2_mips64el
index aeb0b2694f96d76e92771f6196d875ddc87dfded..5ab2304e498a2ce268dff1bfb96bdb80b1e270d0 100644 (file)
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_MENDER
        bool "mender"
-       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
-       depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
        depends on BR2_TOOLCHAIN_HAS_THREADS
        select BR2_PACKAGE_UBOOT_TOOLS # runtime
        select BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV # runtime
@@ -14,6 +14,6 @@ config BR2_PACKAGE_MENDER
          https://github.com/mendersoftware/mender
 
 comment "mender needs a toolchain w/ threads"
-       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
-       depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
        depends on !BR2_TOOLCHAIN_HAS_THREADS
index cfd26e981331788bc9bff6bfde8e695771b2cdc8..8939193048ef6fcfc20b70ccd87f0b312adc76bd 100644 (file)
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_RUNC
        bool "runc"
-       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
-       depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
        depends on BR2_TOOLCHAIN_HAS_THREADS
        depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 # O_TMPFILE
        depends on !BR2_TOOLCHAIN_USES_UCLIBC # no fexecve
@@ -13,8 +13,8 @@ config BR2_PACKAGE_RUNC
          https://github.com/opencontainers/runc
 
 comment "runc needs a glibc or musl toolchain w/ threads, headers >= 3.11"
-       depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS && \
-               BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS && \
+               BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
        depends on !BR2_TOOLCHAIN_HAS_THREADS || \
                !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 || BR2_TOOLCHAN_USES_UCLIBC
        depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM