review feedback: add a comment describing the situation

This commit is contained in:
Joshua M. Clulow 2020-03-17 15:04:29 -07:00
parent a83e6c7328
commit 1c191c304a

View file

@ -841,6 +841,12 @@ pub fn linker_and_flavor(sess: &Session) -> (PathBuf, LinkerFlavor) {
}
LinkerFlavor::Gcc => {
if cfg!(target_os = "solaris") {
// On historical Solaris systems, "cc" may have
// been Sun Studio, which is not flag-compatible
// with "gcc". This history casts a long shadow,
// and many modern illumos distributions today
// ship GCC as "gcc" without also making it
// available as "cc".
"gcc"
} else {
"cc"