try and auto-detect "system" directories to strip from THORN_INC_DIRS and THORN_LIB_DIRS
Issue #2532
new
Currently we use two utilities strip-inc-dirs.sh
and strip-lib-dirs.sh
to remove “system” libraries from THORN_INC_DIRS
and 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
gcc -print-search-dirs
and
echo | gcc -E -Wp,-v -
Comments (1)
-
reporter - Log in to comment
gcc -print-search-dirs
will output some more than just the “system” directories since it includes gcc specific locations beyond what egld- v
reports and also the ones fromLIBRARY_PATH
it seems. Which should be find sinceLIBRARY_PATH
is late in the search order compared to-L
.