need help with gcc 4.1.0 crosscompiler for arm

Niklaus niklaus@gmail.com
Thu Apr 13 07:25:00 GMT 2006


On 4/13/06, marty fouts <mf.danger@gmail.com> wrote:
> I'm obviously doing something stupid, and would appreciate some help.
>
> I've got an embedded application running on arm hardware. Currently it
> is built with gcc 3.4.3 and binutils 2.15.  I configure binutils and
> gcc in the obvious ways:
>
> ../binutils-2.15/configure --prefix=/usr/local/armdev-3.4.3 --target=arm-elf
>
> ../gcc-3.4.3/configure --prefix=/usr/local/armdev-3.4.3
> --target=arm-elf --enable-languages=c,c++
>
> after having patched gcc/config/arm/t-elf using this patch file:
>
> -----     patch file     -----
> --- gcc-3.4.2/gcc/config/arm/t-arm-elf  2003-09-30 03:21:41.000000000 -0700
> +++ gcc-3.4.2-p/gcc/config/arm/t-arm-elf        2004-09-17
> 09:29:58.312527908 -0700
> @@ -26,9 +26,9 @@
>  # MULTILIB_DIRNAMES   += 32bit 26bit
>  # MULTILIB_EXCEPTIONS += *mthumb/*mapcs-26*
>  #
> -# MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
> -# MULTILIB_DIRNAMES   += normal interwork
> -# MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork*
> +MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
> +MULTILIB_DIRNAMES   += normal interwork
> +MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork*
>  #
>  # MULTILIB_OPTIONS    += fno-leading-underscore/fleading-underscore
>  # MULTILIB_DIRNAMES   += elf under
> @@ -71,7 +71,7 @@
>  # Currently there is a bug somewhere in GCC's alias analysis
>  # or scheduling code that is breaking _fpmul_parts in fp-bit.c.
>  # Disabling function inlining is a workaround for this problem.
> -TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc -fno-inline
> +TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc -fno-inline -msoft-float
>
>  # Assemble startup files.
>  $(T)crti.o: $(srcdir)/config/arm/crti.asm $(GCC_PASSES)
>
> -----     end of patch file     -----
>
> GCC builds fine and builds the application fine.
>
> I try doing the same thing for gcc 4.1.0 and gcc builds fine, but when
> it finally gets around to trying to link the executable, I get error
> messages that I *think* mean that libgcc is being built with arm
> floating point instructions, for instance:
>
> /usr/local/gnuarm-4.1.0/bin/arm-elf-ld: ERROR:
> /usr/local/gnuarm-4.1.0/lib/gcc/arm-elf/4.1.0/interwork/libgcc.a(_clz.o)
> uses FPA instructions, whereas application.elf does not
>

How did you try to build gcc-4.1. Can you give the whole build command.

Can you paste relevant 10-20 lines above the error.

I tried it like this and got it installed.

 ~/gcc-4.1.0/configure  --target=arm-elf --prefix=/home/pro/armenv/
--with-float=soft --with-newlib --without-headers --enable-languages=c
--disable-nls --disable-shared --disable-thread

/home/pro/armenv/lib/gcc/arm-elf/4.1.0/libgcc.a
/home/pro/armenv/lib/gcc/arm-elf/4.1.0/thumb/libgcc.a

Please provide more details so that we can help you out.

> I've tried every configuration option I can think of to build libgcc
> without floating point, but have not managed to do so.

>
> As I said, I'm obviously doing something dumb, and any help in
> figuring out what I should do instead would be greatly appreciated.
>
> Thanks,
>
> Marty
>



More information about the Gcc-help mailing list