From 503fb0c73d4da3828f347e9aa6529ee868dc16e7 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 22 Dec 2016 01:32:57 +0100 Subject: [PATCH] Provide ccache 3.3.3 to help speed up code builds --- build/ccache/build.sh | 66 ++++++++++++++++++++++++++++++++++ build/ccache/local.mog | 46 ++++++++++++++++++++++++ build/jeos/omnios-userland.p5m | 1 + 3 files changed, 113 insertions(+) create mode 100755 build/ccache/build.sh create mode 100644 build/ccache/local.mog diff --git a/build/ccache/build.sh b/build/ccache/build.sh new file mode 100755 index 0000000000..7d21a15f86 --- /dev/null +++ b/build/ccache/build.sh @@ -0,0 +1,66 @@ +#!/usr/bin/bash +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2011-2012 OmniTI Computer Consulting, Inc. All rights reserved. +# Copyright 2016 Jim Klimov +# Use is subject to license terms. +# +# Load support functions +. ../../lib/functions.sh + +PROG=ccache # App name +VER=3.3.3 # App version +PKG=developer/ccache # Package name (without prefix) +SUMMARY="ccache - cacher of GCC-compiled files to avoid doing the same job twice" +DESC="$SUMMARY ($VER)" + +#NO_PARALLEL_MAKE=1 +#BUILDARCH=32 + +BUILD_DEPENDS_IPS="developer/build/autoconf text/gnu-grep" +DEPENDS_IPS="system/library" + +# We build backwards here on purpose so that 32bit binaries win (for install collisions). +build() { + if [[ $BUILDARCH == "64" || $BUILDARCH == "both" ]]; then + build64 + fi + if [[ $BUILDARCH == "32" || $BUILDARCH == "both" ]]; then + build32 + fi +} + +CONFIGURE_OPTS="--sysconfdir=/etc" +CFLAGS="-D_GNU_SOURCE -D__EXTENSIONS__ --std=c99" + +init +download_source $PROG $PROG $VER +patch_source +prep_build +build +make_isa_stub +make_package +clean_up + +# Vim hints +# vim:ts=4:sw=4:et: diff --git a/build/ccache/local.mog b/build/ccache/local.mog new file mode 100644 index 0000000000..c95fc5b003 --- /dev/null +++ b/build/ccache/local.mog @@ -0,0 +1,46 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2011-2012 OmniTI Computer Consulting, Inc. All rights reserved. +# Copyright 2016 Jim Klimov +# Use is subject to license terms. +# + + drop> +license LICENSE.txt license=GPLv3,murmurhash,papowell/jhweiss,PostgreSQL,Python,zlib + +# Softlinks to simplify builds - just prepend /usr/lib/ccache to PATH +# NOTE: Since these are softlinks, a certain relative directory structure +# is expected (like rooting at /usr) when the package is installed. +# You can turn off ccache without changing runtime PATHs by exporting +# CCACHE_DISABLE=1 before a build +link target=../../bin/ccache path=usr/lib/ccache/gcc +link target=../../bin/ccache path=usr/lib/ccache/g++ +link target=../../bin/ccache path=usr/lib/ccache/cc +link target=../../bin/ccache path=usr/lib/ccache/c++ +link target=../../bin/ccache path=usr/lib/ccache/cpp + +# A few links specifically to support gcc-4.4.4-il +link target=../../bin/ccache path=usr/lib/ccache/i386-pc-solaris2.11-c++ +link target=../../bin/ccache path=usr/lib/ccache/i386-pc-solaris2.11-g++ +link target=../../bin/ccache path=usr/lib/ccache/i386-pc-solaris2.11-gcc +link target=../../bin/ccache path=usr/lib/ccache/i386-pc-solaris2.11-gcc-4.4.4 diff --git a/build/jeos/omnios-userland.p5m b/build/jeos/omnios-userland.p5m index bf55200c0f..b2b8255d2d 100644 --- a/build/jeos/omnios-userland.p5m +++ b/build/jeos/omnios-userland.p5m @@ -16,6 +16,7 @@ depend fmri=developer/build/autoconf@2.69,5.11-@PVER@ type=incorporate depend fmri=developer/build/automake@1.15,5.11-@PVER@ type=incorporate depend fmri=developer/build/gnu-make@4.2,5.11-@PVER@ type=incorporate depend fmri=developer/build/libtool@2.4,5.11-@PVER@ type=incorporate +depend fmri=developer/ccache@3.3.3,5.11-@PVER@ type=incorporate depend fmri=developer/dtrace/toolkit@0.99,5.11-@PVER@ type=incorporate depend fmri=developer/gcc44@4.4.4,5.11-@PVER@ type=incorporate depend fmri=developer/gcc44/libgmp-gcc44@5.0.2,5.11-@PVER@ type=incorporate