1 #!/usr/bin/bash
   2 #
   3 # CDDL HEADER START
   4 #
   5 # The contents of this file are subject to the terms of the
   6 # Common Development and Distribution License, Version 1.0 only
   7 # (the "License").  You may not use this file except in compliance
   8 # with the License.
   9 #
  10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  11 # or http://www.opensolaris.org/os/licensing.
  12 # See the License for the specific language governing permissions
  13 # and limitations under the License.
  14 #
  15 # When distributing Covered Code, include this CDDL HEADER in each
  16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  17 # If applicable, add the following below this CDDL HEADER, with the
  18 # fields enclosed by brackets "[]" replaced with your own identifying
  19 # information: Portions Copyright [yyyy] [name of copyright owner]
  20 #
  21 # CDDL HEADER END
  22 #
  23 #
  24 # Copyright 2014 OmniTI Computer Consulting, Inc.  All rights reserved.
  25 # Use is subject to license terms.
  26 #
  27 # Load support functions
  28 . ../../lib/functions.sh
  29 
  30 PROG=gcc
  31 VER=4.4.4
  32 COMMIT=bcf43ddb4958677ebd7dd6daba9d526d2865df10
  33 VERHUMAN="$VER from ${COMMIT:0:10}"
  34 PKG=developer/gcc44
  35 SUMMARY="gcc ${VER} (richlowe il-4_4_4 branch)"
  36 DESC="GCC with the patches from Codesourcery/Sun Microsystems used in the 3.4.3 and 4.3.3 shipped with Solaris. The il-* branches contain the Solaris patches rebased forward across GCC versions in an attempt to bring them up to date."
  37 
  38 BUILDDIR=${PROG}-il-4_4_4
  39 
  40 export LD_LIBRARY_PATH=/opt/gcc-${VER}/lib
  41 PATH=/usr/perl5/5.16.1/bin:$PATH
  42 export PATH
  43 
  44 DEPENDS_IPS="developer/gcc44/libgmp-gcc44 developer/gcc44/libmpfr-gcc44 developer/gcc44/libmpc-gcc44
  45              developer/gnu-binutils developer/library/lint developer/linker system/library/gcc-4-runtime"
  46 BUILD_DEPENDS_IPS="$DEPENDS_IPS"
  47 
  48 NO_PARALLEL_MAKE=1
  49 
  50 # This stuff is in its own domain
  51 PKGPREFIX=""
  52 
  53 BUILDARCH=32
  54 PREFIX=/opt/gcc-${VER}
  55 reset_configure_opts
  56 CC=gcc
  57 
  58 LD_FOR_TARGET=/bin/ld
  59 export LD_FOR_TARGET
  60 LD_FOR_HOST=/bin/ld
  61 export LD_FOR_HOST
  62 LD=/bin/ld
  63 export LD
  64 
  65 CONFIGURE_OPTS_32="--prefix=/opt/gcc-${VER}"
  66 CONFIGURE_OPTS="--host i386-pc-solaris2.11 --build i386-pc-solaris2.11 --target i386-pc-solaris2.11 \
  67     --with-boot-ldflags=-R/opt/gcc-${VER}/lib \
  68     --with-gmp=/opt/gcc-${VER} --with-mpfr=/opt/gcc-${VER} --with-mpc=/opt/gcc-${VER} \
  69     --enable-languages=c,c++,fortran --without-gnu-ld --with-ld=/bin/ld \
  70     --with-as=/usr/bin/gas --with-gnu-as --with-build-time-tools=/usr/gnu/i386-pc-solaris2.11/bin"
  71 LDFLAGS32="-R/opt/gcc-${VER}/lib"
  72 export LD_OPTIONS="-zignore -zcombreloc -Bdirect -i"
  73 
  74 init
  75 download_source gcc44 ${PROG}-il-4_4_4
  76 patch_source
  77 prep_build
  78 build
  79 make_package gcc.mog
  80 clean_up
  81 
  82 # Vim hints
  83 # vim:ts=4:sw=4:et: