Bug #10796 Incorrect check-cpu result for powerpc gcc
Submitted: 23 May 2005 8:14 Modified: 25 May 2005 2:40
Reporter: Stewart Smith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:4.1, 5.0, 5.1 OS:powerpc linux
Assigned to: Magnus BlÄudd CPU Architecture:Any

[23 May 2005 8:14] Stewart Smith
Description:
./BUILD/check-cpu
produces
-mcpu=powerpc -march=powerpc

but -march is not a parameter to gcc for powerpc

How to repeat:
try using ./BUILD/compile-powerpc-*

Suggested fix:
Something similar to:

===== ../BUILD/check-cpu 1.7 vs edited =====
--- 1.7/BUILD/check-cpu 2005-05-10 05:59:00 +10:00
+++ edited/../BUILD/check-cpu   2005-05-23 17:29:08 +10:00
@@ -71,6 +71,7 @@
     ;;
   *ppc)
     cpu_flag="powerpc";
+    no_march=1;
     ;;
   *)
     cpu_flag="";
@@ -105,6 +106,9 @@
       cpu_flag="$cpu_flag_old"
     fi
     check_cpu_cflags="-mcpu=$cpu_flag -march=$cpu_flag"
+    if test -n "$no_march"; then
+      check_cpu_cflags="-mcpu=$cpu_flag"
+    fi
     ;;
   *)
     check_cpu_cflags=""
[25 May 2005 2:24] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/25245
[25 May 2005 2:40] Stewart Smith
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

pushed to 4.1