Currently we use two utilities
strip-lib-dirs.sh to remove “system” libraries from
THORN_LIB_DIRS in ExternalLibraries. However the list used is hard-coded and not always correct (see eg #2528).
It may be better to:
- make the list of directories to strip option list variables
- try to auto-detect them in the Cactus know-architectures files
To auto-detect on GNU/Linux with gcc/ld one can try and use the suggestion on https://stackoverflow.com/questions/9922949/how-to-print-the-ldlinker-search-path and https://stackoverflow.com/questions/17939930/finding-out-what-the-gcc-include-path-is namely
echo | gcc -E -Wp,-v -