Honor ./configure --cc= option
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 6 Mar 2014 17:41:58 +0000 (18:41 +0100)
committerJens Axboe <axboe@fb.com>
Thu, 6 Mar 2014 21:31:30 +0000 (14:31 -0700)
The cc variable is assigned before parsing command-line options.  This
effectively ignores the ./configure --cc= option.  Move the cc variable
assigned below option parsing.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
configure

index 4a8d352cdc9080e76edced844e4350933d46a1b8..7b1d79a458a7cadcde21e821e19c34f11d7f9386 100755 (executable)
--- a/configure
+++ b/configure
@@ -130,9 +130,6 @@ output_sym() {
 targetos=""
 cpu=""
 
 targetos=""
 cpu=""
 
-cross_prefix=${cross_prefix-${CROSS_COMPILE}}
-cc="${CC-${cross_prefix}gcc}"
-
 # default options
 show_help="no"
 exit_val=0
 # default options
 show_help="no"
 exit_val=0
@@ -175,6 +172,9 @@ if test "$show_help" = "yes" ; then
   exit $exit_val
 fi
 
   exit $exit_val
 fi
 
+cross_prefix=${cross_prefix-${CROSS_COMPILE}}
+cc="${CC-${cross_prefix}gcc}"
+
 if check_define __ANDROID__ ; then
   targetos="Android"
 elif check_define __linux__ ; then
 if check_define __ANDROID__ ; then
   targetos="Android"
 elif check_define __linux__ ; then