[arch-commits] Commit in ghc/trunk (PKGBUILD build.mk)
Vesa Kaihlavirta
vesa at archlinux.org
Wed Aug 20 05:57:54 UTC 2008
Date: Wednesday, August 20, 2008 @ 01:57:53
Author: vesa
Revision: 9868
Build with optimizations.
Added:
ghc/trunk/build.mk
Modified:
ghc/trunk/PKGBUILD
----------+
PKGBUILD | 9 +++--
build.mk | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 111 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2008-08-20 05:56:48 UTC (rev 9867)
+++ PKGBUILD 2008-08-20 05:57:53 UTC (rev 9868)
@@ -11,10 +11,11 @@
makedepends=('ghc' 'happy')
source=("http://www.haskell.org/ghc/dist/$pkgver/$pkgname-$pkgver-src.tar.bz2" \
"http://www.haskell.org/ghc/dist/$pkgver/ghc-$pkgver-src-extralibs.tar.bz2"
- network.patch)
+ network.patch build.mk)
md5sums=('43108417594be7eba0918c459e871e40'
'd199c50814188fb77355d41058b8613c'
- 'dc94374c53aff2ab2d4f6cb75a349bb0')
+ 'dc94374c53aff2ab2d4f6cb75a349bb0'
+ '7a633e9fcc882d8874373481461acadb')
build() {
#since this is a compiler, it needs itself to compile
@@ -27,8 +28,10 @@
cd libraries/network && autoreconf || return 1
cd -
+ cp $startdir/build.mk mk/build.mk
+
./configure --prefix=/usr
- make -j1 || return 1
+ make -j2 || return 1
make DESTDIR=$startdir/pkg install
install -Dm644 LICENSE ${pkgdir}/usr/share/license/ghc/license
Added: build.mk
===================================================================
--- build.mk (rev 0)
+++ build.mk 2008-08-20 05:57:53 UTC (rev 9868)
@@ -0,0 +1,105 @@
+# -----------------------------------------------------------------------------
+# A Sample build.mk
+#
+# Uncomment one of the following BuildFlavour settings to get the desired
+# overall build type, and then tweak the options in the relevant section
+# below.
+
+# Uncomment one of these to select a build profile below:
+
+# Full build with max optimisation (slow build)
+BuildFlavour = perf
+
+# Fastest build (libs unoptimised):
+#BuildFlavour = quickest
+
+# Fast build with optimised libraries:
+#BuildFlavour = quick
+
+# A development build, working on the stage 1 compiler:
+#BuildFlavour = devel1
+
+# A development build, working on the stage 2 compiler:
+#BuildFlavour = devel2
+
+# Which warnings we like to use
+MyWarningOpts = -W -fno-warn-unused-matches -fwarn-unused-imports
+
+# -------- 1. A Performance/Distribution build--------------------------------
+
+ifeq "$(BuildFlavour)" "perf"
+
+SRC_HC_OPTS = -H32m -O2
+GhcHcOpts = -Rghc-timing
+GhcLibHcOpts =
+GhcLibWays = p
+
+endif
+
+# -------- A Fast build ------------------------------------------------------
+
+ifeq "$(BuildFlavour)" "quickest"
+
+SRC_HC_OPTS = -H64m -Onot -fasm
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -Onot -fasm
+GhcLibHcOpts = -Onot -fasm
+GhcLibWays =
+SplitObjs = NO
+
+endif
+
+# -------- A Fast build with optimised libs ----------------------------------
+
+ifeq "$(BuildFlavour)" "quick"
+
+SRC_HC_OPTS = -H64m -Onot -fasm
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -Onot -fasm
+GhcLibHcOpts = -O -fasm
+GhcLibWays =
+SplitObjs = NO
+
+endif
+
+# -------- A Development build (stage 1) -------------------------------------
+
+ifeq "$(BuildFlavour)" "devel1"
+
+SRC_HC_OPTS = -H64m -O -fasm $(MyWarningOpts)
+GhcLibHcOpts = -O -dcore-lint $(MyWarningOpts)
+GhcLibWays =
+GhcStage1HcOpts = -Rghc-timing -O0 -DDEBUG
+GhcStage2HcOpts = -Rghc-timing -O -fasm
+SplitObjs = NO
+
+endif
+
+# -------- A Development build (stage 2) -------------------------------------
+
+ifeq "$(BuildFlavour)" "devel2"
+
+SRC_HC_OPTS = -H64m -O -fasm $(MyWarningOpts)
+GhcLibHcOpts = -O -dcore-lint $(MyWarningOpts)
+GhcLibWays =
+GhcStage1HcOpts = -Rghc-timing -O -fasm
+GhcStage2HcOpts = -Rghc-timing -O0 -DDEBUG
+SplitObjs = NO
+
+endif
+
+# -----------------------------------------------------------------------------
+# Other settings that might be useful
+
+# profiled RTS
+#GhcRtsCcOpts = -pg -g
+
+# Optimised/profiled RTS
+#GhcRtsCcOpts = -O2 -pg
+
+#GhcRtsWithFrontPanel = YES
+#SRC_HC_OPTS += `gtk-config --libs`
+
+# NoFib settings
+NoFibWays =
+STRIP=:
More information about the arch-commits
mailing list