Generic-ADSP: harmful library path added
Platform/Generic-ADSP-Common.cmake
has this line (line 83 in version 3.27.7):
link_directories("${_ADSP_FAMILY_DIR}/lib")
This adds the ...\VisualDSP 5.0\Blackfin\lib
directory to the default library search path.
That's a bad idea, because the libraries exist in multiple versions for different "silicon revisions" in various subdirectories, and what happens is that the ones in the \lib
dir are always found and used first even though they are not the correct version for the si-revision the project is compiled with and that was given to the linker command line.
The effect is that the linker spits out lots of warnings about si-revision mismatches, and of course not to mention the risk of the program misbehaving in certain corner cases.
Analog Devices' linker knows about si-revision and which version of library to link against, and where to find it.
I suggest to fix this by removing that line from Platform/Generic-ADSP-Common.cmake
as it's not needed and, on the contrary, only does harm.
Besides, this cannot be undone in a toolchain file (not by any means I have found out so far), and I have to undo it in the project's CMakeLists.txt by clearing the LINK_DIRECTORIES property.