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: Building newlib and gcc for ARM Thumb2


To all who helped I appreciate it.

In the end patching the configs like below create the desired
multilibs for arm, thumb, and thumb2 and gave me a deeper
understanding of how multilibs works.  If this sort of thing is
documented well somewhere, I'd like to know where.  Looking at the
mainline gcc code and what the CodeSorcery folks have done was quite
helpful.

Thank you,

Rob Emanuele

--- proddev/vendor/gcc/current/gcc/config/arm/t-arm-elf	2009/02/03 23:22:05	2923
+++ proddev/vendor/gcc/current/gcc/config/arm/t-arm-elf	2009/02/04 18:33:29	2924
@@ -11,15 +11,15 @@
 MULTILIB_EXCEPTIONS  =
 MULTILIB_MATCHES     =

-#MULTILIB_OPTIONS      += march=armv7
-#MULTILIB_DIRNAMES     += thumb2
-#MULTILIB_EXCEPTIONS   += march=armv7* marm/*march=armv7*
-#MULTILIB_MATCHES      += march?armv7=march?armv7-a
-#MULTILIB_MATCHES      += march?armv7=march?armv7-r
-#MULTILIB_MATCHES      += march?armv7=march?armv7-m
-#MULTILIB_MATCHES      += march?armv7=mcpu?cortex-a8
-#MULTILIB_MATCHES      += march?armv7=mcpu?cortex-r4
-#MULTILIB_MATCHES      += march?armv7=mcpu?cortex-m3
+MULTILIB_OPTIONS      += march=armv7
+MULTILIB_DIRNAMES     += thumb2
+MULTILIB_EXCEPTIONS   += march=armv7* marm/*march=armv7*
+MULTILIB_MATCHES      += march?armv7=march?armv7-a
+MULTILIB_MATCHES      += march?armv7=march?armv7-r
+MULTILIB_MATCHES      += march?armv7=march?armv7-m
+MULTILIB_MATCHES      += march?armv7=mcpu?cortex-a8
+MULTILIB_MATCHES      += march?armv7=mcpu?cortex-r4
+MULTILIB_MATCHES      += march?armv7=mcpu?cortex-m3

 # MULTILIB_OPTIONS    += mcpu=ep9312
 # MULTILIB_DIRNAMES   += ep9312

On Wed, Feb 4, 2009 at 1:48 AM, Richard Earnshaw <rearnsha@arm.com> wrote:
> On Tue, 2009-02-03 at 16:41 -0500, Jeff Johnston wrote:
>> Regarding building newlib, you should know about multilibs.  Multilibs
>> are versions of the library
>> built with specific options.  The compiler determines what multilibs
>> should exist and how to build them.
>
> Hmm, if you only want to support cortex-m3 with your toolchain, you
> might be better off configuring gcc to build only for that CPU.  Try:
>
> <gcc-sources>/configure --target=arm-none-eabi --with-cpu=cortex-m3 --with-mode=thumb --disable-multilib ...
>
> Your compiler will then be built specifically for cortex-m3 and your
> build of newlib should then be optimized specifically for that CPU.
>
>
> Don't try to use a toolchain built that way for any CPU other than the
> one specified; it probably wouldn't work very well.
>
> R.
>
> NB.  I haven't actually tried the above, but it should work...
>
>


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