Skip to contentSkip to conversation

configure: set cross_cc_FOO from cc, not host_cc

PATCH In review Alex Bennée 4 participants 4 messages Oct 19, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: set cross_cc_FOO from cc, not host_cc

The purpose of the code is to use the designated compiler for building the targets test cases. This is not actually host_cc which will still be cc even when we are cross compiling. As the tests for $cpu all use $cc we should do the same.

---
 configure | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
configure +7 -7
index 9138af37f8..d6605bd633 100755
@@ -717,37 +717,37 @@ case "$cpu" in
   ppc|ppc64|s390|s390x|sparc64|x32)
     cpu="$cpu"
     supported_cpu="yes"
-    eval "cross_cc_${cpu}=\$host_cc"
+    eval "cross_cc_${cpu}=\$cc"
   ;;
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
     supported_cpu="yes"
-    cross_cc_i386=$host_cc
+    cross_cc_i386=$cc
   ;;
   x86_64|amd64)
     cpu="x86_64"
     supported_cpu="yes"
-    cross_cc_x86_64=$host_cc
+    cross_cc_x86_64=$cc
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
     supported_cpu="yes"
-    cross_cc_arm=$host_cc
+    cross_cc_arm=$cc
   ;;
   aarch64)
     cpu="aarch64"
     supported_cpu="yes"
-    cross_cc_aarch64=$host_cc
+    cross_cc_aarch64=$cc
   ;;
   mips*)
     cpu="mips"
     supported_cpu="yes"
-    cross_cc_mips=$host_cc
+    cross_cc_mips=$cc
   ;;
   sparc|sun4[cdmuv])
     cpu="sparc"
     supported_cpu="yes"
-    cross_cc_sparc=$host_cc
+    cross_cc_sparc=$cc
   ;;
   *)
     # This will result in either an error or falling back to TCI later
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 51 lines · Alex Bennée

The purpose of the code is to use the designated compiler for building the targets test cases. This is not actually host_cc which will still be cc even when we are cross compiling. As the tests for $cpu all use $cc we should do the same.

---
 configure | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
configure +5 -6
index 9138af37f8..d6605bd633 100755
@@ -717,37 +717,37 @@ case "$cpu" in
   ppc|ppc64|s390|s390x|sparc64|x32)
     cpu="$cpu"
     supported_cpu="yes"
-    eval "cross_cc_${cpu}=\$host_cc"
+    eval "cross_cc_${cpu}=\$cc"
   ;;
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
     supported_cpu="yes"
-    cross_cc_i386=$host_cc
+    cross_cc_i386=$cc
   ;;
   x86_64|amd64)
     cpu="x86_64"
     supported_cpu="yes"
-    cross_cc_x86_64=$host_cc
+    cross_cc_x86_64=$cc
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
     supported_cpu="yes"
-    cross_cc_arm=$host_cc
+    cross_cc_arm=$cc
   ;;
   aarch64)
     cpu="aarch64"
     supported_cpu="yes"
-    cross_cc_aarch64=$host_cc
+    cross_cc_aarch64=$cc
   ;;
   mips*)
     cpu="mips"
     supported_cpu="yes"
-    cross_cc_mips=$host_cc

configure case "$cpu" in · line 753

Quoted 10 lines
configure +2 -1
+    cross_cc_mips=$cc
   ;;
   sparc|sun4[cdmuv])
     cpu="sparc"
     supported_cpu="yes"
-    cross_cc_sparc=$host_cc
+    cross_cc_sparc=$cc
   ;;
   *)
     # This will result in either an error or falling back to TCI later

Sounds like the right thing to do.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Alex Bennée
Quoted 7 lines · Alex Bennée

The purpose of the code is to use the designated compiler for building the targets test cases. This is not actually host_cc which will still be cc even when we are cross compiling. As the tests for $cpu all use $cc we should do the same.

Quoted 54 lines
---
 configure | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
configure +7 -7
index 9138af37f8..d6605bd633 100755
@@ -717,37 +717,37 @@ case "$cpu" in
   ppc|ppc64|s390|s390x|sparc64|x32)
     cpu="$cpu"
     supported_cpu="yes"
-    eval "cross_cc_${cpu}=\$host_cc"
+    eval "cross_cc_${cpu}=\$cc"
   ;;
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
     supported_cpu="yes"
-    cross_cc_i386=$host_cc
+    cross_cc_i386=$cc
   ;;
   x86_64|amd64)
     cpu="x86_64"
     supported_cpu="yes"
-    cross_cc_x86_64=$host_cc
+    cross_cc_x86_64=$cc
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
     supported_cpu="yes"
-    cross_cc_arm=$host_cc
+    cross_cc_arm=$cc
   ;;
   aarch64)
     cpu="aarch64"
     supported_cpu="yes"
-    cross_cc_aarch64=$host_cc
+    cross_cc_aarch64=$cc
   ;;
   mips*)
     cpu="mips"
     supported_cpu="yes"
-    cross_cc_mips=$host_cc
+    cross_cc_mips=$cc
   ;;
   sparc|sun4[cdmuv])
     cpu="sparc"
     supported_cpu="yes"
-    cross_cc_sparc=$host_cc
+    cross_cc_sparc=$cc
   ;;
   *)
     # This will result in either an error or falling back to TCI later
Tested-by Reviewed-by on v1 1/1
#3 lore raw
In reply to Alex Bennée
Quoted 10 lines · Alex Bennée

The purpose of the code is to use the designated compiler for building the targets test cases. This is not actually host_cc which will still be cc even when we are cross compiling. As the tests for $cpu all use $cc we should do the same.

---
 configure | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

r~