Problem with binutils 2.18.50 and gcc 4.2.2

View: New views
3 Messages — Rating Filter:   Alert me  

Problem with binutils 2.18.50 and gcc 4.2.2

by Jeremy Bennett-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've tried to build the new binutils (2.18.50) and GCC (4.2.2) for
OpenRISC. Binutils seemed to build and install fine, but my subsequent
build of GCC blew up with a binutils problem:

        /home/jeremy/projects/openrisc/bd-gcc/./gcc/xgcc -B/home/jeremy/projects/openrisc/bd-gcc/./gcc/ -B/opt/or32/or32-uclinux/bin/ -B/opt/or32/or32-uclinux/lib/ -isystem /opt/or32/or32-uclinux/include -isystem /opt/or32/or32-uclinux/sys-include -O2  -O2 -g -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fomit-frame-pointer   -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc-4.2.2/gcc -I../../gcc-4.2.2/gcc/. -I../../gcc-4.2.2/gcc/../include -I../../gcc-4.2.2/gcc/../libcpp/include  -I../../gcc-4.2.2/gcc/../libdecnumber -I../libdecnumber -DL__mulsi3 -xassembler-with-cpp -c ../../gcc-4.2.2/gcc/config/or32/or32.S -o libgcc/./__mulsi3.o
        ../../gcc-4.2.2/gcc/config/or32/or32.S: Assembler messages:
        ../../gcc-4.2.2/gcc/config/or32/or32.S:12: Internal error!
        Assertion failure in or32_ip at ../../binutils-2.18.50/gas/config/tc-or32.c line 436.
        Please report this bug.
        make[3]: *** [libgcc/./__mulsi3.o] Error 1
        make[3]: Leaving directory `/home/jeremy/projects/openrisc/bd-gcc/gcc'
        make[2]: *** [libgcc.a] Error 2
        make[2]: Leaving directory `/home/jeremy/projects/openrisc/bd-gcc/gcc'
        make[1]: *** [all-gcc] Error 2
        make[1]: Leaving directory `/home/jeremy/projects/openrisc/bd-gcc'
        make: *** [all] Error 2

I had applied Yan Morvan's patch to binutils before building. I suspect
I have done something wrong at a fairly basic level, since this is the
first assembler instruction (l.addi). Here are the commands I used:

        tar jxf sources/binutils-2.18.50.tar.bz2
        cd binutils-2.18.50/
        bzcat -dc ../patches/binutils-2.18.50.or32_fixed_patch.bz2 | patch -p1
        bzcat -dc ../patches/binutils-2.18.50.or32_yan_patch.bz2 | patch -p1
        cd ..
        mkdir bd-binutils
        cd bd-binutils/
        ../binutils-2.18.50/configure --target=or32-uclinux --prefix=/opt/or32
        make all
        make install
        cd ..
       
        tar jxf sources/gcc-4.2.2.tar.bz2
        cd gcc-4.2.2/
        bzcat -dc ../patches/gcc-4.2.2.or32patch.bz2 | patch -p1
        cd ..
        mkdir bd-gcc
        cd bd-gcc/
        ../gcc-4.2.2/configure --target=or32-uclinux --prefix=/opt/or32 --enable-languages=c
        make all

I'm running under Fedora 9 with GCC 4.3.0:

        Linux thomas 2.6.27.15-78.2.23.fc9.i686 #1 SMP Wed Feb 11 23:53:07 EST 2009 i686 i686 i386 GNU/Linux
       
        Using built-in specs.
        Target: i386-redhat-linux
        Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-cpu=generic --build=i386-redhat-linux
        Thread model: posix
        gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC)

Any suggestions?

ATB,


Jeremy

--
Tel:      +44 (1202) 416955
Cell:     +44 (7970) 676050
SkypeID: jeremybennett
Email:   jeremy.bennett@...
Web:     www.embecosm.com


_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc

Re: Problem with binutils 2.18.50 and gcc 4.2.2

by xianfeng zeng :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, Jeremy,

I ran into the same issue last Wednesday. But I used following configuration to binutils and GCC, and then make them built passed. Have a try. Hope it is helpful.

For Binutils (2.18.50)
$BUILD_TOP/$BINUTILS_VER/configure --target=or32-uclinux --prefix=$BUILD_TOP/tools/or32-uclinux --disable-checking

For GCC (4.2.2)
$BUILD_TOP/$GCC_VER/configure --target=or32-uclinux --prefix=$BUILD_TOP/tools/or32-uclinux --with-local-prefix=$BUILD_TOP/tools/or32-uclinux/or32-uclinux --with-gnu-as --with-gnu-ld --disable-libssp --enable-languages=c

--Xianfeng

On Sat, Feb 28, 2009 at 8:20 PM, Jeremy Bennett <jeremy.bennett@...> wrote:
I've tried to build the new binutils (2.18.50) and GCC (4.2.2) for
OpenRISC. Binutils seemed to build and install fine, but my subsequent
build of GCC blew up with a binutils problem:

       /home/jeremy/projects/openrisc/bd-gcc/./gcc/xgcc -B/home/jeremy/projects/openrisc/bd-gcc/./gcc/ -B/opt/or32/or32-uclinux/bin/ -B/opt/or32/or32-uclinux/lib/ -isystem /opt/or32/or32-uclinux/include -isystem /opt/or32/or32-uclinux/sys-include -O2  -O2 -g -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fomit-frame-pointer   -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc-4.2.2/gcc -I../../gcc-4.2.2/gcc/. -I../../gcc-4.2.2/gcc/../include -I../../gcc-4.2.2/gcc/../libcpp/include  -I../../gcc-4.2.2/gcc/../libdecnumber -I../libdecnumber -DL__mulsi3 -xassembler-with-cpp -c ../../gcc-4.2.2/gcc/config/or32/or32.S -o libgcc/./__mulsi3.o
       ../../gcc-4.2.2/gcc/config/or32/or32.S: Assembler messages:
       ../../gcc-4.2.2/gcc/config/or32/or32.S:12: Internal error!
       Assertion failure in or32_ip at ../../binutils-2.18.50/gas/config/tc-or32.c line 436.
       Please report this bug.
       make[3]: *** [libgcc/./__mulsi3.o] Error 1
       make[3]: Leaving directory `/home/jeremy/projects/openrisc/bd-gcc/gcc'
       make[2]: *** [libgcc.a] Error 2
       make[2]: Leaving directory `/home/jeremy/projects/openrisc/bd-gcc/gcc'
       make[1]: *** [all-gcc] Error 2
       make[1]: Leaving directory `/home/jeremy/projects/openrisc/bd-gcc'
       make: *** [all] Error 2

