summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2015-03-06 00:03:28 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-17 22:39:29 +0100
commitb6cc30adf406135ec37f869d9ab07c3c0ff37efa (patch)
treef4bdfbc3c060e46bb2fe87ff00385a3506d353c3
parentfeaf9a98dffa73ed5b87453a9449fb9ef30efbea (diff)
downloadpoky-b6cc30adf406135ec37f869d9ab07c3c0ff37efa.tar.gz
serf: fix 'ccache' builds
'scons' cleans the environment which breaks ccache builds because CCACHEDIR can point to an unexpected location: | ccache arm-linux-gnueabi-gcc ... context.c | ccache: failed to create .../serf/1.3.8-r0/.home/.ccache (No such file or directory) Issue is described in http://www.scons.org/wiki/ImportingEnvironmentSettings and because 'bitbake' cleans environment we can pass it completely instead of trying to enumerate needed env. With the 'env.patch' the FULLCC variable is not needed anymore (which would break when CC is 'ccache arm-...-gcc' and host ccache is used) because the correct $PATH is available during scons build: | sh: .../sysroots/x86_64-oe-linux/usr/bin/arm-linux-gnueabi/ccache: No such file or directory | scons: *** [context.o] Error 127 (From OE-Core rev: 24c35c63b85621b263e7a211dc39b2257154cd28) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/serf/serf/env.patch28
-rw-r--r--meta/recipes-support/serf/serf_1.3.7.bb8
2 files changed, 31 insertions, 5 deletions
diff --git a/meta/recipes-support/serf/serf/env.patch b/meta/recipes-support/serf/serf/env.patch
new file mode 100644
index 0000000000..9d073e9abf
--- /dev/null
+++ b/meta/recipes-support/serf/serf/env.patch
@@ -0,0 +1,28 @@
1'scons' cleans the environment which breaks ccache builds because
2CCACHEDIR can point to an unexpected location:
3
4| ccache arm-linux-gnueabi-gcc ... context.c
5| ccache: failed to create .../serf/1.3.6-r0/.home/.ccache (No such file or directory)
6
7Issue is described in
8
9 http://www.scons.org/wiki/ImportingEnvironmentSettings
10
11and because 'bitbake' cleans environment we can pass it completely
12instead of trying to enumerate needed env.
13
14Upstream-Status: Inappropriate
15
16
17Index: serf-1.3.6/SConstruct
18===================================================================
19--- serf-1.3.6.orig/SConstruct
20+++ serf-1.3.6/SConstruct
21@@ -149,6 +149,7 @@ if sys.platform == 'win32':
22 env = Environment(variables=opts,
23 tools=('default', 'textfile',),
24 CPPPATH=['.', ],
25+ ENV = os.environ,
26 )
27
28 env.Append(BUILDERS = {
diff --git a/meta/recipes-support/serf/serf_1.3.7.bb b/meta/recipes-support/serf/serf_1.3.7.bb
index 5230ef7387..b87a04ab69 100644
--- a/meta/recipes-support/serf/serf_1.3.7.bb
+++ b/meta/recipes-support/serf/serf_1.3.7.bb
@@ -1,6 +1,7 @@
1 1
2SRC_URI = "http://serf.googlecode.com/svn/src_releases/serf-1.3.7.tar.bz2 \ 2SRC_URI = "http://serf.googlecode.com/svn/src_releases/serf-1.3.7.tar.bz2 \
3 file://norpath.patch" 3 file://norpath.patch \
4 file://env.patch"
4SRC_URI[md5sum] = "0a6fa745df4517dd8f79c75c538919bc" 5SRC_URI[md5sum] = "0a6fa745df4517dd8f79c75c538919bc"
5SRC_URI[sha256sum] = "ecccb74e665e6ea7539271e126a21d0f7eeddfeaa8ce090adb3aec6682f9f0ae" 6SRC_URI[sha256sum] = "ecccb74e665e6ea7539271e126a21d0f7eeddfeaa8ce090adb3aec6682f9f0ae"
6 7
@@ -9,12 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
9 10
10DEPENDS = "python-scons-native openssl apr apr-util util-linux expat" 11DEPENDS = "python-scons-native openssl apr apr-util util-linux expat"
11 12
12FULLCC = "${STAGING_BINDIR_TOOLCHAIN}/${CC}"
13FULLCC_class-native = "${CC}"
14
15do_compile() { 13do_compile() {
16 ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} \ 14 ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} \
17 CC="${FULLCC}" \ 15 CC="${CC}" \
18 APR=`which apr-1-config` APU=`which apu-1-config` \ 16 APR=`which apr-1-config` APU=`which apu-1-config` \
19 CFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \ 17 CFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \
20 OPENSSL="${STAGING_EXECPREFIXDIR}" 18 OPENSSL="${STAGING_EXECPREFIXDIR}"