config/libc/mingw.in
author Bryan Hundven <bryanhundven@gmail.com>
Sun Jun 26 03:26:54 2011 -0700 (2011-06-26)
changeset 2515 364b06df9e3a
parent 2017 f637b6c2162b
child 3112 6cb56b3f2d34
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>
bartvdrmeulen@2017
     1
# mingw options
bartvdrmeulen@2017
     2
yann@2444
     3
## depends on MINGW32
yann@2444
     4
##
yann@2444
     5
## select LIBC_SUPPORT_WIN32THREADS
yann@2444
     6
##
yann@2444
     7
## help The de-facto standard for Mingw distributions.
bartvdrmeulen@2017
     8
bartvdrmeulen@2017
     9
choice
bartvdrmeulen@2017
    10
    bool
bartvdrmeulen@2017
    11
    prompt "Mingw runtime version"
bartvdrmeulen@2017
    12
bartvdrmeulen@2017
    13
# Don't remove next line
bartvdrmeulen@2017
    14
# CT_INSERT_VERSION_BELOW
bartvdrmeulen@2017
    15
config MINGWRT_V_3_18
bartvdrmeulen@2017
    16
    bool
bartvdrmeulen@2017
    17
    prompt "3.18"
bartvdrmeulen@2017
    18
bartvdrmeulen@2017
    19
config MINGWRT_V_select
bartvdrmeulen@2017
    20
    bool
bartvdrmeulen@2017
    21
    prompt "Other version"
bartvdrmeulen@2017
    22
bartvdrmeulen@2017
    23
endchoice
bartvdrmeulen@2017
    24
bartvdrmeulen@2017
    25
config MINGWRT_VERSION
bartvdrmeulen@2017
    26
    string
bartvdrmeulen@2017
    27
    prompt "Mingw runtime version" if MINGWRT_V_select
bartvdrmeulen@2017
    28
# Don't remove next line
bartvdrmeulen@2017
    29
# CT_INSERT_VERSION_STRING_BELOW
bartvdrmeulen@2017
    30
    default "3.18" if MINGWRT_V_3_18
bartvdrmeulen@2017
    31
    help
bartvdrmeulen@2017
    32
      Enter the version number of the mingw runtime files to use
bartvdrmeulen@2017
    33