[U-Boot] [RFC] ARM: Toolchain configuration for Cortex A8 based OMAP3?

Woodruff, Richard r-woodruff2 at ti.com
Sat Aug 23 16:16:18 CEST 2008


Hi Dirk,

> Relevant parts of OMAP3 patch we talk about here (most probably
> reformated cause of copy & paste to mailtool, so just for discussion.
> Final patches will be sent by git-send-mail). Note the -lgcc_eh which
> seems to be CodeSourcery specific, and the -march=armv7a in config.mk.
>
> diff -uprN uboot_clean/Makefile uboot_beagle/Makefile
> --- uboot_clean/Makefile      2008-08-22 19:57:05.000000000 +0200
> +++ uboot_beagle/Makefile     2008-08-22 19:53:52.000000000 +0200
> @@ -141,7 +141,7 @@ ifeq ($(ARCH),ppc)
>   CROSS_COMPILE = ppc_8xx-
>   endif
>   ifeq ($(ARCH),arm)
> -CROSS_COMPILE = arm-linux-
> +CROSS_COMPILE = arm-none-linux-gnueabi-

CROSS_COMPILE can always be set as an environment variable.  It is only for convenience.  CodeSourcy from my vantage point is common enough it would nice to see it the default.  In the end it doesn't matter.

>   endif
>   ifeq ($(ARCH),i386)
>   CROSS_COMPILE = i386-linux-
> @@ -253,7 +253,7 @@ LIBBOARD = board/$(BOARDDIR)/lib$(BOARD)
>   LIBBOARD := $(addprefix $(obj),$(LIBBOARD))
>
>   # Add GCC lib
> -PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS)
> -print-libgcc-file-name`) -lgcc
> +PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS)
> -print-libgcc-file-name`) -lgcc -lgcc_eh

What is being gained by changing platform libs part?  Every now and then I update my local omap3 u-boot and I've not had to change that to get it working with codesourcy tool chains.  It might be I've not hit the issue yet.

> +PLATFORM_CPPFLAGS += -march=armv7a
> +#
> ========================================================================
> =
> +#
> +# Supply options according to compiler version
> +#
> +#
> ========================================================================
> =
> +#PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
> +PLATFORM_CPPFLAGS +=$(call cc-option)
> +PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call
> cc-option,-malignment-traps,))

Only possible issue is if the make all boards breaks.  I'm not sure what kind of magical tool chain Wolfgang which can 'make all' for old and new versions.  When we did the initial port we grabbed the cc-option from Peter Pearse ARM patches and that helped a lot in sorting out invalid options.  That has since been integrated.  Many people only use older tool chains which won't support v7.

There hasn't been much advantage in using a v7 target at the u-boot level.  It mainly gets your assembler to understand smi but that can easily be a dc.w.  We have used it mainly as an early test of the tool chain.

Probably the only time it absolutely is needed is if you have a Thumb2 only Cortex variant.

Regards,
Richard W.



More information about the U-Boot mailing list