* OE scons cross-compile patch
[not found] <Pine.LNX.4.64.1202111600300.3065@www.vctlabs.com>
@ 2012-02-11 23:24 ` Tom King
2012-02-11 23:48 ` Koen Kooi
0 siblings, 1 reply; 2+ messages in thread
From: Tom King @ 2012-02-11 23:24 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 2641 bytes --]
---------- Forwarded message ----------
From: S. Lockwood-Childs <sjl@vctlabs.com>
Date: Sat, Feb 11, 2012 at 4:03 PM
Subject: OE scons cross-compile patch
To: ka6sox@gmail.com
commit 9f66f474614696154d50156ada5f4c**1629b1b28c
Author: S Lockwood-Childs <sjl@vctlabs.com>
Date: Sat Feb 11 15:07:17 2012 -0800
cross-compile support for SCons
scons build system searches paths for hard-coded tool names like "gcc",
so this patch teaches it to check first for a tool with cross-compile
prefix
if the CROSS_COMPILE variable has been set. If not found, it falls back
to searching for the un-prefixed tool name.
For example, if CROSS_COMPILE=arm-angstrom-**linux-gnueabi-
SCons.Evironment.Detect('gcc') should find arm-angstrom-linux-gnueabi-gcc
SCons.Evironment.Detect('zip') should find plain zip
diff --git a/meta/recipes-devtools/**python/python-scons-native/**scons-cross-toolchain.patch
b/meta/recipes-devtools/**python/python-scons-native/**
scons-cross-toolchain.patch
new file mode 100644
index 0000000..041279e
--- /dev/null
+++ b/meta/recipes-devtools/**python/python-scons-native/**
scons-cross-toolchain.patch
@@ -0,0 +1,17 @@
+--- scons-2.1.0/engine/SCons/**Environment.py.orig 2012-02-10
16:59:10.000000000 -0800
++++ scons-2.1.0/engine/SCons/**Environment.py 2012-02-11
13:29:15.000000000 -0800
+@@ -1483,6 +1483,14 @@
+ if not SCons.Util.is_List(progs):
+ progs = [ progs ]
+ for prog in progs:
++ # prefer cross version of program, if it exists
++ if 'CROSS_COMPILE' in self._dict:
++ cross_prog = self['CROSS_COMPILE'] + prog
++ #print "Looking for %s" % cross_prog
++ path = self.WhereIs(cross_prog)
++ if path: return cross_prog
++
++ #print "Looking for %s" % prog
+ path = self.WhereIs(prog)
+ if path: return prog
+ return None
diff --git a/meta/recipes-devtools/**python/python-scons-native_2.**1.0.bb<http://python-scons-native_2.1.0.bb>b/meta/recipes-devtools/
**python/python-scons-native_2.**1.0.bb<http://python-scons-native_2.1.0.bb>
index ff94cf6..c653237 100644
--- a/meta/recipes-devtools/**python/python-scons-native_2.**1.0.bb<http://python-scons-native_2.1.0.bb>
+++ b/meta/recipes-devtools/**python/python-scons-native_2.**1.0.bb<http://python-scons-native_2.1.0.bb>
@@ -2,4 +2,6 @@ require python-scons_${PV}.bb
inherit native
DEPENDS = "python-native"
RDEPENDS_${PN} = ""
-PR = "r1"
+PR = "r2"
+
+SRC_URI += "file://scons-cross-toolchain.**patch"
[-- Attachment #2: oe-scons-cross-compile.patch --]
[-- Type: TEXT/x-diff, Size: 2267 bytes --]
commit 9f66f474614696154d50156ada5f4c1629b1b28c
Author: S Lockwood-Childs <sjl@vctlabs.com>
Date: Sat Feb 11 15:07:17 2012 -0800
cross-compile support for SCons
scons build system searches paths for hard-coded tool names like "gcc",
so this patch teaches it to check first for a tool with cross-compile prefix
if the CROSS_COMPILE variable has been set. If not found, it falls back
to searching for the un-prefixed tool name.
For example, if CROSS_COMPILE=arm-angstrom-linux-gnueabi-
SCons.Evironment.Detect('gcc') should find arm-angstrom-linux-gnueabi-gcc
SCons.Evironment.Detect('zip') should find plain zip
diff --git a/meta/recipes-devtools/python/python-scons-native/scons-cross-toolchain.patch b/meta/recipes-devtools/python/python-scons-native/scons-cross-toolchain.patch
new file mode 100644
index 0000000..041279e
--- /dev/null
+++ b/meta/recipes-devtools/python/python-scons-native/scons-cross-toolchain.patch
@@ -0,0 +1,17 @@
+--- scons-2.1.0/engine/SCons/Environment.py.orig 2012-02-10 16:59:10.000000000 -0800
++++ scons-2.1.0/engine/SCons/Environment.py 2012-02-11 13:29:15.000000000 -0800
+@@ -1483,6 +1483,14 @@
+ if not SCons.Util.is_List(progs):
+ progs = [ progs ]
+ for prog in progs:
++ # prefer cross version of program, if it exists
++ if 'CROSS_COMPILE' in self._dict:
++ cross_prog = self['CROSS_COMPILE'] + prog
++ #print "Looking for %s" % cross_prog
++ path = self.WhereIs(cross_prog)
++ if path: return cross_prog
++
++ #print "Looking for %s" % prog
+ path = self.WhereIs(prog)
+ if path: return prog
+ return None
diff --git a/meta/recipes-devtools/python/python-scons-native_2.1.0.bb b/meta/recipes-devtools/python/python-scons-native_2.1.0.bb
index ff94cf6..c653237 100644
--- a/meta/recipes-devtools/python/python-scons-native_2.1.0.bb
+++ b/meta/recipes-devtools/python/python-scons-native_2.1.0.bb
@@ -2,4 +2,6 @@ require python-scons_${PV}.bb
inherit native
DEPENDS = "python-native"
RDEPENDS_${PN} = ""
-PR = "r1"
+PR = "r2"
+
+SRC_URI += "file://scons-cross-toolchain.patch"
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: OE scons cross-compile patch
2012-02-11 23:24 ` OE scons cross-compile patch Tom King
@ 2012-02-11 23:48 ` Koen Kooi
0 siblings, 0 replies; 2+ messages in thread
From: Koen Kooi @ 2012-02-11 23:48 UTC (permalink / raw)
To: openembedded-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Shouldn't these go to the oe-core list?
Op 12-02-12 00:24, Tom King schreef:
> ---------- Forwarded message ---------- From: S. Lockwood-Childs
> <sjl@vctlabs.com> Date: Sat, Feb 11, 2012 at 4:03 PM Subject: OE scons
> cross-compile patch To: ka6sox@gmail.com
>
>
> commit 9f66f474614696154d50156ada5f4c**1629b1b28c Author: S
> Lockwood-Childs <sjl@vctlabs.com> Date: Sat Feb 11 15:07:17 2012 -0800
>
> cross-compile support for SCons
>
> scons build system searches paths for hard-coded tool names like "gcc",
> so this patch teaches it to check first for a tool with cross-compile
> prefix if the CROSS_COMPILE variable has been set. If not found, it falls
> back to searching for the un-prefixed tool name.
>
> For example, if CROSS_COMPILE=arm-angstrom-**linux-gnueabi-
> SCons.Evironment.Detect('gcc') should find
> arm-angstrom-linux-gnueabi-gcc SCons.Evironment.Detect('zip') should find
> plain zip
>
> diff --git
> a/meta/recipes-devtools/**python/python-scons-native/**scons-cross-toolchain.patch
>
>
b/meta/recipes-devtools/**python/python-scons-native/**
> scons-cross-toolchain.patch new file mode 100644 index 0000000..041279e
> --- /dev/null +++
> b/meta/recipes-devtools/**python/python-scons-native/**
> scons-cross-toolchain.patch @@ -0,0 +1,17 @@ +---
> scons-2.1.0/engine/SCons/**Environment.py.orig 2012-02-10
> 16:59:10.000000000 -0800 ++++ scons-2.1.0/engine/SCons/**Environment.py
> 2012-02-11 13:29:15.000000000 -0800 +@@ -1483,6 +1483,14 @@ + if
> not SCons.Util.is_List(progs): + progs = [ progs ] +
> for prog in progs: ++ # prefer cross version of program, if it
> exists ++ if 'CROSS_COMPILE' in self._dict: ++
> cross_prog = self['CROSS_COMPILE'] + prog ++ #print
> "Looking for %s" % cross_prog ++ path =
> self.WhereIs(cross_prog) ++ if path: return cross_prog ++
> ++ #print "Looking for %s" % prog + path =
> self.WhereIs(prog) + if path: return prog + return
> None diff --git
> a/meta/recipes-devtools/**python/python-scons-native_2.**1.0.bb<http://python-scons-native_2.1.0.bb>b/meta/recipes-devtools/
>
>
**python/python-scons-native_2.**1.0.bb<http://python-scons-native_2.1.0.bb>
> index ff94cf6..c653237 100644 ---
> a/meta/recipes-devtools/**python/python-scons-native_2.**1.0.bb<http://python-scons-native_2.1.0.bb>
>
>
+++
b/meta/recipes-devtools/**python/python-scons-native_2.**1.0.bb<http://python-scons-native_2.1.0.bb>
> @@ -2,4 +2,6 @@ require python-scons_${PV}.bb inherit native DEPENDS =
> "python-native" RDEPENDS_${PN} = "" -PR = "r1" +PR = "r2" + +SRC_URI +=
> "file://scons-cross-toolchain.**patch"
>
>
>
> _______________________________________________ Openembedded-devel
> mailing list Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org
iEYEARECAAYFAk82/lEACgkQMkyGM64RGpG8OQCfcZk0EZs2iyyTwnJsAxpFOZvm
z+EAoJlGm6KD41LyaFpN3hgMQC3LDitY
=Lp55
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-11 23:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Pine.LNX.4.64.1202111600300.3065@www.vctlabs.com>
2012-02-11 23:24 ` OE scons cross-compile patch Tom King
2012-02-11 23:48 ` Koen Kooi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox