Notes |
|
(0025358)
|
Alex Neundorf
|
2011-02-09 15:39
|
|
It works here for me, when I use the ppc toolchain from eldk it correctly picks up the ppc strip.
The toolchain prefix is determined in CMakeDetermineCCompiler.cmake. It is only checked in crosscompiling mode.
Are you crosscompiling or do you only specify -DCMAKE_C_COMPILER=your_gcc and that's all ?
For a proper cross compile you should follow the cross compiling howto in the cmake wiki.
Very short version: if CMAKE_SYSTEM_NAME is preset (in your case to Linux), cmake considers the build as a cross compile, and will then check for the toolchain prefix.
If cmake determines CMAKE_SYSTEM_NAME itself, it is not cross compiling, and will not find the strip you want. It will also try to execute binaries in try_run(), search in the default system directories, etc. |
|
|
(0025366)
|
Nikita Krupenko
|
2011-02-10 05:31
|
|
I specified CMAKE_SYSTEM_NAME and now all works fine. So this is not error in CMake, this was my fault.
Also, I have one question. Can this parameters be identified from compiler? If so, T think, it will be convenient and less error-prone to specify only compiler. |
|
|
(0025374)
|
Alex Neundorf
|
2011-02-10 12:04
|
|
You mean identified the target operating system from the compiler ?
I don't think so.
At least not from the name.
Also, the same compiler can be used for multiple operating systems, e.g. I was using some gcc for eCos, which was not specifically built to build for eCos.
Alex |
|
|
(0025388)
|
Nikita Krupenko
|
2011-02-11 03:43
|
|
We can try to get some information from compiler itself, for example output of "gcc -dumpmachine" may be useful.
Also, if one compiler used for multiple systems, can we treat them as one system? |
|
|
(0025418)
|
Alex Neundorf
|
2011-02-12 12:12
|
|
> Also, if one compiler used for multiple systems, can we treat them as one
> system?
No. E.g. Linux and eCos are really different OSs.
Especially for other embedded/RT OSs the compilers are not specific. |
|
|
(0025460)
|
Nikita Krupenko
|
2011-02-17 10:09
|
|
Ok. So, this is not a bug and should be closed. |
|
|
(0025461)
|
Alex Neundorf
|
2011-02-17 12:52
|
|
With presetting CMAKE_SYSTEM_NAME everything worked as expected.
|
|