This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: newlib does not pick up the right cross-compiling gcc


On Sat, Feb 06, 2010 at 04:59:38AM +0100, Ralf Corsepius wrote:
> On 02/05/2010 06:40 PM, Josef Wolf wrote:
>> On Fri, Feb 05, 2010 at 04:10:24PM +0100, Josef Wolf wrote:
>>
>>> [ ... ] This works fine up to the versions I mentioned above.
>>
>> Sorry, I removed the version information by accident. My last successful
>> build is binutils-2.16, gcc-3.3.6 and newlib-1.14.0
>
> Pretty old ... ;)

Well, anything newer failed to build. But I got it working now by removing
the --enable-targets=m68k-ieee option when building binutils. Too bad, all
the error messages did not give the slightest hint what was wrong. The guys
over there at the binutils list helped me to figure out that this option
actually was caused my problems. (See the thread started with
http://sourceware.org/ml/binutils/2010-02/msg00089.html)

Without the --enable-targets option, I can build the current versions of the
toolchain: binutils-2.20, gcc-4.4.3 and newlib-1.18.0. I have not checked
(yet) whether the code that this toolchain generates actually works, though.

>>> If I try anything newer, I get failures again.
>>
>> For example, if I use newlib-1.18.0, I get this failure:
>>
>> m68k-unknown-elf-gcc -B/var/tmp/builds/crossgcc/build/newlib/m68k-unknown-elf/m5200/newlib/ -isystem /var/tmp/builds/crossgcc/build/newlib/m68k-unknown-elf/m5200/newlib/targ-include -isystem /var/tmp/builds/crossgcc/src/newlib-1.18.0/newlib/libc/include -B/var/tmp/builds/crossgcc/build/newlib/m68k-unknown-elf/m5200/libgloss/m68k -L/var/tmp/builds/crossgcc/build/newlib/m68k-unknown-elf/m5200/libgloss/libnosys -L/var/tmp/builds/crossgcc/src/newlib-1.18.0/libgloss/m68k  -m5200 -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.18.0\" -DPACKAGE_STRING=\"newlib\ 1.18.0\" -DPACKAGE_BUGREPORT=\"\" -I. -I/var/tmp/builds/crossgcc/src/newlib-1.18.0/newlib/libc/machine/m68k -DCOMPACT_CTYPE -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES -fno-builtin     -DCOMPACT_CTYPE -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES -fno-builtin   -O2 -g  -m5200 -c -o lib_a-memcpy.o `test -f 'memcpy.S' || echo '/var/tmp/builds/crossgcc/src/newlib-1.18.0/newlib/libc/ma
> chine/m68k/'`memcpy.S
>> /var/tmp/builds/crossgcc/src/newlib-1.18.0/newlib/libc/machine/m68k/memcpy.S: Assembler messages:
>> /var/tmp/builds/crossgcc/src/newlib-1.18.0/newlib/libc/machine/m68k/memcpy.S:93: Error: invalid instruction for this architecture; needs 68000 or higher -- statement `dbra %d0,1b' ignored
>> /var/tmp/builds/crossgcc/src/newlib-1.18.0/newlib/libc/machine/m68k/memcpy.S:106: Error: invalid instruction for this architecture; needs 68000 or higher -- statement `dbra %d1,1b' ignored
>
> -m5200 a coldfire-cpu?

Yeah, seems that was wrong autodetected. I never ever specified anything
with coldfire.

> Seems to me, as if your m68k-*binutils and/or m68k-*gcc is/are too old to 
> be able to build newlib-1.18.0. IIRC, gcc-3.3.6 didn't support the 
> coldfire, but coldfire support was added to gcc some time during the 
> gcc-4.x release series (Unfortunately, I don't recall the details).

Last time I was messing around with the cross-toolchain, I (and other people
over there on the bdm mailing list) was using gcc-3.3.2. And at that time
coldfire support was already available in binutils, gcc, newlib and even
gdb.

> You could try bootstrap'ing the whole toolchain with current binutils and 
> gcc+newlib.

Of course, I tried that, but it failed because of the --enable-targets
option.

BTW: At first glance the new toolchain seems to generate code about 10%
larger than the old toolchain.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]