make/devkit/createSolarisDevkit12.4.sh
author wetmore
Tue, 21 Aug 2018 11:30:48 -0700
changeset 51574 ed52ea83f830
parent 48919 c7e84c0a51c3
child 52804 28094715ae71
permissions -rw-r--r--
8207317: SSLEngine negotiation fail exception behavior changed from fail-fast to fail-lazy Reviewed-by: xuelei
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
     1
#!/bin/bash
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
     2
#
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
     3
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
     4
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
     5
#
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
     6
# This code is free software; you can redistribute it and/or modify it
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
     7
# under the terms of the GNU General Public License version 2 only, as
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
     8
# published by the Free Software Foundation.  Oracle designates this
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
     9
# particular file as subject to the "Classpath" exception as provided
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    10
# by Oracle in the LICENSE file that accompanied this code.
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    11
#
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    12
# This code is distributed in the hope that it will be useful, but WITHOUT
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    13
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    14
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    15
# version 2 for more details (a copy is included in the LICENSE file that
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    16
# accompanied this code).
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    17
#
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    18
# You should have received a copy of the GNU General Public License version
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    19
# 2 along with this work; if not, write to the Free Software Foundation,
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    20
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    21
#
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    22
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    23
# or visit www.oracle.com if you need additional information or have any
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    24
# questions.
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    25
#
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    26
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    27
# This script creates a devkit for building OpenJDK on Solaris by copying
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    28
# part of a Solaris Studio installation and cretaing a sysroot by installing
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    29
# a limited set of system packages. It is assumed that a suitable pkg
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    30
# publisher is configured for the system where the script is executed.
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    31
#
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    32
# The Solaris Studio installation must contain at least these packages:
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    33
# developer/solarisstudio-124/backend               12.4-1.0.6.0               i--
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    34
# developer/solarisstudio-124/c++                   12.4-1.0.10.0              i--
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    35
# developer/solarisstudio-124/cc                    12.4-1.0.4.0               i--
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    36
# developer/solarisstudio-124/library/c++-libs      12.4-1.0.10.0              i--
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    37
# developer/solarisstudio-124/library/math-libs     12.4-1.0.0.1               i--
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    38
# developer/solarisstudio-124/library/studio-gccrt  12.4-1.0.0.1               i--
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    39
# developer/solarisstudio-124/studio-common         12.4-1.0.0.1               i--
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    40
# developer/solarisstudio-124/studio-ja             12.4-1.0.0.1               i--
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    41
# developer/solarisstudio-124/studio-legal          12.4-1.0.0.1               i--
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    42
# developer/solarisstudio-124/studio-zhCN           12.4-1.0.0.1               i--
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    43
# In particular backend 12.4-1.0.6.0 contains a critical patch for the sparc
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    44
# version.
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    45
#
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    46
# erik.joelsson@oracle.com
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    47
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    48
USAGE="$0 <Solaris Studio installation> <Path to gnu make binary>"
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    49
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    50
if [ "$1" = "" ] || [ "$2" = "" ]; then
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    51
  echo $USAGE
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    52
  exit 1
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    53
fi
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    54
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    55
SOLARIS_STUDIO_VERSION=12u4
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    56
SOLARIS_VERSION=11u1
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    57
case `uname -p` in
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    58
  i*)
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    59
    ARCH=x86
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    60
    ;;
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    61
  sparc*)
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    62
    ARCH=sparc
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    63
    ;;
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    64
esac
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    65
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    66
SOLARIS_STUDIO_SRC=$1
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    67
GNU_MAKE=$2
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    68
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    69
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    70
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    71
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    72
DEVKIT_NAME=SS${SOLARIS_STUDIO_VERSION}-Solaris${SOLARIS_VERSION}
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    73
DEVKIT_ROOT=${BUILD_DIR}/${DEVKIT_NAME}
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    74
BUNDLE_NAME=${DEVKIT_NAME}.tar.gz
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    75
BUNDLE=${BUILD_DIR}/${BUNDLE_NAME}
48909
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
    76
