
On 14-11-05 10:46 AM, Jeroen Hofstee wrote:
Hello Simon,
On 03-11-14 22:14, Simon Glass wrote:
Hi,
On 30 October 2014 14:57, Jeroen Hofstee jeroen@myspectrum.nl wrote:
Hello Steve,
On 30-10-14 21:42, Steve Rae wrote:
Hmmmm -- maybe it would be better to specify the entire path for the CROSS_COMPILE, and not rely on the PATH to find the cross compile tools:
diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index 27dc318..58c7b1f 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -33,6 +33,7 @@ class Toolchain: self.cross = os.path.basename(fname)[:-3] pos = self.cross.find('-') self.arch = self.cross[:pos] if pos != -1 else 'sandbox'
self.cross = fname[:-3]
A bit off topic, but is it possible to stop adding these magic 3 constants. strlen("clang") != 3. strlen("cc") isn't either. Anyway I am aware buildman is already full with it, so I am fine with one more (for now).
This should be isolated to Toolchain. I'd be happy to have a fix that solves this once and for all. What is needed?
not that much I think. What would be needed is to store the compiler name in the toolchain object and use the python strlen equivalent on that instead of the hardcoded threes. And eventually pass the correct values to CC and HOSTCC.
When I tried that, subprocess was barfing some (at least for me not easily, [no I don't recall which one exactly] explainable) error, so I gave up and created a script called *-gcc invoking clang and all was fine again ;)
So yes, it would be nice if buildman did not make such an assumption. It is not strictly clang related as well, at least on FreeBSD you can install many gcc compilers, which will be named gcc44, gcc45.. gcc5 etc.
As already mentioned, it is not related to this patch, it adds just another hardcoded magic 3 value.
Regards, Jeroen
( updated the subject line for this discussion topic... ) In my experience, we would normally set the CROSS_COMPILE variable to the "prefix" of the cross compiler toolchain, for example:
CROSS_COMPILE=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi/arm-linux-gnueabi- Perhaps if the "~/.buildman" defined these "prefixes" (rather than "directories"), then maybe it would be more consistent and simpler.... [ and I suspect that this magic "-3" would go away; isn't this "-3" because we need to strip "gcc" off the end of the string ?!?!?! ] Thanks, Steve