try and auto-detect "system" directories to strip from THORN_INC_DIRS and THORN_LIB_DIRS

Issue #2532 new
Roland Haas created an issue

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:

  1. make the list of directories to strip option list variables
  2. 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)

  1. Roland Haas reporter

    gcc -print-search-dirs will output some more than just the “system” directories since it includes gcc specific locations beyond what eg ld- v reports and also the ones from LIBRARY_PATH it seems. Which should be find since LIBRARY_PATH is late in the search order compared to -L.

  2. Log in to comment