make/jprt.config

Wed, 15 Apr 2009 21:31:46 -0700

author
trims
date
Wed, 15 Apr 2009 21:31:46 -0700
changeset 1148
4961a8a726a4
parent 713
4852f4a82e58
permissions
-rw-r--r--

6830815: jprt.config not setting proper compiler version for use in 6u14
Summary: Add the 6u14 option to the jprt.config file in workspace
Reviewed-by: ohair

duke@435 1 #!echo "This is not a shell script"
duke@435 2 #
xdono@631 3 # Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
duke@435 4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 5 #
duke@435 6 # This code is free software; you can redistribute it and/or modify it
duke@435 7 # under the terms of the GNU General Public License version 2 only, as
duke@435 8 # published by the Free Software Foundation.
duke@435 9 #
duke@435 10 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 13 # version 2 for more details (a copy is included in the LICENSE file that
duke@435 14 # accompanied this code).
duke@435 15 #
duke@435 16 # You should have received a copy of the GNU General Public License version
duke@435 17 # 2 along with this work; if not, write to the Free Software Foundation,
duke@435 18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 19 #
duke@435 20 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@435 21 # CA 95054 USA or visit www.sun.com if you need additional information or
duke@435 22 # have any questions.
duke@435 23 #
duke@435 24 #
duke@435 25
duke@435 26 #############################################################################
duke@435 27 # Error
duke@435 28 error() # message
duke@435 29 {
duke@435 30 echo "ERROR: $1"
duke@435 31 exit 6
duke@435 32 }
duke@435 33 # Directory must exist
duke@435 34 dirMustExist() # dir name
duke@435 35 {
duke@435 36 if [ ! -d "$1" ] ; then
duke@435 37 error "Directory for $2 does not exist: $1"
duke@435 38 fi
duke@435 39 }
duke@435 40 # File must exist
duke@435 41 fileMustExist() # dir name
duke@435 42 {
duke@435 43 if [ ! -f "$1" ] ; then
duke@435 44 error "File for $2 does not exist: $1"
duke@435 45 fi
duke@435 46 }
duke@435 47 #############################################################################
duke@435 48
duke@435 49 # Should be set by JPRT as the 3 basic inputs
duke@435 50 bootdir="${ALT_BOOTDIR}"
duke@435 51 slashjava="${ALT_SLASH_JAVA}"
duke@435 52 jdk_import="${ALT_JDK_IMPORT_PATH}"
duke@435 53
duke@435 54 # Check input
duke@435 55 dirMustExist "${bootdir}" ALT_BOOTDIR
duke@435 56 dirMustExist "${slashjava}" ALT_SLASH_JAVA
duke@435 57 dirMustExist "${jdk_import}" ALT_JDK_IMPORT_PATH
duke@435 58
duke@435 59 # Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
duke@435 60 osname=`uname -s`
duke@435 61 if [ "${osname}" = SunOS ] ; then
duke@435 62
duke@435 63 # SOLARIS: Sparc or X86
duke@435 64 osarch=`uname -p`
duke@435 65 if [ "${osarch}" = sparc ] ; then
duke@435 66 solaris_arch=sparc
duke@435 67 else
duke@435 68 solaris_arch=i386
duke@435 69 fi
duke@435 70
ohair@593 71 if [ "${JPRT_SOLARIS_COMPILER_NAME}" != "" ] ; then
ohair@593 72 compiler_name=${JPRT_SOLARIS_COMPILER_NAME}
ohair@593 73 else
ohair@593 74 if [ "${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6" -o \
ohair@593 75 "${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6u10" -o \
trims@1148 76 "${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6u14" -o \
ohair@593 77 "${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6perf" ] ; then
ohair@593 78 # All jdk6 builds use SS11
ohair@593 79 compiler_name=SS11
ohair@593 80 else
ohair@713 81 compiler_name=SS12
ohair@593 82 fi
ohair@593 83 fi
ohair@593 84
ohair@593 85 # Get into path (make sure it matches ALT setting)
ohair@593 86 compiler_path=${slashjava}/devtools/${solaris_arch}/SUNWspro/${compiler_name}/bin
duke@435 87 dirMustExist "${compiler_path}" COMPILER_PATH
duke@435 88 path4sdk=${compiler_path}
duke@435 89
duke@435 90 # Add basic solaris system paths
duke@435 91 path4sdk=${path4sdk}:/usr/ccs/bin:/usr/ccs/lib:/usr/bin:/bin:/usr/sfw/bin
duke@435 92
duke@435 93 # Get the previous JDK to be used to bootstrap the build
duke@435 94 path4sdk=${bootdir}/bin:${path4sdk}
duke@435 95
duke@435 96 # Find GNU make
duke@435 97 make=/usr/sfw/bin/gmake
duke@435 98 if [ ! -f ${make} ] ; then
duke@435 99 make=/opt/sfw/bin/gmake
duke@435 100 if [ ! -f ${make} ] ; then
duke@435 101 make=${slashjava}/devtools/${solaris_arch}/bin/gnumake
duke@435 102 fi
duke@435 103 fi
duke@435 104 fileMustExist "${make}" make
duke@435 105
duke@435 106 # File creation mask
duke@435 107 umask 002
duke@435 108
duke@435 109 elif [ "${osname}" = Linux ] ; then
duke@435 110
duke@435 111 # LINUX: X86, AMD64
duke@435 112 osarch=`uname -m`
duke@435 113 if [ "${osarch}" = i686 ] ; then
duke@435 114 linux_arch=i586
duke@435 115 elif [ "${osarch}" = x86_64 ] ; then
duke@435 116 linux_arch=amd64
duke@435 117 fi
duke@435 118
duke@435 119 # Get the compilers into path (make sure it matches ALT setting)
duke@435 120 compiler_path=/usr/bin
duke@435 121 dirMustExist "${compiler_path}" COMPILER_PATH
duke@435 122 path4sdk=${compiler_path}
duke@435 123
duke@435 124 # Add basic paths
duke@435 125 path4sdk=${path4sdk}:/usr/bin:/bin:/usr/sbin:/sbin
duke@435 126
duke@435 127 # Get the previous JDK to be used to bootstrap the build
duke@435 128 path4sdk=${bootdir}/bin:${path4sdk}
duke@435 129
duke@435 130 # Find GNU make
duke@435 131 make=/usr/bin/make
duke@435 132 fileMustExist "${make}" make
duke@435 133
duke@435 134 umask 002
duke@435 135
duke@435 136 else
duke@435 137
duke@435 138 # Windows: Differs on CYGWIN vs. MKS, and the compiler available.
duke@435 139 # Also, blanks in pathnames gives GNU make headaches, so anything placed
duke@435 140 # in any ALT_* variable should be the short windows dosname.
duke@435 141
duke@435 142 # WINDOWS: Install and use MKS or CYGWIN (should have already been done)
duke@435 143 # Assumption here is that you are in a shell window via MKS or cygwin.
duke@435 144 # MKS install should have defined the environment variable ROOTDIR.
duke@435 145 # We also need to figure out which one we have: X86, AMD64
duke@435 146 if [ "`echo ${PROCESSOR_IDENTIFIER} | fgrep AMD64`" != "" ] ; then
duke@435 147 windows_arch=amd64
duke@435 148 else
duke@435 149 windows_arch=i586
duke@435 150 fi
duke@435 151
duke@435 152 # We need to determine if we are running a CYGWIN shell or an MKS shell
duke@435 153 # (if uname isn't available, then it will be unix_toolset=unknown)
duke@435 154 unix_toolset=unknown
duke@435 155 if [ "`uname -a | fgrep Cygwin`" = "" -a -d "${ROOTDIR}" ] ; then
duke@435 156 # We kind of assume ROOTDIR is where MKS is and it's ok
duke@435 157 unix_toolset=MKS
duke@435 158 mkshome=`dosname -s "${ROOTDIR}"`
duke@435 159 # Utility to convert to short pathnames without spaces
duke@435 160 dosname="${mkshome}/mksnt/dosname -s"
duke@435 161 # Most unix utilities are in the mksnt directory of ROOTDIR
duke@435 162 unixcommand_path="${mkshome}/mksnt"
duke@435 163 path4sdk="${unixcommand_path}"
duke@435 164 dirMustExist "${unixcommand_path}" UNIXCOMMAND_PATH
duke@435 165 devtools_path="${slashjava}/devtools/win32/bin"
duke@435 166 path4sdk="${devtools_path};${path4sdk}"
duke@435 167 dirMustExist "${devtools_path}" DEVTOOLS_PATH
duke@435 168 # Find GNU make
duke@435 169 make="${devtools_path}/gnumake.exe"
duke@435 170 fileMustExist "${make}" make
duke@435 171 elif [ "`uname -a | fgrep Cygwin`" != "" -a -f /bin/cygpath ] ; then
duke@435 172 # For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
duke@435 173 unix_toolset=CYGWIN
duke@435 174 # Utility to convert to short pathnames without spaces
duke@435 175 dosname="/usr/bin/cygpath -a -m -s"
duke@435 176 # Most unix utilities are in the /usr/bin
duke@435 177 unixcommand_path="/usr/bin"
duke@435 178 path4sdk="${unixcommand_path}"
duke@435 179 dirMustExist "${unixcommand_path}" UNIXCOMMAND_PATH
duke@435 180 # Find GNU make
duke@435 181 make="${unixcommand_path}/make.exe"
duke@435 182 fileMustExist "${make}" make
duke@435 183 else
duke@435 184 echo "WARNING: Cannot figure out if this is MKS or CYGWIN"
duke@435 185 fi
duke@435 186
duke@435 187 # WINDOWS: Compiler setup (nasty part)
duke@435 188 # NOTE: You can use vcvars32.bat to set PATH, LIB, and INCLUDE.
duke@435 189 # NOTE: CYGWIN has a link.exe too, make sure the compilers are first
duke@435 190 if [ "${windows_arch}" = i586 ] ; then
duke@435 191 # 32bit Windows compiler settings
duke@435 192 # VisualStudio .NET 2003 VC++ 7.1 (VS71COMNTOOLS should be defined)
duke@435 193 vs_root=`${dosname} "${VS71COMNTOOLS}/../.."`
duke@435 194 # Fill in PATH, LIB, and INCLUDE (unset all others to make sure)
duke@435 195 vc7_root="${vs_root}/Vc7"
duke@435 196 compiler_path="${vc7_root}/bin"
duke@435 197 platform_sdk="${vc7_root}/PlatformSDK"
duke@435 198 # LIB and INCLUDE must use ; as a separator
duke@435 199 include4sdk="${vc7_root}/atlmfc/include"
duke@435 200 include4sdk="${include4sdk};${vc7_root}/include"
duke@435 201 include4sdk="${include4sdk};${platform_sdk}/include/prerelease"
duke@435 202 include4sdk="${include4sdk};${platform_sdk}/include"
duke@435 203 include4sdk="${include4sdk};${vs_root}/SDK/v1.1/include"
duke@435 204 lib4sdk="${vc7_root}/atlmfc/lib"
duke@435 205 lib4sdk="${lib4sdk};${vc7_root}/lib"
duke@435 206 lib4sdk="${lib4sdk};${platform_sdk}/lib/prerelease"
duke@435 207 lib4sdk="${lib4sdk};${platform_sdk}/lib"
duke@435 208 lib4sdk="${lib4sdk};${vs_root}/SDK/v1.1/lib"
duke@435 209 # Search path and DLL locating path
duke@435 210 # WARNING: CYGWIN has a link.exe too, make sure compilers are first
duke@435 211 path4sdk="${vs_root}/Common7/Tools/bin;${path4sdk}"
duke@435 212 path4sdk="${vs_root}/SDK/v1.1/bin;${path4sdk}"
duke@435 213 path4sdk="${vs_root}/Common7/Tools;${path4sdk}"
duke@435 214 path4sdk="${vs_root}/Common7/Tools/bin/prerelease;${path4sdk}"
duke@435 215 path4sdk="${vs_root}/Common7/IDE;${path4sdk}"
duke@435 216 path4sdk="${compiler_path};${path4sdk}"
duke@435 217 elif [ "${windows_arch}" = amd64 ] ; then
duke@435 218 # AMD64 64bit Windows compiler settings
duke@435 219 if [ "${MSSDK}" != "" ] ; then
duke@435 220 platform_sdk="${MSSDK}"
duke@435 221 else
duke@435 222 platform_sdk=`${dosname} "C:/Program Files/Microsoft Platform SDK/"`
duke@435 223 fi
duke@435 224 compiler_path="${platform_sdk}/Bin/win64/x86/AMD64"
duke@435 225 # LIB and INCLUDE must use ; as a separator
duke@435 226 include4sdk="${platform_sdk}/Include"
duke@435 227 include4sdk="${include4sdk};${platform_sdk}/Include/crt/sys"
duke@435 228 include4sdk="${include4sdk};${platform_sdk}/Include/mfc"
duke@435 229 include4sdk="${include4sdk};${platform_sdk}/Include/atl"
duke@435 230 include4sdk="${include4sdk};${platform_sdk}/Include/crt"
duke@435 231 lib4sdk="${platform_sdk}/Lib/AMD64"
duke@435 232 lib4sdk="${lib4sdk};${platform_sdk}/Lib/AMD64/atlmfc"
duke@435 233 # Search path and DLL locating path
duke@435 234 # WARNING: CYGWIN has a link.exe too, make sure compilers are first
duke@435 235 path4sdk="${platform_sdk}/bin;${path4sdk}"
duke@435 236 path4sdk="${compiler_path};${path4sdk}"
duke@435 237 fi
duke@435 238 # Export LIB and INCLUDE
duke@435 239 unset lib
duke@435 240 unset Lib
duke@435 241 LIB="${lib4sdk}"
duke@435 242 export LIB
duke@435 243 unset include
duke@435 244 unset Include
duke@435 245 INCLUDE="${include4sdk}"
duke@435 246 export INCLUDE
duke@435 247 # Set the ALT variable
duke@435 248 dirMustExist "${compiler_path}" COMPILER_PATH
duke@435 249
duke@435 250 # WINDOWS: Get the previous JDK to be used to bootstrap the build
duke@435 251 path4sdk="${bootdir}/bin;${path4sdk}"
duke@435 252
duke@435 253 # Turn all \\ into /, remove duplicates and trailing /
duke@435 254 slash_path="`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`"
duke@435 255
duke@435 256 # For windows, it's hard to know where the system is, so we just add this
duke@435 257 # to PATH.
duke@435 258 path4sdk="${slash_path};${PATH}"
duke@435 259
duke@435 260 # Convert path4sdk to cygwin style
duke@435 261 if [ "${unix_toolset}" = CYGWIN ] ; then
duke@435 262 path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
duke@435 263 fi
duke@435 264
duke@435 265 fi
duke@435 266
duke@435 267 # Export PATH setting
duke@435 268 PATH="${path4sdk}"
duke@435 269 export PATH
duke@435 270
duke@435 271 # Unset certain vars
duke@435 272 unset LD_LIBRARY_PATH
duke@435 273 unset LD_LIBRARY_PATH_32
duke@435 274 unset LD_LIBRARY_PATH_64
duke@435 275

mercurial