INSTALL_ROOT=${BUILD_DIR}/install-root-$SOLARIS_VERSION
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
    77
INSTALL_ROOT_TOOLS=${BUILD_DIR}/install-root-tools-$SOLARIS_VERSION
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    78
SYSROOT=${DEVKIT_ROOT}/sysroot
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    79
SOLARIS_STUDIO_SUBDIR=SS${SOLARIS_STUDIO_VERSION}
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    80
SOLARIS_STUDIO_DIR=${DEVKIT_ROOT}/${SOLARIS_STUDIO_SUBDIR}
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    81
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    82
# Extract the publisher from the system
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    83
if [ -z "${PUBLISHER_URI}" ]; then
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    84
  PUBLISHER_URI="$(pkg publisher solaris | grep URI | awk '{ print $3 }')"
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    85
fi
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    86
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    87
if [ ! -d $INSTALL_ROOT ]; then
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    88
  echo "Creating $INSTALL_ROOT and installing packages"
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    89
  pkg image-create $INSTALL_ROOT
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    90
  pkg -R $INSTALL_ROOT set-publisher -P -g ${PUBLISHER_URI} solaris
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    91
  pkg -R $INSTALL_ROOT install --accept $(cat solaris11.1-package-list.txt)
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    92
else
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    93
  echo "Skipping installing packages"
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    94
fi
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
    95
48909
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
    96
# Since we have implicitly been running 11.2 tools for a long time, we need
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
    97
# to pick them for the tools dir in the devkit. Create a separate install-root
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
    98
# for it.
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
    99
if [ ! -d $INSTALL_ROOT_TOOLS ]; then
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   100
  echo "Creating $INSTALL_ROOT_TOOLS and installing packages"
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   101
  pkg image-create $INSTALL_ROOT_TOOLS
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   102
  pkg -R $INSTALL_ROOT_TOOLS set-publisher -P -g ${PUBLISHER_URI} solaris
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   103
  sudo pkg -R $INSTALL_ROOT_TOOLS install --accept \
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   104
      entire@0.5.11-0.175.2.5.0.5.0 \
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   105
      system/linker \
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   106
      developer/base-developer-utilities \
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   107
      developer/gnu-binutils
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   108
else
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   109
  echo "Skipping installing tools packages"
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   110
fi
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   111
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   112
if [ ! -d $SYSROOT ]; then
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   113
  echo "Copying from $INSTALL_ROOT to $SYSROOT"
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   114
  mkdir -p $SYSROOT
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   115
  cp -rH $INSTALL_ROOT/lib $SYSROOT/
