Commit 12355c4c authored by James Zern's avatar James Zern

configure: add --extra-cxxflags option

same usage as --extra-cflags

Change-Id: Iff2ed7b8ebb6e51610ee0851aeec08413367ab23
parent fe776ce6
...@@ -73,6 +73,7 @@ Build options: ...@@ -73,6 +73,7 @@ Build options:
--target=TARGET target platform tuple [generic-gnu] --target=TARGET target platform tuple [generic-gnu]
--cpu=CPU optimize for a specific cpu rather than a family --cpu=CPU optimize for a specific cpu rather than a family
--extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS] --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]
--extra-cxxflags=ECXXFLAGS add ECXXFLAGS to CXXFLAGS [$CXXFLAGS]
${toggle_extra_warnings} emit harmless warnings (always non-fatal) ${toggle_extra_warnings} emit harmless warnings (always non-fatal)
${toggle_werror} treat warnings as errors, if possible ${toggle_werror} treat warnings as errors, if possible
(not available with all compilers) (not available with all compilers)
...@@ -337,6 +338,10 @@ check_add_cflags() { ...@@ -337,6 +338,10 @@ check_add_cflags() {
check_cflags "$@" && add_cflags_only "$@" check_cflags "$@" && add_cflags_only "$@"
} }
check_add_cxxflags() {
check_cxxflags "$@" && add_cxxflags_only "$@"
}
check_add_asflags() { check_add_asflags() {
log add_asflags "$@" log add_asflags "$@"
add_asflags "$@" add_asflags "$@"
...@@ -503,6 +508,9 @@ process_common_cmdline() { ...@@ -503,6 +508,9 @@ process_common_cmdline() {
--extra-cflags=*) --extra-cflags=*)
extra_cflags="${optval}" extra_cflags="${optval}"
;; ;;
--extra-cxxflags=*)
extra_cxxflags="${optval}"
;;
--enable-?*|--disable-?*) --enable-?*|--disable-?*)
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'` eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
if echo "${ARCH_EXT_LIST}" | grep "^ *$option\$" >/dev/null; then if echo "${ARCH_EXT_LIST}" | grep "^ *$option\$" >/dev/null; then
......
...@@ -723,6 +723,10 @@ EOF ...@@ -723,6 +723,10 @@ EOF
check_add_cflags ${extra_cflags} || \ check_add_cflags ${extra_cflags} || \
die "Requested extra CFLAGS '${extra_cflags}' not supported by compiler" die "Requested extra CFLAGS '${extra_cflags}' not supported by compiler"
fi fi
if [ -n "${extra_cxxflags}" ]; then
check_add_cxxflags ${extra_cxxflags} || \
die "Requested extra CXXFLAGS '${extra_cxxflags}' not supported by compiler"
fi
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment