diff options
author | Gregory Becker <becker33@llnl.gov> | 2018-08-04 21:30:17 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2018-08-08 01:51:51 -0700 |
commit | 683c7fbf3bff72535964afdd93a214748ff253a6 (patch) | |
tree | 104594753fa5d24d75423a4acbc33f1d88d25008 /.travis.yml | |
parent | f152063898051de6187a33af542a9f1492ae887a (diff) | |
download | spack-683c7fbf3bff72535964afdd93a214748ff253a6.tar.gz spack-683c7fbf3bff72535964afdd93a214748ff253a6.tar.bz2 spack-683c7fbf3bff72535964afdd93a214748ff253a6.tar.xz spack-683c7fbf3bff72535964afdd93a214748ff253a6.zip |
Restore cc: package search paths come before dependency paths (#4692)
Spack currently prepends include paths, library paths, and rpaths to the
compile line. This causes problems when a header or library in the package
has the same name as one exported by one of its dependencies. The
*dependency's* header will be preferred over the package's, which is not
what most builds expect. This also breaks some of our production codes.
This restores the original cc behavior (from *very* early Spack) of parsing
compiler arguments out by type (`-L`, `-I`, `-Wl,-rpath`) and reconstituting
the full command at the end.
`<includes> <other_args> <library dirs> <rpaths>`
This differs from the original behavior in one significant way, though: it
*appends* the library arguments so that dependency libraries do not shadow
those in the build.
This is safe because semantics aren't affected by *interleaving* `-I`, `-L`,
and `-Wl,-rpath` arguments with others, only with each other (so the order of
two `-L` args affects the search path, but we search for all libraries on the
command line using the same search path).
We preserve the following:
1. Any system directory in the paths will be listed last.
2. The root package's include/library/RPATH flags come before flags of the
same type for any dependency.
3. Order will be preserved within flags passed by the build (except system
paths, which are moved to be last)
4. Flags for dependencies will appear between the root flags and the system
flags, and the flags for any dependency will come before those for *its*
dependencies (this is for completeness -- we already guarantee this in
`build_environment.py`)
Diffstat (limited to '.travis.yml')
0 files changed, 0 insertions, 0 deletions