Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

root/trunk/install/gdc-posix.sh

Revision 3495, 2.4 kB (checked in by Gregor, 6 months ago)

install/gdc-posix.sh: --disable-multilib when configuring GCC

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1 #!/bin/bash
2 die() {
3     echo "$1"
4     exit 1
5 }
6
7 if [ ! "$4" ]
8 then
9     echo 'Use: install/gdc-posix.sh <tango version> <GCC version> <GDC version> <DSSS version>'
10     exit 1
11 fi
12
13 TANGO_VERSION="$1"
14 GCC_VERSION="$2"
15 GDC_VERSION="$3"
16 DSSS_VERSION="$4"
17 BASEDIR="$PWD"
18
19 # Download various utilities
20 mkdir -p dl
21 cd dl || die "Failed to cd to dl."
22
23 wget -c http://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/gcc-core-$GCC_VERSION.tar.bz2 ||
24     die "Failed to download gcc $GCC_VERSION"
25
26 if [ "`echo $GDC_VERSION | grep '^r'`" ]
27 then
28     svn co -$GDC_VERSION https://dgcc.svn.sourceforge.net/svnroot/dgcc/trunk/d/ d-$GDC_VERSION ||
29         die "Failed to download gdc $GDC_VERSION"
30 else
31     wget -c http://downloads.sourceforge.net/dgcc/gdc-$GDC_VERSION-src.tar.bz2 ||
32         die "Failed to download gdc $GDC_VERSION"
33     tar jxf gdc-$GDC_VERSION-src.tar.bz2 ||
34         die "Failed to extract gdc."
35     mv d d-$GDC_VERSION
36 fi
37
38 wget -c http://svn.dsource.org/projects/dsss/downloads/$DSSS_VERSION/dsss-$DSSS_VERSION.tar.bz2 ||
39     die "Failed to download dsss $DSSS_VERSION"
40 cd ..
41
42 # Now build prereqs
43 mkdir -p build
44 cd build || die "Failed to cd to build"
45
46 # build gdc
47 rm -rf gcc-$GCC_VERSION
48 tar jxf ../dl/gcc-core-$GCC_VERSION.tar.bz2 ||
49     die "Failed to extract gcc"
50 cd gcc-$GCC_VERSION/gcc ||
51     die "Failed to cd into gcc"
52 ln -s ../../../dl/d-$GDC_VERSION d ||
53     die "Failed to link gdc sources into gcc"
54 cd ../
55 ./gcc/d/setup-gcc.sh || die ""
56 ./configure --prefix="$BASEDIR/gdc" --enable-languages=c,d --enable-static --disable-shared --disable-multilib ||
57     die "Failed to configure gcc"
58 make all ||
59     die "Failed to build gcc"
60 make install ||
61     die "Failed to install gcc"
62 cd ..
63
64 # build DSSS
65 tar jxf ../dl/dsss-$DSSS_VERSION.tar.bz2 ||
66     die "Failed to extract dsss"
67 cd dsss-$DSSS_VERSION ||
68     die "Failed to cd into dsss"
69 PATH="$BASEDIR/gdc/bin:$PATH" make -f Makefile.gdc.posix ||
70     die "Failed to build dsss"
71 PATH="$BASEDIR/gdc/bin:$PATH" ./dsss install --prefix="$BASEDIR/dsss" ||
72     die "Failed to install dsss"
73 cd ../..
74
75
76 # finally, build Tango and bundles
77 export PATH="$BASEDIR/dsss/bin:$BASEDIR/gdc/bin:$PATH"
78 dsss build
79 echo $TANGO_VERSION'-gdc'$GDC_VERSION > version.txt
80 ./install/gdc-posix/mkinstaller.sh ||
81     die "Failed to make installer"
82 echo $TANGO_VERSION'-gdc'$GDC_VERSION'-forDSSS' > version.txt
83 ./install/gdc-posix-dsss/mkinstaller.sh ||
84     die "Failed to make installer"
Note: See TracBrowser for help on using the browser.