scripts/build/test_suite/gcc.sh
author Yann Diorcet <diorcet.yann@gmail.com>
Fri Nov 16 15:25:57 2012 +0100 (2012-11-16)
changeset 3119 1c56c03b7ed5
parent 1966 10ad7f230f4b
permissions -rw-r--r--
scripts: add BUILD/HOST extra cflags/ldflags

On some hosts, and for certain toolchains (eg. toolchain targetting
the upcoming Darwin), it may be necessary to pass arbitrary CFLAGS
and/or LDFLAGS when building the components.

And necessary infrastructure:
- EXTRA_{CFLAGS,LDFLAGS}_FOR_{BUILD,HOST} as config options
- pass those extra flags to components

Fix-up a slight typo in elf2flt at the same time (misnamed cflags).

Signed-off-by: Yann Diorcet <diorcet.yann@gmail.com>
Message-Id: <d24043276c9243a35421.1353077450@macbook-smorlat.local>
Patchwork-Id: 199645
mgl@1965
     1
# This file adds the functions to build the GCC test suite
mgl@1965
     2
# Copyright 2010 DoréDevelopment
mgl@1965
     3
# Created by Martin Lund <mgl@doredevelopment.dk>
mgl@1965
     4
# Licensed under the GPL v2. See COPYING in the root of this package
mgl@1965
     5
mgl@1965
     6
do_test_suite_gcc_get() { :; }
mgl@1965
     7
do_test_suite_gcc_extract() { :; }
mgl@1965
     8
do_test_suite_gcc_build() { :; }
mgl@1965
     9
mgl@1965
    10
# Overide functions depending on configuration
mgl@1965
    11
if [ "${CT_TEST_SUITE_GCC}" = "y" ]; then
mgl@1965
    12
mgl@1965
    13
do_test_suite_gcc_build() {
mgl@1965
    14
 
mgl@1965
    15
    CT_DoStep INFO "Installing GCC test suite"
mgl@1965
    16
yann@1966
    17
    CT_DoExecLog ALL mkdir -p "${CT_TEST_SUITE_DIR}/gcc"
yann@2830
    18
    CT_DoExecLog ALL cp -av "${CT_LIB_DIR}/contrib/gcc-test-suite/default.cfg"  \
yann@2830
    19
                            "${CT_LIB_DIR}/contrib/gcc-test-suite/Makefile"     \
yann@2830
    20
                            "${CT_LIB_DIR}/contrib/gcc-test-suite/README"       \
yann@2830
    21
                            "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/testsuite"  \
yann@2830
    22
                            "${CT_TEST_SUITE_DIR}/gcc"
yann@1966
    23
yann@1966
    24
    CT_DoExecLog ALL sed -i -r -e "s/@@DG_TARGET@@/${CT_TARGET}/g;"     \
yann@1966
    25
                         "${CT_TEST_SUITE_DIR}/gcc/Makefile"
yann@1966
    26
mgl@1965
    27
    CT_EndStep
mgl@1965
    28
}
mgl@1965
    29
mgl@1965
    30
fi # CT_TEST_SUITE_GCC