test-release.sh: Don't use chrpath on Solaris
authorRainer Orth <ro@gcc.gnu.org>
Thu, 12 Sep 2019 14:50:32 +0000 (14:50 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Thu, 12 Sep 2019 14:50:32 +0000 (14:50 +0000)
When trying to run test-release.sh on Solaris 11.4 for 9.0.0 rc4, I failed initially
because Solaris lacks chrpath.  This patch accounts for that and allowed the run to
continue.

Tested on amd64-pc-solaris2.11 and sparcv9-sun-solaris2.11.

Differential Revision: https://reviews.llvm.org/D67484

llvm-svn: 371741

llvm/utils/release/test-release.sh

index 8f691cc..e00a41d 100755 (executable)
@@ -277,8 +277,11 @@ function check_program_exists() {
   fi
 }
 
-if [ "$System" != "Darwin" ]; then
+if [ "$System" != "Darwin" -a "$System" != "SunOS" ]; then
   check_program_exists 'chrpath'
+fi
+
+if [ "$System" != "Darwin" ]; then
   check_program_exists 'file'
   check_program_exists 'objdump'
 fi
@@ -444,7 +447,7 @@ function test_llvmCore() {
 # Clean RPATH. Libtool adds the build directory to the search path, which is
 # not necessary --- and even harmful --- for the binary packages we release.
 function clean_RPATH() {
-  if [ "$System" = "Darwin" ]; then
+  if [ "$System" = "Darwin" -o "$System" = "SunOS" ]; then
     return
   fi
   local InstallPath="$1"