48909
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   116
  mkdir $SYSROOT/usr
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   117
  cp -rH $INSTALL_ROOT/usr/lib $SYSROOT/usr/
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   118
  cp -rH $INSTALL_ROOT/usr/include $SYSROOT/usr/
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   119
  pkg -R $INSTALL_ROOT list > $SYSROOT/pkg-list.txt
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   120
else
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   121
  echo "Skipping copying to $SYSROOT"
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   122
fi
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   123
48909
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   124
if [ ! -d $DEVKIT_ROOT/tools ]; then
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   125
  echo "Copying from $INSTALL_ROOT_TOOLS to $DEVKIT_ROOT/tools"
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   126
  # Some of the tools in sysroot are needed in the OpenJDK build. We need
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   127
  # to copy them into a tools dir, including their specific libraries.
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   128
  mkdir -p $DEVKIT_ROOT/tools/usr/bin/sparcv9 $DEVKIT_ROOT/tools/lib/sparcv9 \
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   129
      $DEVKIT_ROOT/tools/usr/gnu/bin
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   130
  cp $INSTALL_ROOT_TOOLS/usr/bin/{ar,nm,strip,ld,ldd} \
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   131
       $DEVKIT_ROOT/tools/usr/bin/
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   132
  cp $INSTALL_ROOT_TOOLS/usr/bin/sparcv9/{ar,nm,strip,ld,ldd} \
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   133
       $DEVKIT_ROOT/tools/usr/bin/sparcv9/
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   134
  cp $INSTALL_ROOT_TOOLS/usr/sbin/dtrace $DEVKIT_ROOT/tools/usr/bin/
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   135
  cp $INSTALL_ROOT_TOOLS/usr/sbin/sparcv9/dtrace $DEVKIT_ROOT/tools/usr/bin/sparcv9/
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   136
  cp -rH $INSTALL_ROOT_TOOLS/usr/gnu/bin/* $DEVKIT_ROOT/tools/usr/gnu/bin/
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   137
  cp $INSTALL_ROOT_TOOLS/lib/{libelf.so*,libld.so*,liblddbg.so*} \
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   138
      $DEVKIT_ROOT/tools/lib/
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   139
  cp $INSTALL_ROOT_TOOLS/lib/sparcv9/{libelf.so*,libld.so*,liblddbg.so*} \
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   140
      $DEVKIT_ROOT/tools/lib/sparcv9/
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   141
  for t in $(ls $DEVKIT_ROOT/tools/usr/gnu/bin); do
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   142
    if [ -f $DEVKIT_ROOT/tools/usr/gnu/bin/$t ]; then
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   143
      ln -s ../gnu/bin/$t $DEVKIT_ROOT/tools/usr/bin/g$t
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   144
    fi
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   145
  done
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   146
else
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   147
  echo "Skipping copying to tools dir $DEVKIT_ROOT/tools"
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   148
fi
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   149
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   150
if [ ! -d $SOLARIS_STUDIO_DIR ]; then
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   151
  echo "Copying Solaris Studio from $SOLARIS_STUDIO_SRC"
48909
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   152
  mkdir -p ${SOLARIS_STUDIO_DIR}
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   153
  cp -rH $SOLARIS_STUDIO_SRC/. ${SOLARIS_STUDIO_DIR}/
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   154
  # Solaris Studio 12.4 requires /lib/libmmheap.so.1 to run, but this lib is not
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   155
  # installed by default on all Solaris systems. Sneak it in from the sysroot to
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   156
  # make it run OOTB on more systems.
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   157
  cp $SYSROOT/lib/libmmheap.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   158
else
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   159
  echo "Skipping copying of Solaris Studio"
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   160
fi
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   161
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   162
echo "Copying gnu make to $DEVKIT_ROOT/bin"
48909
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   163
cp $GNU_MAKE $DEVKIT_ROOT/tools/usr/bin/
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   164
if [ ! -e $DEVKIT_ROOT/tools/usr/bin/gmake ]; then
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   165
  ln -s make $DEVKIT_ROOT/tools/usr/bin/gmake
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   166
fi
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   167
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   168
# Create the devkit.info file
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   169
echo Creating devkit.info
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   170
INFO_FILE=$DEVKIT_ROOT/devkit.info
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   171
rm -f $INFO_FILE
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   172
echo "# This file describes to configure how to interpret the contents of this devkit" >> $INFO_FILE
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   173
echo "DEVKIT_NAME=\"Solaris Studio $SOLARIS_STUDIO_VERSION - Solaris $SOLARIS_VERSION - $ARCH\"" >> $INFO_FILE
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   174
echo "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/$SOLARIS_STUDIO_SUBDIR/bin:\$DEVKIT_ROOT/bin\"" >> $INFO_FILE
48909
54b423e1c4cf 8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents: 34606
diff changeset
   175
echo "DEVKIT_EXTRA_PATH=\"\$DEVKIT_ROOT/tools/usr/bin\"" >> $INFO_FILE
34595
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   176
echo "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/sysroot\"" >> $INFO_FILE
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   177
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   178
if [ ! -e $BUNDLE ]; then
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   179
  echo "Creating $BUNDLE from $DEVKIT_ROOT"
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   180
  cd $DEVKIT_ROOT/..
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   181
  tar zcf $BUNDLE $DEVKIT_NAME
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   182
else
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   183
  echo "Skipping creation of $BUNDLE"
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff changeset
   184
fi