@@ 15,12 15,12 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
-GNATPREFIX=$HOME/programs/gnat-native-47
-AVRADAPREFIX=$HOME/programs/avr-ada-47
+GNATPREFIX=$HOME/programs64/gnat-native-49
+AVRADAPREFIX=$HOME/programs64/avr-ada-49
TOPDIR=$PWD
-GCC_VERSION=4.7.2
-AVR_GCC_VERSION=4.7.2
+GCC_VERSION=4.9.2
+AVR_GCC_VERSION=4.9.2
LSB_REL=`lsb_release -i|tr "\t" " "|tr -s " "|cut -f3 -d" "`
if [ x"$LSB_REL" != x"" ]; then
@@ 42,8 42,8 @@ fetch_avrada()
fi
}
-# GCC 4.7.x is required for building AVR-Ada 1.2.
-build_gcc47()
+# GCC 4.[79].x is required for building AVR-Ada 1.2.
+build_gcc4()
{
fetch_avrada
@@ 57,15 57,6 @@ build_gcc47()
fi
tar zxf gcc-${GCC_VERSION}.tar.gz
- if [ -f texinfo.patch ]; then
- cd gcc-${GCC_VERSION} && patch -p0 < ../texinfo.patch || fail "gcc texinfo patch"
- patch -p0 < ../texinfo2.patch || fail "gcc texinfo2 patch"
- cd ..
- elif [ -f ../texinfo.patch ]; then
- cd gcc-${GCC_VERSION} && patch -p0 < ../../texinfo.patch || fail "gcc texinfo patch"
- patch -p0 < ../../texinfo2.patch || fail "gcc texinfo2 patch"
- cd ..
- fi
rm -rf gcc-obj-${GCC_VERSION}
mkdir gcc-obj-${GCC_VERSION} && cd gcc-obj-${GCC_VERSION} || fail "cd gcc-obj-${GCC_VERSION}"
@@ 95,8 86,8 @@ build_gcc47()
build_avrbinutils()
{
cd $TOPDIR
- if [ ! -f binutils-2.20.1a.tar.bz2 ]; then
- wget http://ftp.uni-kl.de/pub/gnu/binutils/binutils-2.20.1a.tar.bz2
+ if [ ! -f binutils-2.24.tar.bz2 ]; then
+ wget http://ftp.uni-kl.de/pub/gnu/binutils/binutils-2.24.tar.bz2
fi
if [ -f $AVRADAPREFIX/bin/avr-as ]; then
echo "avr-binutils already installed, skipping"
@@ 104,27 95,29 @@ build_avrbinutils()
fi
fetch_avrada
- rm -rf binutils-2.20.1
- tar jxf binutils-2.20.1a.tar.bz2 || fail "binutils: tar"
- cd binutils-2.20.1
- for a in ../avr-ada/patches/binutils/2.20.1/*.patch;
+ rm -rf binutils-2.24
+ tar jxf binutils-2.24.tar.bz2 || fail "binutils: tar"
+ cd binutils-2.24
+ for a in ../avr-ada/patches/binutils/2.24/*.patch;
do
patch -p0 < $a || fail "avr-binutils: patch $a"
done
- sed -i -e 's/@colophon/@@colophon/' \
- -e 's/doc@cygnus.com/doc@@cygnus.com/' bfd/doc/bfd.texinfo
+ # sed -i -e 's/@colophon/@@colophon/' \
+ # -e 's/doc@cygnus.com/doc@@cygnus.com/' bfd/doc/bfd.texinfo
cd ..
+ # sed -i.bak -e 's/\@colophon/\@\@colophon/' -e 's/doc\@cygnus.com/doc\@\@cygnus.com/' binutils-2.20.1/bfd/doc/bfd.texinfo
+ # sed -i.back -e 's/SUBDIRS = doc po/SUBDIRS = po/' binutils-2.20.1/gas/Makefile.in
rm -rf binutils-obj
mkdir binutils-obj && cd binutils-obj || fail "binutils: mkdir/cd"
- ../binutils-2.20.1/configure --target=avr --program-prefix=avr- \
+ ../binutils-2.24/configure --target=avr --program-prefix=avr- \
--disable-shared --disable-nls --enable-commonbfdlib=no \
--disable-werror \
--prefix=$AVRADAPREFIX || fail "binutils: configure"
sed -i -e 's/SUBDIRS = doc po/SUBDIRS = po/' gas/Makefile
- sed -i -e 's/SUBDIRS = doc po/SUBDIRS = po/' ../binutils-2.20.1/gas/Makefile.am
- sed -i -e 's/SUBDIRS = /SUBDIRS = #/' ../binutils-2.20.1/gas/Makefile.in
+ sed -i -e 's/SUBDIRS = doc po/SUBDIRS = po/' ../binutils-2.24/gas/Makefile.am
+ sed -i -e 's/SUBDIRS = /SUBDIRS = #/' ../binutils-2.24/gas/Makefile.in
make || fail "binutils: make"
make install || fail "binutils: make install"
}
@@ 132,7 125,7 @@ build_avrbinutils()
build_avrgcc()
{
cd $TOPDIR
- export PATH="$GNATPREFIX/bin":"$AVRADAPREFIX/bin":$PATH
+ # export PATH="$GNATPREFIX/bin":"$AVRADAPREFIX/bin":$PATH
export PATH="$AVRADAPREFIX/bin":$PATH
mkdir avr
if [ -d gcc-${AVR_GCC_VERSION} ]; then
@@ 157,8 150,9 @@ build_avrgcc()
fi
tar zxf $TOPDIR/gcc-${AVR_GCC_VERSION}.tar.gz || fail "avr-gcc: tar"
+
cd gcc-${AVR_GCC_VERSION} || fail "avr-gcc: cd"
- for a in ../../avr-ada/patches/gcc/4.7.2/*.patch;do patch -p0 < $a;done
+ for a in ../../avr-ada/patches/gcc/4.9.2/*.patch;do patch -p0 < $a;done
cd ..
rm -rf avr-gcc-obj
mkdir avr-gcc-obj && cd avr-gcc-obj || fail "avr-gcc: mkdir/cd"
@@ 224,7 218,7 @@ build_avrada()
cd ..
}
-build_gcc47
+# build_gcc47
build_avrbinutils
build_avrgcc
build_avrlibc