From 31a520d0850081b3cec3d9fbd122798af1096e42 Mon Sep 17 00:00:00 2001 From: axilirator Date: Thu, 16 Jul 2015 17:47:18 +0600 Subject: [PATCH] Downgrade versions, texinfo patch --- README | 16 ++++-- build.sh | 22 +++---- download.sh | 7 +-- gcc-texinfo5.patch | 108 +++++++++++++++++++++++++++++++++++ gnu-arm-build-texinfo5.patch | 11 ++++ LICENSE => gpl-3.0.txt | 0 6 files changed, 143 insertions(+), 21 deletions(-) create mode 100644 gcc-texinfo5.patch create mode 100644 gnu-arm-build-texinfo5.patch rename LICENSE => gpl-3.0.txt (100%) diff --git a/README b/README index 8987739..e6994ba 100644 --- a/README +++ b/README @@ -1,18 +1,20 @@ -=== GNU ARM TOOLCHAIN INSTALLER === -=== FOR OSMOCOM-BB === +GNU ARM TOOLCHAIN INSTALLER +=========================== +=== FOR OSMOCOM-BB This latest version works with: * gcc-4.5.2.tar.bz2 * binutils-2.21.1a.tar.bz2 * newlib-1.19.0.tar.gz - * texinfo-4.13a This version of the installer was tested with Ubuntu. Debian should work also. But there is at one point in the download.sh script an aptitude command. You can just ignore this with other systems, but nevertheless, you need to install this library. -To install +=== INSTALL -1. Download the latest installer gnu-arm-installer-v0.1.tar.gz and then extract by typing: +Make sure that you already have installed following packages: build-essential libgmp3-dev libmpfr-dev libx11-6 libx11-dev flex bison libncurses5 libncurses5-dbg libncurses5-dev libncursesw5 libncursesw5-dbg libncursesw5-dev zlibc zlib1g-dev libmpfr4 libmpc-dev. + +1. Download the latest installer: git clone https://github.com/axilirator/gnu-arm-installer.git cd gnu-arm-installer @@ -26,4 +28,6 @@ License: GPL v3 (http://www.gnu.org/copyleft/gpl.html) This script was originally written by Waipot Ngamsaad from mcuprogramming.com: -svn checkout http://hobbycode.googlecode.com/svn/trunk/gnu-arm-installer gnu-arm-installer \ No newline at end of file +svn checkout http://hobbycode.googlecode.com/svn/trunk/gnu-arm-installer gnu-arm-installer + +Patch written by Marcello Pogliani . \ No newline at end of file diff --git a/build.sh b/build.sh index 39bdc85..b2995f8 100755 --- a/build.sh +++ b/build.sh @@ -5,8 +5,8 @@ SRCDIR=$ROOT/src BUILDDIR=$ROOT/build PREFIX=$ROOT/install -GCC_SRC=gcc-4.8.2.tar.bz2 -GCC_VERSION=4.8.2 +GCC_SRC=gcc-4.5.2.tar.bz2 +GCC_VERSION=4.5.2 GCC_DIR=gcc-$GCC_VERSION BINUTILS_SRC=binutils-2.21.1a.tar.bz2 @@ -17,13 +17,11 @@ NEWLIB_SRC=newlib-1.19.0.tar.gz NEWLIB_VERSION=1.19.0 NEWLIB_DIR=newlib-$NEWLIB_VERSION -TARGET_TRIPLET=arm-none-eabi - #INSIGHT_SRC=insight-6.8-1.tar.bz2 #INSIGHT_VERSION=6.8-1 #INSIGHT_DIR=insight-$INSIGHT_VERSION -echo "I will build an $TARGET_TRIPLET cross-compiler: +echo "I will build an arm-elf cross-compiler: Prefix: $PREFIX Sources: $SRCDIR @@ -62,6 +60,8 @@ unpack_source $(basename $GCC_SRC) unpack_source $(basename $BINUTILS_SRC) unpack_source $(basename $NEWLIB_SRC) #unpack_source $(basename $INSIGHT_SRC) +# Patch for texinfo5. Adapted from Marcello Pogliani +patch -p1 < ../gcc-texinfo5.patch ) # Set the PATH to include the binaries we're going to build. @@ -82,7 +82,7 @@ cd $SRCDIR/$BINUTILS_DIR mkdir -p $BUILDDIR/$BINUTILS_DIR cd $BUILDDIR/$BINUTILS_DIR -$SRCDIR/$BINUTILS_DIR/configure --target=$TARGET_TRIPLET --prefix=$PREFIX \ +$SRCDIR/$BINUTILS_DIR/configure --target=arm-elf --prefix=$PREFIX \ --enable-interwork --enable-threads=posix --enable-multilib --with-float=soft --disable-werror \ && make all install @@ -92,7 +92,7 @@ $SRCDIR/$BINUTILS_DIR/configure --target=$TARGET_TRIPLET --prefix=$PREFIX \ # Stage 2: Patch the GCC multilib rules, then build the gcc compiler only # ( -MULTILIB_CONFIG=$SRCDIR/$GCC_DIR/gcc/config/arm/t-$TARGET_TRIPLET +MULTILIB_CONFIG=$SRCDIR/$GCC_DIR/gcc/config/arm/t-arm-elf echo " @@ -104,7 +104,7 @@ MULTILIB_DIRNAMES += normal interwork mkdir -p $BUILDDIR/$GCC_DIR cd $BUILDDIR/$GCC_DIR -$SRCDIR/$GCC_DIR/configure --target=$TARGET_TRIPLET --prefix=$PREFIX \ +$SRCDIR/$GCC_DIR/configure --target=arm-elf --prefix=$PREFIX \ --enable-interwork --enable-multilib --with-float=soft --disable-werror \ --enable-languages="c,c++" --with-newlib \ --with-headers=$SRCDIR/$NEWLIB_DIR/newlib/libc/include \ @@ -127,7 +127,7 @@ cd $SRCDIR/$NEWLIB_DIR mkdir -p $BUILDDIR/$NEWLIB_DIR cd $BUILDDIR/$NEWLIB_DIR -$SRCDIR/$NEWLIB_DIR/configure --target=$TARGET_TRIPLET --prefix=$PREFIX \ +$SRCDIR/$NEWLIB_DIR/configure --target=arm-elf --prefix=$PREFIX \ --enable-interwork --enable-multilib --with-float=soft --disable-werror \ && make all install @@ -154,7 +154,7 @@ make all install #cd $BUILDDIR/$INSIGHT_DIR -#$SRCDIR/$INSIGHT_DIR/configure --target=$TARGET_TRIPLET --prefix=$PREFIX \ +#$SRCDIR/$INSIGHT_DIR/configure --target=arm-elf --prefix=$PREFIX \ # --enable-interwork --enable-multilib --with-float=soft --disable-werror \ # && make all install @@ -164,6 +164,6 @@ make all install export PATH=$OLD_PATH echo " -Build complete! Add $PREFIX/bin to your PATH to make $TARGET_TRIPLET-gcc and friends +Build complete! Add $PREFIX/bin to your PATH to make arm-elf-gcc and friends accessible directly. " diff --git a/download.sh b/download.sh index b5c6375..ede64b7 100755 --- a/download.sh +++ b/download.sh @@ -1,7 +1,6 @@ -sudo apt-get install libmpfr-dev texinfo +rm -rf src mkdir src/ install/ build/ -rm src/* -wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2 -O src/gcc-4.8.2.tar.bz2 +wget http://ftp.gnu.org/gnu/gcc/gcc-4.5.2/gcc-4.5.2.tar.bz2 -O src/gcc-4.5.2.tar.bz2 wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.1a.tar.bz2 -O src/binutils-2.21.1a.tar.bz2 -wget ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz -O src/newlib-1.19.0.tar.gz \ No newline at end of file +wget ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz -O src/newlib-1.19.0.tar.gz diff --git a/gcc-texinfo5.patch b/gcc-texinfo5.patch new file mode 100644 index 0000000..a393c6c --- /dev/null +++ b/gcc-texinfo5.patch @@ -0,0 +1,108 @@ +diff -rupN src/gcc-4.5.2/gcc/config/arm/t-arm-elf src/gcc-4.5.2.new/gcc/config/arm/t-arm-elf +--- src/gcc-4.5.2/gcc/config/arm/t-arm-elf 2009-08-06 16:27:45.000000000 +0200 ++++ src/gcc-4.5.2.new/gcc/config/arm/t-arm-elf 2015-01-28 20:17:14.871648910 +0100 +@@ -120,3 +120,15 @@ $(T)crtn.o: $(srcdir)/config/arm/crtn.as + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/arm/crtn.asm + ++ ++ ++MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork ++MULTILIB_DIRNAMES += normal interwork ++ ++ ++ ++ ++MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork ++MULTILIB_DIRNAMES += normal interwork ++ ++ +diff -rupN src/gcc-4.5.2/gcc/doc/cppopts.texi src/gcc-4.5.2.new/gcc/doc/cppopts.texi +--- src/gcc-4.5.2/gcc/doc/cppopts.texi 2010-04-02 21:54:46.000000000 +0200 ++++ src/gcc-4.5.2.new/gcc/doc/cppopts.texi 2015-01-28 20:17:14.919648912 +0100 +@@ -760,7 +760,7 @@ Replacement: [ ] @{ @} + Enable special code to work around file systems which only permit very + short file names, such as MS-DOS@. + +-@itemx --help ++@item --help + @itemx --target-help + @opindex help + @opindex target-help +diff -rupN src/gcc-4.5.2/gcc/doc/generic.texi src/gcc-4.5.2.new/gcc/doc/generic.texi +--- src/gcc-4.5.2/gcc/doc/generic.texi 2010-07-06 22:23:53.000000000 +0200 ++++ src/gcc-4.5.2.new/gcc/doc/generic.texi 2015-01-28 20:17:14.923648912 +0100 +@@ -1407,13 +1407,13 @@ generate these expressions anyhow, if it + not matter. The type of the operands and that of the result are + always of @code{BOOLEAN_TYPE} or @code{INTEGER_TYPE}. + +-@itemx POINTER_PLUS_EXPR ++@item POINTER_PLUS_EXPR + This node represents pointer arithmetic. The first operand is always + a pointer/reference type. The second operand is always an unsigned + integer type compatible with sizetype. This is the only binary + arithmetic operand that can operate on pointer types. + +-@itemx PLUS_EXPR ++@item PLUS_EXPR + @itemx MINUS_EXPR + @itemx MULT_EXPR + These nodes represent various binary arithmetic operations. +diff -rupN src/gcc-4.5.2/gcc/doc/invoke.texi src/gcc-4.5.2.new/gcc/doc/invoke.texi +--- src/gcc-4.5.2/gcc/doc/invoke.texi 2010-09-08 19:36:40.000000000 +0200 ++++ src/gcc-4.5.2.new/gcc/doc/invoke.texi 2015-01-28 20:17:14.915648912 +0100 +@@ -4875,11 +4875,11 @@ Dump after duplicating the computed goto + @option{-fdump-rtl-ce3} enable dumping after the three + if conversion passes. + +-@itemx -fdump-rtl-cprop_hardreg ++@item -fdump-rtl-cprop_hardreg + @opindex fdump-rtl-cprop_hardreg + Dump after hard register copy propagation. + +-@itemx -fdump-rtl-csa ++@item -fdump-rtl-csa + @opindex fdump-rtl-csa + Dump after combining stack adjustments. + +@@ -4890,11 +4890,11 @@ Dump after combining stack adjustments. + @option{-fdump-rtl-cse1} and @option{-fdump-rtl-cse2} enable dumping after + the two common sub-expression elimination passes. + +-@itemx -fdump-rtl-dce ++@item -fdump-rtl-dce + @opindex fdump-rtl-dce + Dump after the standalone dead code elimination passes. + +-@itemx -fdump-rtl-dbr ++@item -fdump-rtl-dbr + @opindex fdump-rtl-dbr + Dump after delayed branch scheduling. + +@@ -4939,7 +4939,7 @@ Dump after the initialization of the reg + @opindex fdump-rtl-initvals + Dump after the computation of the initial value sets. + +-@itemx -fdump-rtl-into_cfglayout ++@item -fdump-rtl-into_cfglayout + @opindex fdump-rtl-into_cfglayout + Dump after converting to cfglayout mode. + +@@ -4969,7 +4969,7 @@ Dump after removing redundant mode switc + @opindex fdump-rtl-rnreg + Dump after register renumbering. + +-@itemx -fdump-rtl-outof_cfglayout ++@item -fdump-rtl-outof_cfglayout + @opindex fdump-rtl-outof_cfglayout + Dump after converting from cfglayout mode. + +@@ -4981,7 +4981,7 @@ Dump after the peephole pass. + @opindex fdump-rtl-postreload + Dump after post-reload optimizations. + +-@itemx -fdump-rtl-pro_and_epilogue ++@item -fdump-rtl-pro_and_epilogue + @opindex fdump-rtl-pro_and_epilogue + Dump after generating the function pro and epilogues. + diff --git a/gnu-arm-build-texinfo5.patch b/gnu-arm-build-texinfo5.patch new file mode 100644 index 0000000..f0b84e9 --- /dev/null +++ b/gnu-arm-build-texinfo5.patch @@ -0,0 +1,11 @@ +--- /tmp/gnu-arm-build.2.sh 2011-09-07 13:32:31.000000000 +0200 ++++ gnu-arm-build.2.sh 2015-01-28 19:50:06.527599084 +0100 +@@ -60,6 +60,8 @@ + unpack_source $(basename $BINUTILS_SRC) + unpack_source $(basename $NEWLIB_SRC) + #unpack_source $(basename $INSIGHT_SRC) ++# Patch for texinfo5. Adapted from Marcello Pogliani ++patch -p1 < ../gcc-texinfo5.patch + ) + + # Set the PATH to include the binaries we're going to build. diff --git a/LICENSE b/gpl-3.0.txt similarity index 100% rename from LICENSE rename to gpl-3.0.txt