package/go: Set file timestamp
authorGeoff Levand <geoff@infradead.org>
Thu, 26 May 2016 18:21:33 +0000 (18:21 +0000)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 26 May 2016 19:05:52 +0000 (21:05 +0200)
Set all file timestamps to prevent the go compiler from rebuilding any
built in packages when programs are built.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/go/go.mk

index 7a8ebf4a6d3d3394872f74904540aadc49664edc..98615aaeaf5e9ac113a60d4d84a5c1097eb95aa8 100644 (file)
@@ -107,6 +107,10 @@ define HOST_GO_INSTALL_CMDS
        # There is a known issue which requires the go sources to be installed
        # https://golang.org/issue/2775
        cp -a $(@D)/src $(HOST_GO_ROOT)/
+
+       # Set all file timestamps to prevent the go compiler from rebuilding any
+       # built in packages when programs are built.
+       find $(HOST_GO_ROOT) -type f -exec touch -r $(HOST_GO_TMP)/bin/go {} \;
 endef
 
 $(eval $(host-generic-package))