CMake Can't be used for AIX with GNU ld (cross-compilation)
I'm trying to setup AIX cross-compile tool using GCC (4.8) and GNU Binutils (2.24) on Linux Host.
When I Use CMake 2.8,7 (Ubuntu 12.04), it can be used for compile C++ programs without any problems.
However, when I use CMake 3.5.1 (Ubuntu 16.04), it can't link C++ Programs.
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_49385.dir/link.txt
--verbose=1
/home/leebc/toolchain/aix/gcc4.8/bin/powerpc-ibm-aix5.3.0.0-g++
-Wl,-bnoipath -Wl,-brtl CMakeFiles/cmTC_49385.dir/testCXXCompiler.cxx.o -o
cmTC_49385 -Wl,-blibpath:/usr/lib:/lib
/home/leebc/toolchain/aix/gcc4.8/lib/gcc/powerpc-ibm-aix5.3.0.0/4.8.2/../../../../powerpc-ibm-aix5.3.0.0/bin/ld:
target noipath not found
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_49385.dir/build.make:97: recipe for target 'cmTC_49385'
failed
make[1]: *** [cmTC_49385] Error 1
make[1]: Leaving directory
'/home/leebc/myproj/CMakeFiles/CMakeTmp'
If I rollback this commit, it works fine. Seems like bnoipath
flag works only for AIX ld, which cannot be used on cross-compilation.