Quantcast

Trouble building Newlib

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Trouble building Newlib

Jose Luis Honorato L.
Hi,

I'm trying to build the RedHat version of GCC for msp430 under Ubuntu
13.04, with no luck so far. I'm stuck with building newlib, it throws the
following error:

make[8]: Entering directory
`/home/arqui/mspgcc-install2/msp430-newlib/msp430-elf/430/newlib/libc/argz'
msp430-elf-gcc
-B/home/arqui/mspgcc-install2/msp430-newlib/msp430-elf/430/newlib/ -isystem
/home/arqui/mspgcc-install2/msp430-newlib/msp430-elf/430/newlib/targ-include
-isystem /home/arqui/mspgcc-install2/newlib/src/newlib/libc/include
-B/home/arqui/mspgcc-install2/msp430-newlib/msp430-elf/430/libgloss/msp430
-L/home/arqui/mspgcc-install2/msp430-newlib/msp430-elf/430/libgloss/libnosys
-L/home/arqui/mspgcc-install2/newlib/src/libgloss/msp430  -mcpu=msp430
-DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\"
-DPACKAGE_VERSION=\"2.1.0\" -DPACKAGE_STRING=\"newlib\ 2.1.0\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I.
-I../../../../../../newlib/src/newlib/libc/argz -Os
-DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY -ffunction-sections -fdata-sections
 -mOs  -DMISSING_SYSCALL_NAMES -fno-builtin      -g -O2  -mcpu=msp430 -c -o
lib_a-dummy.o `test -f 'dummy.c' || echo
'../../../../../../newlib/src/newlib/libc/argz/'`dummy.c

Assembler messages:
Fatal error: unrecognised argument to -mcpu option 'msp430'

I'm building it based on these instructions:
http://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=Install:redhat .
Both binutils and gcc were built with no errors.

The commands I ran up to that point are the following:

### binutils ###
################

BINUTILS_PREFIX='binutils-2.24'
wget http://ftp.gnu.org/gnu/binutils/$BINUTILS_PREFIX.tar.gz

tar xvf $BINUTILS_PREFIX.tar.gz

mkdir -p msp430-binutils

# Configure Binutils
cd msp430-binutils

# We need to build binutils for the msp430
../$BINUTILS_PREFIX/configure --target=msp430-elf

 # build binutils
make

# Do the install as root (e.g., sudo)
sudo make install
cd ..

### GCC ###
###########
mkdir -p gcc-trunk
cd gcc-trunk
#  Check out GCC from SVN
svn checkout svn://gcc.gnu.org/svn/gcc/trunk .
#  Get GCC prerequisites
./contrib/download_prerequisites
cd ..

mkdir -p msp430-gcc
cd msp430-gcc
# The exact path here might be different
../gcc-trunk/configure --target=msp430-elf --enable-languages=c,c++
--with-newlib=yes
#  Note, you must make all-gcc and install-gcc anything else seems to break.
make all-gcc
# Do the install as root (e.g., sudo)
sudo make install-gcc
cd ..

mkdir -p newlib
cd newlib
cvs -z 9 -d :pserver:[hidden email]:/cvs/src login
cvs -z 9 -d :pserver:[hidden email]:/cvs/src co newlib
cd ..

 mkdir -p msp430-newlib
# Now Build Newlib for MSP430 (Since this isn't going to run linux or
similar OS, we don't need syscalls)
cd msp430-newlib
../newlib/src/configure --target=msp430-elf
make
sudo make install
cd ..

Am I missing something? I saw that binutils had some changes regarding the
mcpu option detection (link:
https://www.sourceware.org/ml/binutils/2014-01/msg00295.html). Should I
specify '430' as the mcpu option? Thanks in advance for your help.

Kind regards,
Jose

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Mspgcc-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trouble building Newlib

nick clifton
Hi Jose,

> Assembler messages:
> Fatal error: unrecognised argument to -mcpu option 'msp430'

> BINUTILS_PREFIX='binutils-2.24'
> wget http://ftp.gnu.org/gnu/binutils/$BINUTILS_PREFIX.tar.gz

Try using the current mainline binutils development sources rather than
the 2.24 branch.  As in:

   wget ftp://sourceware.org/pub/binutils/snapshots/binutils.tar.bz2

Cheers
   Nick


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Mspgcc-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trouble building Newlib

Jose Luis Honorato L.
Hi Nick,

> Try using the current mainline binutils development sources rather than
the
> 2.24 branch.  As in:
>
>   wget ftp://sourceware.org/pub/binutils/snapshots/binutils.tar.bz2

I had tried that before, but it fails with this error (same with CVS
checkout):

gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.24.51/binutils  -I.
-I../../binutils-2.24.51/binutils -I../bfd
-I../../binutils-2.24.51/binutils/../bfd
-I../../binutils-2.24.51/binutils/../include
-DLOCALEDIR="\"/usr/local/share/locale\""
-Dbin_dummy_emulation=bin_vanilla_emulation  -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -Werror -g -O2 -MT bucomm.o -MD -MP -MF
.deps/bucomm.Tpo -c -o bucomm.o ../../binutils-2.24.51/binutils/bucomm.c
../../binutils-2.24.51/binutils/bucomm.c:130:7: error: expected ‘=’, ‘,’,
‘;’, ‘asm’ or ‘__attribute__’ before ‘VPARAMS’
../../binutils-2.24.51/binutils/bucomm.c:141:11: error: expected ‘=’, ‘,’,
‘;’, ‘asm’ or ‘__attribute__’ before ‘VPARAMS’
make[4]: *** [bucomm.o] Error 1
make[4]: Leaving directory
`/home/arqui/mspgcc-install2/msp430-binutils/binutils'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/home/arqui/mspgcc-install2/msp430-binutils/binutils'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/home/arqui/mspgcc-install2/msp430-binutils/binutils'
make[1]: *** [all-binutils] Error 2
make[1]: Leaving directory `/home/arqui/mspgcc-install2/msp430-binutils'
make: *** [all] Error 2

Any clues?

Jose

On Mon, Mar 17, 2014 at 1:40 PM, Nicholas Clifton <[hidden email]> wrote:

> Hi Jose,
>
>
>> Assembler messages:
>> Fatal error: unrecognised argument to -mcpu option 'msp430'
>
>
>> BINUTILS_PREFIX='binutils-2.24'
>> wget http://ftp.gnu.org/gnu/binutils/$BINUTILS_PREFIX.tar.gz
>
>
> Try using the current mainline binutils development sources rather than
the
> 2.24 branch.  As in:
>
>   wget ftp://sourceware.org/pub/binutils/snapshots/binutils.tar.bz2
>
> Cheers
>   Nick
>

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Mspgcc-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trouble building Newlib

nick clifton
Hi Jose,

   Sorry - I did not mean to drop the ball on this one.

>>    wget ftp://sourceware.org/pub/binutils/snapshots/binutils.tar.bz2
>
> I had tried that before, but it fails with this error (same with CVS
> checkout):
> .deps/bucomm.Tpo -c -o bucomm.o ../../binutils-2.24.51/binutils/bucomm.c
> ../../binutils-2.24.51/binutils/bucomm.c:130:7: error: expected ‘=’, ‘,’,
> ‘;’, ‘asm’ or ‘__attribute__’ before ‘VPARAMS’

So it does!  Those snapshot sources are bogus. :-(  I think that they
are being retrieved from the the old CVS repository, not the new GIT
repository.  Please could you try checking out the sources using git
instead.  ie:

git clone git://sourceware.org/git/binutils-gdb.git


Cheers
   Nick


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Mspgcc-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Loading...