I had applied Yan Morvan's patch to binutils before building. I suspect
I have done something wrong at a fairly basic level, since this is the
first assembler instruction (l.addi). Here are the commands I used:

       tar jxf sources/binutils-2.18.50.tar.bz2
       cd binutils-2.18.50/
       bzcat -dc ../patches/binutils-2.18.50.or32_fixed_patch.bz2 | patch -p1
       bzcat -dc ../patches/binutils-2.18.50.or32_yan_patch.bz2 | patch -p1
       cd ..
       mkdir bd-binutils
       cd bd-binutils/
       ../binutils-2.18.50/configure --target=or32-uclinux --prefix=/opt/or32
       make all
       make install
       cd ..

       tar jxf sources/gcc-4.2.2.tar.bz2
       cd gcc-4.2.2/
       bzcat -dc ../patches/gcc-4.2.2.or32patch.bz2 | patch -p1
       cd ..
       mkdir bd-gcc
       cd bd-gcc/
       ../gcc-4.2.2/configure --target=or32-uclinux --prefix=/opt/or32 --enable-languages=c
       make all

I'm running under Fedora 9 with GCC 4.3.0:

       Linux thomas 2.6.27.15-78.2.23.fc9.i686 #1 SMP Wed Feb 11 23:53:07 EST 2009 i686 i686 i386 GNU/Linux

       Using built-in specs.
       Target: i386-redhat-linux
       Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-cpu=generic --build=i386-redhat-linux
       Thread model: posix
       gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC)

Any suggestions?

ATB,


Jeremy

--
Tel:      +44 (1202) 416955
Cell:     +44 (7970) 676050
SkypeID: jeremybennett
Email:   jeremy.bennett@...
Web:     www.embecosm.com


_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc



--
Thanks & Best Regards,

->Xianfeng Zeng

_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc

Re: Problem with binutils 2.18.50 and gcc 4.2.2

by Florian Fainelli-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jeremy,

Le Saturday 28 February 2009 13:20:50 Jeremy Bennett, vous avez écrit :
> I've tried to build the new binutils (2.18.50) and GCC (4.2.2) for
> OpenRISC. Binutils seemed to build and install fine, but my subsequent
> build of GCC blew up with a binutils problem:

I ran into the same problem while porting OpenWrt to openrisc. Just make sure
that you did configure binutils with --disable-checking. This is what was
missing between the OpenRisc toolchain script and what OpenWrt passes to
binutils.
--
Cordialement, Florian Fainelli

OpenPattern SARL - Lead software architect
GSM: +33.632843955
109/111 rue des Côtes
78 600 Maisons-Laffitte
France
------------------------------


_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc

signature.asc (204 bytes) Download Attachment