[19/81] move sparc_cpu arg parsing to the begining
diff mbox

Message ID 04c26d865728069117a91eb0b4f02f057bb1af2f.1249301360.git.quintela@redhat.com
State Superseded
Headers show

Commit Message

Juan Quintela Aug. 3, 2009, 12:46 p.m. UTC
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |   46 ++++++++++++++++++++++++----------------------
 1 files changed, 24 insertions(+), 22 deletions(-)

Patch
diff mbox

diff --git a/configure b/configure
index 5d69420..0f1299b 100755
--- a/configure
+++ b/configure
@@ -58,6 +58,30 @@  for opt do
   ;;
   --extra-ldflags=*) LDFLAGS="$optarg $LDFLAGS"
   ;;
+  --sparc_cpu=*)
+    sparc_cpu="$optarg"
+    case $sparc_cpu in
+    v7|v8)
+      CFLAGS="-m32 -mcpu=${sparc_cpu} -D__sparc_${sparc_cpu}__ $CFLAGS"
+      LDFLAGS="-m32 $LDFLAGS"
+      cpu="sparc"
+    ;;
+    v8plus|v8plusa)
+      CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__ $CFLAGS"
+      LDFLAGS="-m32 $LDFLAGS"
+      cpu="sparc"
+    ;;
+    v9)
+      CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__ $CFLAGS"
+      LDFLAGS="-m64 $LDFLAGS"
+      cpu="sparc64"
+    ;;
+    *)
+      echo "undefined SPARC architecture. Exiting";
+      exit 1
+    ;;
+    esac
+  ;;
   esac
 done

@@ -489,28 +513,6 @@  for opt do
   --enable-uname-release=*) uname_release="$optarg"
   ;;
   --sparc_cpu=*)
-      sparc_cpu="$optarg"
-      case $sparc_cpu in
-        v7|v8)
-          CFLAGS="-m32 -mcpu=${sparc_cpu} -D__sparc_${sparc_cpu}__ $CFLAGS"
-          LDFLAGS="-m32 $LDFLAGS"
-          cpu="sparc"
-        ;;
-        v8plus|v8plusa)
-          CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__ $CFLAGS"
-          LDFLAGS="-m32 $LDFLAGS"
-          cpu="sparc"
-        ;;
-        v9)
-          CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__ $CFLAGS"
-          LDFLAGS="-m64 $LDFLAGS"
-          cpu="sparc64"
-        ;;
-        *)
-          echo "undefined SPARC architecture. Exiting";
-          exit 1
-        ;;
-      esac
   ;;
   --enable-werror) werror="yes"
   ;;