config/binutils/binutils.in.2
author Daniel Price <daniel.price@gmail.com>
Tue Nov 20 16:59:17 2012 -0800 (2012-11-20)
changeset 3126 333d3e40cbd1
parent 3122 23fbfabd8a0f
child 3315 464128a8fc3f
permissions -rw-r--r--
scripts: refine static linking check to better guide the user

The current mechanism to check if static linking is possible, and the mesage
displayed on failure, can be puzzling to the unsuspecting user.

Also, the current implementation is not using the existing infrastructure,
and is thus difficult to enhance with new tests.

So, switch to using the standard CT_DoExecLog infra, and use four tests to
check for the host compiler:
- check we can run it
- check it can build a trivial program
- check it can statically link that program
- check if it statically link with libstdc++

That should cover most of the problems. Hopefully.

(At the same time, fix a typo in a comment)

Signed-off-by: Daniel Price <daniel.price@gmail.com>
[yann.morin.1998@free.fr: split original patch for self-contained changes]
[yann.morin.1998@free.fr: use steps to better see gcc's output]
[yann.morin.1998@free.fr: commit log]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <163f86b5216fc08c672a.1353459722@nipigon.dssd.com>
Patchwork-Id: 200536
     1 # elf2flt options
     2 
     3 if ARCH_BINFMT_FLAT
     4 
     5 comment "elf2flt"
     6 
     7 choice
     8     bool
     9     prompt "elf2flt version"
    10 # Don't remove next line
    11 # CT_INSERT_VERSION_BELOW
    12 
    13 config ELF2FLT_CVSHEAD
    14     bool
    15     prompt "CVS Head"
    16     help
    17       Grab the latest version of elf2flt from the CVS repository
    18 
    19 config ELF2FLT_CUSTOM
    20     bool
    21     prompt "Custom elf2flt"
    22     depends on EXPERIMENTAL
    23 
    24 endchoice
    25 
    26 if ELF2FLT_CUSTOM
    27 
    28 config ELF2FLT_CUSTOM_LOCATION
    29     string
    30     prompt "Full path to custom elf2flt source"
    31     default ""
    32     help
    33       Enter the path to the directory (or tarball) of your source for elf2flt,
    34       or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/elf2flt
    35 
    36 endif # ELF2FLT_CUSTOM
    37 
    38 config ELF2FLT_VERSION
    39     string
    40     default "cvs" if ELF2FLT_CVSHEAD
    41     default "custom" if ELF2FLT_CUSTOM
    42 # Don't remove next line
    43 # CT_INSERT_VERSION_STRING_BELOW
    44 
    45 config ELF2FLT_EXTRA_CONFIG_ARRAY
    46     string
    47     prompt "elf2flt extra config"
    48     default ""
    49     help
    50       Extra flags passed onto ./configure when configuring
    51       
    52       You can enter multiple arguments here, and arguments can contain spaces
    53       if they are properly quoted (or escaped, but prefer quotes). Eg.:
    54           --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
    55 
    56 endif