config/arch/powerpc.in.2
author Bryan Hundven <bryanhundven@gmail.com>
Sun Jun 26 03:26:54 2011 -0700 (2011-06-26)
changeset 2515 364b06df9e3a
parent 2467 200836977ce6
child 2675 7c288c777455
permissions -rw-r--r--
glibc: Refactor startfiles/headers into do_libc_backend()

Refactor the contents of 'do_libc_start_files()' and 'do_libc()' into a
parameterized 'do_libc_backend()'. 'do_libc_start_files()' and 'do_libc()'
call 'do_libc_backend()' with either 'libc_mode=startfiles' or
'libc_mode=final' (respectively) so that the startfiles/headers and
the final libc builds are configured and built with the same options.

One example of where this is needed is when building a mips toolchain.
Previously, if you were building an n32 toolchain, you wouldn't have
noticed an issue, because if '-mabi' is not in CFLAGS, n32 is the
default:

http://sourceware.org/git/?p=glibc-ports.git;a=blob;f=sysdeps/mips/preconfigure;hb=HEAD

But when trying to build an o32 or n64 toolchain the build would
have failed. This is because (e)glibc expects "-mabi={o32,n32,n64}" to be
in CFLAGS, but was not previously provided in 'do_libc_start_files()'.
The build failure would happen in the shared-core gcc when it tries to
configure an n64 or o32 gcc with an n32 libc.

A simpler solution would have been to just add TARGET_CFLAGS to configure
in 'do_libc_start_files()', but this way makes configure and make
consistent for both steps.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
yann@520
     1
# powerpc specific configuration file
yann@628
     2
yann@1634
     3
config ARCH_POWERPC_SPE
yann@1634
     4
    bool
yann@1634
     5
    prompt "Enable SPE support"
yann@1634
     6
    help
yann@1634
     7
      Add support for the Signal Processing Engine.  This will set up
yann@1634
     8
      the toolchain so that it supports the SPE ABI extensions. This
yann@1634
     9
      mainly targets Freescale e500 processors.
yann@1634
    10
      
yann@1634
    11
      Setting this option will append "spe" to the end of your target
yann@1634
    12
      tuple name (e.g., powerpc-e500v2-linux-gnuspe) so that the gcc
yann@2467
    13
      configure/build system will know to include SPE ABI support. It
yann@2467
    14
      will also automatically add "-mabi=spe -mspe" to your TARGET_CFLAGS,
yann@2467
    15
      and "--enable-e500_double" to your CC_EXTRA_CONFIG_ARRAY, so you
yann@2467
    16
      do not need to explicitly add them.