python-native: Fix gcc compiler detecting logic

We have a patch unixccompiler.patch where we try to throw away
everything except first element of CC string but this does not
work if gcc is prepended with something e.g. CC="ccache gcc"
then the logic fails and it ends up in some modules failing on
you silently (_sqlite3) in my case.
The fix here is to drop basename so we keep the whole
string as it is and then the detection function searches
for gcc string in the whole CC. This works in both cases
one the original intent of the patch and the second described
above. One place where it will fail is if someone has non-gcc
compiler installed in some subdir which has gcc in it e.g.
/usr/gcc/fakecc but for OE this should never happen. Ideally
the the detection logic should have tried to execute gcc
and then parsed --version output or something.

(From OE-Core rev: 9b13b9024d24953dedb35f62d3d8b06a29036992)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2011-11-27 17:22:37 -08:00
committed by Richard Purdie
parent fbdbe8d1ec
commit 31e998266f
2 changed files with 12 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
require python.inc
DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native sqlite3-native"
PR = "${INC_PR}.0"
PR = "${INC_PR}.1"
SRC_URI += "file://04-default-is-optimized.patch \
file://05-enable-ctypes-cross-build.patch \