golang-cross: add ccache support
PATCH 1/1 golang-cross: add ccache support
From a6cb7ce2d69d59e10d273a1a1011d6c703d3ee13 Mon Sep 17 00:00:00 2001
From: Amy Fong <[email protected]>
Date: Fri, 19 Jun 2015 11:47:57 -0400
Subject: [PATCH] golang-cross: add ccache support
golang doesn't work with ccache. In the current state, a lot of parsing happens where it'll grab the first string in CC or LD and uses that for its builds. When ccache is enabled, it results in trying to do builds with just ccache.
The brokeness is seen when building with apps that uses cgo, like docker. To enable ccache to work, some string comparisons and changes to parsing had to be made.
Signed-off-by Amy Fong <[email protected]>
--- recipes-containers/docker/docker_git.bb | 5 -- recipes-devtools/go/files/ccache.patch | 147 ++++++++++++++++++++++++++++++++ recipes-devtools/go/golang-cross.inc | 1 + recipes-devtools/go/golang-cross_1.3.bb | 3 - 4 files changed, 148 insertions(+), 8 deletions(-) create mode 100644 recipes-devtools/go/files/ccache.patch
recipes-containers/docker/docker_git.bb +0 -5
@@ -27,11 +27,6 @@ SRC_URI = "\ file://disable_sha1sum_startup.patch \ " -# The golang-cross embeds a compiler invocation for the pre-parser -# that is incompatible with the $CC definition used by the compiler -# templates so disable CCACHE -CCACHE = "" - # Apache-2.0 for docker LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=1cc0497778922bfd6cb48721deb80dc7"
recipes-devtools/go/files/ccache.patch new file +147 -0
147 lines not on this page · raw message
recipes-devtools/go/golang-cross.inc +1 -0
@@ -6,6 +6,7 @@ PROVIDES = "virtual/${TARGET_PREFIX}golang" SRC_URI = "\ http://golang.org/dl/go${PV}.src.tar.gz \ file://bsd_svid_source.patch \ + file://ccache.patch \ " S="${WORKDIR}/go"
recipes-devtools/go/golang-cross_1.3.bb +0 -3
@@ -1,7 +1,4 @@ inherit cross -# CCACHE does not work properly with GO -CCACHE = "" - require golang-cross.inc require golang-${PV}.inc
Signature · 1 line
2.1.4