GCC 4.7.1 toolset works with trunk, 1.1 - General Discussion and Assistance - CHDK Forum

GCC 4.7.1 toolset works with trunk, 1.1

  • 0 Replies
  • 1911 Views
GCC 4.7.1 toolset works with trunk, 1.1
« on: 17 / August / 2012, 08:05:14 »
Advertisements
Downloaded tarballs:
to be installed: binutils 2.22  gcc 4.7.1
to allow compilation: gcc and make of your system, gmp 5.0.5(>=4.2) mpc-1.0(>=0.8.0) mpfr 3.1.1(>=2.3.1)
my system is OpenSUSE/amd64, any Linux will do, for others you need gmake to compile CHDK.

make some directory (/opt/chdk in my case) where tools will reside and make sure you own it.
place them in some empty directory and untar:

$ for c in *.tar.bz2 ; do tar tfj $c ; done

$ cd binutils*
$ mkdir build; cd build ; ../configure --target=arm-elf --prefix=/opt/chdk
$ make ; make install
$ cd ..

all went well so far, lets get to gcc

$ cd gcc*

patch gcc as follows (uncomment two lines in .gcc/config/arm/t-arm-elf to disable interworking warnings)
# MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
# MULTILIB_DIRNAMES   += normal interwork

$ mkdir build ; cd build

$ ../configure --target=arm-elf --prefix=/opt/chdk --enable-languages=c --disable-shared \
--disable-newlib --disable-libssp

Minutes later:

configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.  Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/.  See also
http://gcc.gnu.org/install/prerequisites.html for additional info.  If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files.  They may be located in separate packages.

That gives us enough hints to do:
$ cd ..
$ ln -s ../gmp-5.0.5 gmp
$ ln -s ../mpfr-3.1.1 mpfr
$ ln -s ../mpc-1.0 mpc
$ cd build
$make

minutes later...

*** Configuration arm-unknown-elf is obsolete.
*** Specify --enable-obsolete to build it anyway.
*** Support will be REMOVED in the next major release of GCC,
*** unless a maintainer comes forward.

Unless one comes forward this is the last usable GCC version... by now we do:

$ ../configure --target=arm-elf --prefix=/opt/chdk --enable-languages=c --disable-shared --disable-newlib --disable-libssp --enable-obsolete

$ make -j4 ; make install

Half-hour later:

/opt/chdk/bin/arm-elf-gcc -v
Using built-in specs.
COLLECT_GCC=/opt/chdk/bin/arm-elf-gcc
COLLECT_LTO_WRAPPER=/opt/chdk/lib/gcc/arm-elf/4.7.1/lto-wrapper
Target: arm-elf
Configured with: ../configure --target=arm-elf --prefix=/opt/chdk --enable-languages=c --disable-shared --disable-newlib --disable-libssp --enable-obsolete
Thread model: single
gcc version 4.7.1 (GCC)

it builds firzipsub of trunk and 1.1 (2086), no radical speedup, slowdown or size difference against autobuild.

Update - 9oct2012: 4.7.2 works same way
« Last Edit: 09 / October / 2012, 01:15:16 by stoemp »

 

Related Topics