From 04da3418caa214af2c486e6a731cd70489ef8f14 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Wed, 5 Oct 2011 14:19:51 +1300 Subject: 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 [yann.morin.1998@anciens.enib.fr: put the custom flags at the end] Signed-off-by: "Yann E. MORIN" --- scripts/crosstool-NG.sh.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index 6b6aa0e3..4499f712 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}" -- cgit v1.2.3