author | Petr Sumbera <petr.sumbera@oracle.com> |
Thu, 07 Nov 2013 00:14:12 -0800 | |
changeset 1542 | 41359ead5408 |
parent 1462 | bcf516ed6959 |
permissions | -rwxr-xr-x |
1462
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
1 |
#!/bin/bash |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
2 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
3 |
# |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
4 |
# CDDL HEADER START |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
5 |
# |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
6 |
# The contents of this file are subject to the terms of the |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
7 |
# Common Development and Distribution License (the "License"). |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
8 |
# You may not use this file except in compliance with the License. |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
9 |
# |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
10 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
11 |
# or http://www.opensolaris.org/os/licensing. |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
12 |
# See the License for the specific language governing permissions |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
13 |
# and limitations under the License. |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
14 |
# |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
15 |
# When distributing Covered Code, include this CDDL HEADER in each |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
16 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
17 |
# If applicable, add the following below this CDDL HEADER, with the |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
18 |
# fields enclosed by brackets "[]" replaced with your own identifying |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
19 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
20 |
# |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
21 |
# CDDL HEADER END |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
22 |
# |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
23 |
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
24 |
# |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
25 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
26 |
PROTODIR="" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
27 |
PYTHON="" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
28 |
INSTALLDIR="" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
29 |
LIBGCCDIR="" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
30 |
MACH="`uname -p`" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
31 |
SED="/usr/gnu/bin/sed" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
32 |
STRIP="/usr/bin/strip -x" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
33 |
# Solaris 11 uname does not support -o |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
34 |
UNAME="/usr/gnu/bin/uname" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
35 |
GCC_FULL_VERSION="" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
36 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
37 |
UNKNOWN_ARG=yes |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
38 |
PRINT_HELP=no |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
39 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
40 |
while [ "$#" -gt 0 ] ; do |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
41 |
UNKNOWN_ARG=no |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
42 |
case "$1" in |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
43 |
-protodir=*) |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
44 |
export PROTODIR=`echo $1 | ${SED} "s,^-protodir=\(.*\),\1,"` |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
45 |
;; |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
46 |
-python=*) |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
47 |
export PYTHON=`echo $1 | ${SED} "s,^-python=\(.*\),\1,"` |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
48 |
;; |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
49 |
-gccversion=*) |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
50 |
export GCC_FULL_VERSION=`echo $1 | ${SED} "s,^-gccversion=\(.*\),\1,"` |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
51 |
;; |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
52 |
*) |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
53 |
UNKNOWN_ARG=yes |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
54 |
;; |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
55 |
esac |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
56 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
57 |
if [ "$UNKNOWN_ARG" = "yes" ] ; then |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
58 |
echo "$1: Invalid argument" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
59 |
PRINT_HELP=yes |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
60 |
shift |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
61 |
continue |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
62 |
fi |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
63 |
shift |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
64 |
done |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
65 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
66 |
if [ "$PRINT_HELP" = "yes" ] || [ "$UNKNOWN_ARG" = "yes" ] ; then |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
67 |
echo "" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
68 |
echo "Usage: `basename $0` -protodir=[ build area prototype directory ]" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
69 |
echo " -python=[ Python interpreter to use ]" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
70 |
echo "" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
71 |
exit 1 |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
72 |
fi |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
73 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
74 |
if [ ${MACH} = "i386" ] ; then |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
75 |
export MACH64="amd64" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
76 |
export VENDOR="pc" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
77 |
else |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
78 |
export MACH64="sparcv9" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
79 |
export VENDOR="sun" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
80 |
fi |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
81 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
82 |
gcc_maj="`echo ${GCC_FULL_VERSION} | cut -d . -f 1`" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
83 |
gcc_min="`echo ${GCC_FULL_VERSION} | cut -d . -f 2`" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
84 |
GCC_VERSION="${gcc_maj}.${gcc_min}" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
85 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
86 |
export RELEASE="`${UNAME} -r | cut -d . -f 2`" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
87 |
export OS="`${UNAME} -o | /usr/gnu/bin/tr -s '[:upper:]' '[:lower:]'`" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
88 |
export GCC_TRIPLE="${MACH}-${VENDOR}-${OS}2.${RELEASE}" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
89 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
90 |
export MACH MACH64 SED STRIP GCC_VERSION GCC_FULL_VERSION PYTHON |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
91 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
92 |
export BINDIR="${PROTODIR}/usr/gcc/${GCC_VERSION}/bin" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
93 |
export LIBDIR="${PROTODIR}/usr/gcc/${GCC_VERSION}/lib" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
94 |
export LIB64DIR="${PROTODIR}/usr/gcc/${GCC_VERSION}/lib/${MACH64}" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
95 |
export GCCSHAREDIR="${PROTODIR}/usr/gcc/${GCC_VERSION}/share" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
96 |
export GCCUSRSHAREDIR="${PROTODIR}/usr/share/gcc-${GCC_FULL_VERSION}" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
97 |
export GDBSHAREDIR="${PROTODIR}/usr/share/gdb" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
98 |
export LIBGCCDIR="${PROTODIR}/usr/gcc/${GCC_VERSION}/lib/gcc" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
99 |
export GCCTRIPLEDIR="${LIBGCCDIR}/${GCC_TRIPLE}/${GCC_FULL_VERSION}" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
100 |
export LIBTRIPLEDIR="${LIBDIR}/gcc/${GCC_TRIPLE}/${GCC_FULL_VERSION}" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
101 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
102 |
echo "Stripping GCC binaries ... " |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
103 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
104 |
for file in \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
105 |
c++ \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
106 |
cpp \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
107 |
g++ \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
108 |
gcc \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
109 |
gcc-ar \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
110 |
gcc-nm \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
111 |
gcc-ranlib \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
112 |
gcov \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
113 |
gfortran \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
114 |
${GCC_TRIPLE}-c++ \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
115 |
${GCC_TRIPLE}-g++ \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
116 |
${GCC_TRIPLE}-gcc \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
117 |
${GCC_TRIPLE}-gcc-${GCC_FULL_VERSION} \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
118 |
${GCC_TRIPLE}-gcc-ar \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
119 |
${GCC_TRIPLE}-gcc-nm \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
120 |
${GCC_TRIPLE}-gcc-ranlib \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
121 |
${GCC_TRIPLE}-gfortran |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
122 |
do |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
123 |
${STRIP} ${BINDIR}/${file} |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
124 |
done |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
125 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
126 |
for file in \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
127 |
libgfortran.so.3.0.0 \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
128 |
libgomp.so.1.0.0 \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
129 |
libitm.so.1.0.0 \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
130 |
libobjc.so.4.0.0 \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
131 |
libssp.so.0.0.0 |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
132 |
do |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
133 |
${STRIP} ${LIBDIR}/${file} |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
134 |
${STRIP} ${LIB64DIR}/${file} |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
135 |
done |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
136 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
137 |
# libquadmath is not available on SPARC. |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
138 |
if [ "${MACH}" = "i386" ] ; then |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
139 |
${STRIP} ${LIBDIR}/libquadmath.so.0.0.0 |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
140 |
${STRIP} ${LIB64DIR}/libquadmath.so.0.0.0 |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
141 |
fi |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
142 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
143 |
for file in \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
144 |
cc1 \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
145 |
cc1obj \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
146 |
cc1plus \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
147 |
collect2 \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
148 |
f951 \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
149 |
liblto_plugin.so.0.0.0 \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
150 |
lto-wrapper \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
151 |
lto1 |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
152 |
do |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
153 |
${STRIP} ${GCCTRIPLEDIR}/${file} |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
154 |
done |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
155 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
156 |
echo "... Done." |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
157 |
echo "" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
158 |
echo "Copying GCC's gdb Python files ... " |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
159 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
160 |
mkdir -p ${GDBSHAREDIR}/auto-load/usr/lib/${MACH64} |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
161 |
mkdir -p ${GCCUSRSHAREDIR}/python/libstdcxx/v6 |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
162 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
163 |
cp -p ${LIBDIR}/libstdc++.so.6.0.17-gdb.py ${GDBSHAREDIR}/auto-load/usr/lib/ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
164 |
cp -p ${LIB64DIR}/libstdc++.so.6.0.17-gdb.py ${GDBSHAREDIR}/auto-load/usr/lib/${MACH64} |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
165 |
cp -p ${GCCSHAREDIR}/gcc-${GCC_FULL_VERSION}/python/libstdcxx/__init__.py \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
166 |
${GCCUSRSHAREDIR}/python/libstdcxx/ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
167 |
cp -p ${GCCSHAREDIR}/gcc-${GCC_FULL_VERSION}/python/libstdcxx/v6/__init__.py \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
168 |
${GCCUSRSHAREDIR}/python/libstdcxx/v6/ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
169 |
cp -p ${GCCSHAREDIR}/gcc-${GCC_FULL_VERSION}/python/libstdcxx/v6/printers.py \ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
170 |
${GCCUSRSHAREDIR}/python/libstdcxx/v6/printers.py |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
171 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
172 |
cd ${GDBSHAREDIR}/auto-load/usr/lib/ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
173 |
${PYTHON} -m compileall . |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
174 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
175 |
cd ${GCCUSRSHAREDIR}/python/libstdcxx/ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
176 |
${PYTHON} -m compileall . |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
177 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
178 |
cd ${GCCUSRSHAREDIR}/python/libstdcxx/v6/ |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
179 |
${PYTHON} -m compileall . |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
180 |
|
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
181 |
echo "... Done." |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
182 |
echo"" |
bcf516ed6959
17349731 GCC 4.7.3 should ship stripped binaries
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
183 |
exit 0 |