Pass CXXFLAGS to binutils/gold.
The GOLD linker is written in C++. Pass CT_CFLAGS_FOR_HOST as
CXXFLAGS to configure so that any host specific flags are passed
through.
It feels a bit funny passing CFLAGS as CXXFLAGS, but the PPL and GCC
target rules already do the same.
Signed-off-by: Michael Hope <michael.hope@linaro.org>
(transplanted from 9cd87d279a99bd32a364f12d4b2d6d37e1d9248b)
1 # This will build and install sstrip to run on host and sstrip target files
4 do_sstrip_extract() { :; }
7 if [ "${CT_SSTRIP}" = "y" ]; then
9 CT_GetFile sstrip .c http://git.buildroot.net/buildroot/plain/toolchain/sstrip
13 # We leave the sstrip maintenance to the buildroot people:
14 # -> any fix-up goes directly there
15 # -> we don't have patches for it
16 # -> we don't need to patch it
17 # -> just create a directory in src/, and copy it there.
18 CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/sstrip"
19 CT_DoExecLog DEBUG cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip"
24 CT_DoStep INFO "Installing sstrip"
25 mkdir -p "${CT_BUILD_DIR}/build-sstrip"
26 cd "${CT_BUILD_DIR}/build-sstrip"
28 if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
29 sstrip_cflags="-static"
32 CT_DoLog EXTRA "Building sstrip"
33 CT_DoExecLog ALL "${CT_HOST}-gcc" -Wall ${sstrip_cflags} -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c"
35 CT_DoLog EXTRA "Installing sstrip"
36 CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"