Update host-specific options handling.
Only use host-specific compiler options when we are using the host-
provided compiler.
Change-Id: I8c245039a8c071edfc185056c2817c46cca45197
diff --git a/do-build b/do-build
index 3ddc23f..ab02aff 100755
--- a/do-build
+++ b/do-build
@@ -547,8 +547,10 @@
add_config_options "${uppercase_component}_${target_os}"
add_config_options "${uppercase_component}_${target_arch}_${target_os}"
- # Apply options that are specific to the host compiler
- if [ ! -z "$HOST_TOOLS" ]
+ # Apply options that are specific to the host compiler, if we will
+ # be using it (if we're doing a cross-compilation then we are
+ # using a compiler that we built, and these options aren't relevant).
+ if [ "$HOST" == "$BUILD" ] && [ ! -z "$HOST_TOOLS" ]
then
add_config_options "${uppercase_component}_TOOLS_${HOST_TOOLS}"
fi