scripts/build/kernel/bare-metal.sh
author Daniel Price <daniel.price@gmail.com>
Tue Nov 20 16:59:17 2012 -0800 (2012-11-20)
changeset 3126 333d3e40cbd1
parent 965 45ddf096def1
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
yann@861
     1
# This file declares functions for bare metal kernel (IE. none)
yann@861
     2
# Copyright 2008 Yann E. MORIN
yann@861
     3
# Licensed under the GPL v2. See COPYING in the root of this package
yann@861
     4
yann@965
     5
CT_DoKernelTupleValues() {
yann@965
     6
    # For bare-metal, there is no kernel part in the tuple
yann@965
     7
    CT_TARGET_KERNEL=
yann@965
     8
}
yann@965
     9
yann@861
    10
do_kernel_get() {
yann@861
    11
    :
yann@861
    12
}
yann@861
    13
yann@861
    14
do_kernel_extract() {
yann@861
    15
    :
yann@861
    16
}
yann@861
    17
yann@861
    18
do_kernel_headers() {
yann@861
    19
    :
yann@861
    20
}