summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc-upc-4.0/default.nix
blob: ec3fe9054772400cf61502c06c64f26b104e3da9 (plain) (blame)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Nix expression for GCC-UPC 4.0, based on that of GCC 4.0.

{ stdenv, fetchurl, noSysDirs, bison, autoconf, gnum4
, profiledCompiler ? false
, gmp ? null , mpfr ? null
, texinfo ? null
}:

with import ../../../lib;

# GCC-UPC apparently doesn't support GCov and friends.
assert profiledCompiler == false;

stdenv.mkDerivation {
  name = "gcc-upc-4.0.3.5";
  builder = ../gcc-4.0/builder.sh;
  src = fetchurl {
    url = "ftp://ftp.intrepid.com/pub/upc/rls/upc-4.0.3.5/upc-4.0.3.5.src.tar.gz";
    sha256 = "0afnz1bz0kknhl18205bbwncyza08983ivfaagj5yl7x3nwy7prv";
  };
  
  patches = [ ./honor-cflags.patch ]
    ++ optional noSysDirs [ ./no-sys-dirs.patch ];
    
  inherit noSysDirs profiledCompiler;

  # Attributes used by `wrapGCC'.
  langC   = true ;
  langCC  = false;
  langF77 = false;
  langUPC = true;    # unused

  buildInputs = [gmp mpfr texinfo

                 # Bison is needed to build the parsers.
                 bison

		 # For some reason, `autoheader' and `m4' are needed.
		 autoconf gnum4];

  # Note: We use `--enable-maintainer-mode' so that `bison' is actually
  # run when needed.
  configureFlags = "
    --disable-multilib
    --disable-libstdcxx-pch
    --disable-libmudflap
    --with-system-zlib
    ${if stdenv.isi686 then "--with-arch=i686" else ""}
    --enable-maintainer-mode
  ";

  meta = {
    homepage = http://www.intrepid.com/upc.html;
    license = "GPL/LGPL";
    description = ''A GCC-based compiler for the Unified Parallel C (UPC)
                    language, a distributed shared memory aware variant of
		    C (see http://upc.gwu.edu/).'';
  };
}