File: rules

package info (click to toggle)
haskell-src-exts 1.23.1-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 25,848 kB
  • sloc: haskell: 13,707; makefile: 14
file content (32 lines) | stat: -rwxr-xr-x 1,260 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/make -f

export CABAL_PACKAGE = src-exts
export DEB_SETUP_GHC_CONFIGURE_ARGS = --ghc-options="+RTS -V0 -RTS"

# haskell-src-exts needs a lot of memory during compilation.
# Unfortunately, this amount of memory is not available on all platforms,
# and error: "virtual memory exhausted: Cannot allocate memory." could appear.
#
# In this case possible solution could be using ggc-min-expand.
# This parameter specifies the minimum percentage by which the
# garbage collector’s heap should be allowed to expand between collections.
# Tuning this may improve compilation speed; it has no effect on code generation.
#
# http://hostingfu.com/article/compiling-with-gcc-on-low-memory-vps
#  -- Dejan Latinovic <Dejan.Latinovic@imgtec.com>
DEB_BUILD_ARCH     ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)

ifneq (,$(filter $(DEB_BUILD_ARCH),armhf alpha mips mipsel hppa m68k powerpc))
       export DEB_SETUP_GHC_CONFIGURE_ARGS += --ghc-options="-O0 -optc--param -optcggc-min-expand=10"
endif

ifneq (,$(filter $(DEB_BUILD_ARCH),mips64el))
       export DEB_SETUP_GHC_CONFIGURE_ARGS += --ghc-options="-optc-mxgot"
endif

ifneq (,$(filter $(DEB_BUILD_ARCH),powerpc))
       export DEB_SETUP_GHC_CONFIGURE_ARGS += --ghc-options="-optc-O3"
endif

%:
	dh $@