serf: fix 'ccache' builds
PATCH 1/1 serf: fix 'ccache' builds
From: Enrico Scholz <[email protected]>
'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
--- meta/recipes-support/serf/serf/env.patch | 28 ++++++++++++++++++++++++++++ meta/recipes-support/serf/serf_1.3.7.bb | 8 +++----- 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-support/serf/serf/env.patch
meta/recipes-support/serf/serf/env.patch new file +28 -0
@@ -0,0 +1,28 @@ +'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.6-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. + +Upstream-Status: Inappropriate + + +Index: serf-1.3.6/SConstruct +=================================================================== +--- serf-1.3.6.orig/SConstruct ++++ serf-1.3.6/SConstruct +@@ -149,6 +149,7 @@ if sys.platform == 'win32': + env = Environment(variables=opts, + tools=('default', 'textfile',), + CPPPATH=['.', ], ++ ENV = os.environ, + ) + + env.Append(BUILDERS = {
meta/recipes-support/serf/serf_1.3.7.bb +3 -5
@@ -1,6 +1,7 @@ SRC_URI = "http://serf.googlecode.com/svn/src_releases/serf-1.3.7.tar.bz2 \ - file://norpath.patch" + file://norpath.patch \ + file://env.patch" SRC_URI[md5sum] = "0a6fa745df4517dd8f79c75c538919bc" SRC_URI[sha256sum] = "ecccb74e665e6ea7539271e126a21d0f7eeddfeaa8ce090adb3aec6682f9f0ae"
@@ -9,12 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" DEPENDS = "python-scons-native openssl apr apr-util util-linux expat" -FULLCC = "${STAGING_BINDIR_TOOLCHAIN}/${CC}" -FULLCC_class-native = "${CC}" - do_compile() { ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} \ - CC="${FULLCC}" \ + CC="${CC}" \ APR=`which apr-1-config` APU=`which apu-1-config` \ CFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \ OPENSSL="${STAGING_EXECPREFIXDIR}"
Signature · 1 line
2.3.1
Quoted 7 lines · Martin Jansa
From: Enrico Scholz <[email protected]>
'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)
This also fixes the build with external toolchain which doesn't exist in STAGING_BINDIR_TOOLCHAIN, so please consider to merge this in dizzy.
Quoted 86 lines
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
Signed-off-by Enrico Scholz <[email protected]>Signed-off-by Ross Burton <[email protected]>--- meta/recipes-support/serf/serf/env.patch | 28 ++++++++++++++++++++++++++++ meta/recipes-support/serf/serf_1.3.7.bb | 8 +++----- 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-support/serf/serf/env.patchmeta/recipes-support/serf/serf/env.patch new file +28
-0@@ -0,0 +1,28 @@ +'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.6-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. + +Upstream-Status: Inappropriate + + +Index: serf-1.3.6/SConstruct +=================================================================== +--- serf-1.3.6.orig/SConstruct ++++ serf-1.3.6/SConstruct +@@ -149,6 +149,7 @@ if sys.platform == 'win32': + env = Environment(variables=opts, + tools=('default', 'textfile',), + CPPPATH=['.', ], ++ ENV = os.environ, + ) + + env.Append(BUILDERS = {meta/recipes-support/serf/serf_1.3.7.bb +3
-5@@ -1,6 +1,7 @@ SRC_URI = "http://serf.googlecode.com/svn/src_releases/serf-1.3.7.tar.bz2 \ - file://norpath.patch" + file://norpath.patch \ + file://env.patch" SRC_URI[md5sum] = "0a6fa745df4517dd8f79c75c538919bc" SRC_URI[sha256sum] = "ecccb74e665e6ea7539271e126a21d0f7eeddfeaa8ce090adb3aec6682f9f0ae"@@ -9,12 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" DEPENDS = "python-scons-native openssl apr apr-util util-linux expat" -FULLCC = "${STAGING_BINDIR_TOOLCHAIN}/${CC}" -FULLCC_class-native = "${CC}" - do_compile() { ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} \ - CC="${FULLCC}" \ + CC="${CC}" \ APR=`which apr-1-config` APU=`which apu-1-config` \ CFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \ OPENSSL="${STAGING_EXECPREFIXDIR}"Signature · 1 line
2.3.1
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
working on dizzy merged this weekend.
- armin
Quoted 101 lines · Martin Jansa
Quoted 7 lines · Martin Jansa
From: Enrico Scholz <[email protected]>
'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)This also fixes the build with external toolchain which doesn't exist in
STAGING_BINDIR_TOOLCHAIN, so please consider to merge this in dizzy.Quoted 86 lines
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
Signed-off-by Enrico Scholz <[email protected]>Signed-off-by Ross Burton <[email protected]>--- meta/recipes-support/serf/serf/env.patch | 28 ++++++++++++++++++++++++++++ meta/recipes-support/serf/serf_1.3.7.bb | 8 +++----- 2 files changed, 31 insertions(+), 5 deletions(-)create mode 100644
meta/recipes-support/serf/serf/env.patchmeta/recipes-support/serf/serf/env.patch new file +28
-0@@ -0,0 +1,28 @@ +'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.6-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. + +Upstream-Status: Inappropriate + + +Index: serf-1.3.6/SConstruct +=================================================================== +--- serf-1.3.6.orig/SConstruct ++++ serf-1.3.6/SConstruct +@@ -149,6 +149,7 @@ if sys.platform == 'win32': + env = Environment(variables=opts, + tools=('default', 'textfile',), + CPPPATH=['.', ], ++ ENV = os.environ, + ) + + env.Append(BUILDERS = {meta/recipes-support/serf/serf_1.3.7.bb +3
-6@@ -1,6 +1,7 @@ SRC_URI = "http://serf.googlecode.com/svn/src_releases/serf-1.3.7.tar.bz2 \ - file://norpath.patch" + file://norpath.patch \ + file://env.patch" SRC_URI[md5sum] = "0a6fa745df4517dd8f79c75c538919bc" SRC_URI[sha256sum] = "ecccb74e665e6ea7539271e126a21d0f7eeddfeaa8ce090adb3aec6682f9f0ae"@@ -9,12 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" DEPENDS = "python-scons-native openssl apr apr-util util-linux expat" -FULLCC = "${STAGING_BINDIR_TOOLCHAIN}/${CC}" -FULLCC_class-native = "${CC}" - do_compile() { ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} \ - CC="${FULLCC}" \ + CC="${CC}" \ APR=`which apr-1-config` APU=`which apu-1-config` \ CFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \ OPENSSL="${STAGING_EXECPREFIXDIR}" --2.3.1