sw_vers on Linux

Hi,

I have no idea who to report this to, but ... somewhere in the
configure build process of latest svn on Linux, there is a call to
'sw_vers'. Some googling leads me to believe that this is a command
that only exists on Apple, so should not be called on Linux. Just my
2$. here's the relevant output :

make[5]: Entering directory
`/usr/local/src/llvm/build/tools/clang/tools/extra/cpp11-migrate'
make[5]: Leaving directory
`/usr/local/src/llvm/build/tools/clang/tools/extra/cpp11-migrate'
make[5]: Entering directory
`/usr/local/src/llvm/build/tools/clang/tools/extra/test'
make[5]: Leaving directory
`/usr/local/src/llvm/build/tools/clang/tools/extra/test'
make[4]: Leaving directory `/usr/local/src/llvm/build/tools/clang/tools/extra'
make[3]: Leaving directory `/usr/local/src/llvm/build/tools/clang/tools'
make[3]: Entering directory `/usr/local/src/llvm/build/tools/clang/runtime'
make[4]: Entering directory
`/usr/local/src/llvm/build/tools/clang/runtime/compiler-rt'
/bin/sh: sw_vers: command not found
make[5]: Entering directory `/usr/local/src/llvm/llvm/projects/compiler-rt'
make[5]: Leaving directory `/usr/local/src/llvm/llvm/projects/compiler-rt'
make[4]: Leaving directory
`/usr/local/src/llvm/build/tools/clang/runtime/compiler-rt'
make[4]: Entering directory
`/usr/local/src/llvm/build/tools/clang/runtime/libcxx'
make[4]: Leaving directory
`/usr/local/src/llvm/build/tools/clang/runtime/libcxx'
make[3]: Leaving directory `/usr/local/src/llvm/build/tools/clang/runtime'
make[3]: Entering directory `/usr/local/src/llvm/build/tools/clang/docs'
make[4]: Entering directory `/usr/local/src/llvm/build/tools/clang/docs/tools'

Regards,

John Smith

FWIW I see this too, pretty sure it was either Bob or Daniel?

-eric

FWIW I see this too, pretty sure it was either Bob or Daniel?

-eric

There’s a use of it in compiler_rt’s make/platform/clang_darwin.mk that Daniel added in svn 166114. It looks like that makefile fragment gets included on all platforms, so we should insert a check before trying to run sw_vers. Daniel, can you take care of that?

Should be fixed in r173465, thanks for the report.

  • Daniel