diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2011-10-05 01:19:51 (GMT) |
---|---|---|
committer | Michael Hope <michael.hope@linaro.org> | 2011-10-05 01:19:51 (GMT) |
commit | 04da3418caa214af2c486e6a731cd70489ef8f14 (patch) | |
tree | 51aa271e7ea89ab28ebc162b1acdb5e6dc2e01a9 /scripts/crosstool-NG.sh.in | |
parent | 4ddbf5c7dcbc6392f196d744d07cb94b584d01ce (diff) |
scripts: support extra host compiler flags
Allow the user to configure extra flags to pass to the host compiler
at build time. Applies to both C and C++.
Useful on Ubuntu to turn off the stack protector and fortify defaults
so the program stands a better chance of running on other distros.
Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: put the custom flags at the end]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts/crosstool-NG.sh.in')
-rw-r--r-- | scripts/crosstool-NG.sh.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index 6b6aa0e..4499f71 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -476,7 +476,8 @@ if [ -z "${CT_RESTART}" ]; then # Help gcc CT_CFLAGS_FOR_HOST= - [ "${CT_USE_PIPES}" = "y" ] && CT_CFLAGS_FOR_HOST="${CT_CFLAGS_FOR_HOST} -pipe" + [ "${CT_USE_PIPES}" = "y" ] && CT_CFLAGS_FOR_HOST+=" -pipe" + CT_CFLAGS_FOR_HOST+="${CT_EXTRA_FLAGS_FOR_HOST}" # Override the configured jobs with what's been given on the command line [ -n "${CT_JOBS}" ] && CT_PARALLEL_JOBS="${CT_JOBS}" |