Re: building gcc 4.9.0 cross compiler for msp430 fails - cannot compute suffix of object files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kai,

thanks for your help so far.


On Thu, 08 May 2014 21:30:45 +0300
Kai Ruottu <kai.ruottu@xxxxxxxxxxx> wrote:

> Normally binutils will be built separately, not in the same time with 
> GCC, during the
> "bootstrap" (first time ever) build for the toolchain. And be updated 
> separately, be
> used with many GCC versions for the same target etc.

I've built binutils separately now, as you suggested.


> > The error
> > ---------
> > make of gcc fails with the following error:
> > ...
> > checking for msp430-elf-gcc... \
> >    /usr/local/src/gcc-4.9.0-build-msp430-elf/./gcc/xgcc \
> >    -B/usr/local/src/gcc-4.9.0-build-msp430-elf/./gcc/ \
> >    -B/msp430-elf/bin/ -B/msp430-elf/lib/ \
> >    -isystem /msp430-elf/include -isystem /msp430-elf/sys-include
> > checking for suffix of object files... configure: error: \
> >    in `/usr/local/src/gcc-4.9.0-build-msp430-elf/msp430-elf/libgcc':
> > configure: error: cannot compute suffix of object files: cannot compile
> > See `config.log' for more details.
> > make[1]: *** [configure-target-libgcc] Fehler 1
> > make[1]: Leaving directory `/usr/local/src/gcc-4.9.0-build-msp430-elf'
> > make: *** [all] Fehler 2
> 
> Probably building libgcc needs some headers from the target C library 
> headers.  If it was told being newlib, then the configury system would
> have known where they are :  In the provided newlib sources,
> 'newlib' and 'libgloss' subdirs from them being symlinked into the GCC
> sources...
> So please try the normal build phases for a newlib-based (assuming 
> 'msp430-elf' uses it) cross GCC :
> 
> 1. configure, build and install GNU binutils for the target
> 
> 2. symlink the 'newlib' and 'libgloss' subdirs from the newlib-x.y.z 
> sources into the main
>      GCC source directory just like the 'gmp', 'mpfr' and 'mpc' sources...
> 
> 3. configure, build and install GCC for the target, use '--with-newlib' 
> in configure. And use
>      exactly the same '--prefix=$prefix' and '--target=$target' switches 
> as with the binutils
>      configure!
> 

I've tried to build the way you described with a little scipt that is
attached.

Now I get almost the same error message at the console, but a
different error in config.log:

checking for
msp430-elf-gcc... /usr/local/src/gcc-4.9.0-build-msp430-elf/./gcc/xgcc
-B/usr/local/src/gcc-4.9.0-build-msp430-elf/./gcc/ -nostdinc
-B/usr/local/src/gcc-4.9.0-build-msp430-elf/msp430-elf/newlib/
-isystem /usr/local/src/gcc-4.9.0-build-msp430-elf/msp430-elf/newlib/targ-include
-isystem /usr/local/src/gcc-4.9.0/newlib/libc/include
-B/usr/local/src/gcc-4.9.0-build-msp430-elf/msp430-elf/libgloss/msp430
-L/usr/local/src/gcc-4.9.0-build-msp430-elf/msp430-elf/libgloss/libnosys
-L/usr/local/src/gcc-4.9.0/libgloss/msp430
-B/usr/local/msp430-elf/msp430-elf/bin/
-B/usr/local/msp430-elf/msp430-elf/lib/
-isystem /usr/local/msp430-elf/msp430-elf/include
-isystem /usr/local/msp430-elf/msp430-elf/sys-include checking for
suffix of object files... configure: error: in
`/usr/local/src/gcc-4.9.0-build-msp430-elf/msp430-elf/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details. make[1]: ***
[configure-target-libgcc] Fehler 1 make[1]: Leaving directory
`/usr/local/src/gcc-4.9.0-build-msp430-elf' make: *** [all] Fehler 2


config.log snippet (whole file as attachment):
/tmp/cctnz0X9.s: Assembler messages:
/tmp/cctnz0X9.s:24: Error: unknown pseudo-op: `.refsym'


Hope you can help me with this one, too.

Thanks
Christoph

Attachment: config.log
Description: Binary data

export PREFIX=/usr/local/msp430-elf

# clean up files from previous builds
cd /usr/local/src
rm -rf gcc-4.9.0-build-msp430-gcc
rm -rf gcc-4.9.0
rm -rf newlib-2.1.0
read -p "Cleanup done ... check for errors, hit enter to continue"

# extract gcc and newlib
tar xfvj gcc-4.9.0.tar.bz2
tar xfvz newlib-2.1.0.tar.gz
read -p "Extraction done ... check for errors, hit enter to continue"

# download prerequisites
cd gcc-4.9.0
./contrib/download_prerequisites
read -p "Downloading prerequisites done ... check for errors, hit enter to continue"

# symlink newlib into gcc source dir
ln -s ../newlib-2.1.0/newlib
ln -s ../newlib-2.1.0/libgloss
read -p "Linking newlib done ... check for errors, hit enter to continue"

# configuring gcc in separate build dir
cd ..
mkdir gcc-4.9.0-build-msp430-elf
cd gcc-4.9.0-build-msp430-elf
../gcc-4.9.0/configure --target=msp430-elf --prefix=$PREFIX --enable-languages=c,c++ --with-newlib
read -p "Configuring gcc done ... check for errors, hit enter to continue"

make -j8
read -p "Building gcc done ... check for errors, hit enter to continue"


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux