components/openssl/openssl-fips/cc.sh
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 11 Mar 2013 10:38:09 -0700
branchs11-update
changeset 2520 ceec631e74d1
parent 678 ecd6b850f3d3
permissions -rw-r--r--
Close of build 10.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     1
#!/bin/sh
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     2
#
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     3
# CDDL HEADER START
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     4
#
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     5
# The contents of this file are subject to the terms of the
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     6
# Common Development and Distribution License (the "License").
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     7
# You may not use this file except in compliance with the License.
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     8
#
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
     9
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    10
# or http://www.opensolaris.org/os/licensing.
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    11
# See the License for the specific language governing permissions
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    12
# and limitations under the License.
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    13
#
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    14
# When distributing Covered Code, include this CDDL HEADER in each
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    15
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    16
# If applicable, add the following below this CDDL HEADER, with the
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    17
# fields enclosed by brackets "[]" replaced with your own identifying
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    18
# information: Portions Copyright [yyyy] [name of copyright owner]
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    19
#
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    20
# CDDL HEADER END
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    21
#
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    22
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    23
#
678
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    24
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    25
#
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    26
678
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    27
# The fips module is built with Sun Studio cc compile on sparc and x86.
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    28
# On x86, this cc wrapper is used to remove "-fast" from the compiler
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    29
# option. According to the "OpenSSL FIPS 140-2 Security Policy"
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    30
# document, no file in the source distribution may be changed in any way
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    31
# and as a result, this wrapper is used to remove the -fast that is
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    32
# passed to the Studio cc compiler.
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    33
# On sparc, this wrapper is just a pass through to cc.
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    34
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    35
MACH=`uname -p`
363
9c0cad004039 7039910 move OpenSSL from SFW to Userland gate
Jan Pechanec <Jan.Pechanec@Oracle.COM>
parents:
diff changeset
    36
678
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    37
if [ "$MACH" = "sparc" ]; then
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    38
	exec $REALCC "[email protected]"
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    39
else
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    40
	CC_CMD=""
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    41
	while [ $# -ne 0 ]; do
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    42
        	if [ "$1" != "-fast" ]; then
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    43
                	CC_CMD="$CC_CMD '$1'"
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    44
        	fi
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    45
        	shift;
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    46
	done
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    47
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    48
	eval $REALCC $CC_CMD
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    49
fi
ecd6b850f3d3 7129553 openssl-fips fails to build now
Hai-May Chao <haimay.chao@oracle.com>
parents: 363
diff changeset
    50