]> git.kaiwu.me - nginx.git/commitdiff
--with-cpu-opt=sparc32 and --with-cpu-opt=sparc64
authorIgor Sysoev <igor@sysoev.ru>
Sun, 15 Jul 2007 20:09:14 +0000 (20:09 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sun, 15 Jul 2007 20:09:14 +0000 (20:09 +0000)
auto/cc/sunc
src/os/unix/ngx_atomic.h

index f4a1c02977d7acecbe07cacbe76850b482b6f432..247d92a6a9cf96c6db62a3f2e2911a1a5506baf5 100644 (file)
@@ -35,9 +35,6 @@ case "$NGX_MACHINE" in
     ;;
 
     sun4u | sun4v)
-        # "-xarch=v9" enables the "casa" assembler instruction
-        CPU_OPT="-xarch=v9"
-        CORE_LINK="$CORE_LINK -xarch=v9"
         NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il"
     ;;
 
@@ -81,6 +78,22 @@ case $CPU in
         CPU_OPT="$CPU_OPT -xcache=64/64/2:1024/64/16"
     ;;
 
+    sparc32)
+        # build 32-bit UltraSparc binary
+        CPU_OPT="-m32"
+        CORE_LINK="$CORE_LINK -m32"
+        CC_AUX_FLAGS="$CC_AUX_FLAGS -m32"
+        NGX_CPU_CACHE_LINE=64
+    ;;
+
+    sparc64)
+        # build 64-bit UltraSparc binary
+        CPU_OPT="-m64"
+        CORE_LINK="$CORE_LINK -m64"
+        CC_AUX_FLAGS="$CC_AUX_FLAGS -m64"
+        NGX_CPU_CACHE_LINE=64
+    ;;
+
     amd64)
         # build 64-bit amd64 binary
         CPU_OPT="-xarch=amd64"
index c0734e12e835185714b32da099cdce347656652e..ec90855ae9353571500a2e1b8cd51598d592c766 100644 (file)
@@ -136,7 +136,7 @@ ngx_atomic_fetch_add(ngx_atomic_t *value, ngx_atomic_int_t add);
 #endif
 
 
-#elif ( __sparc__ || __sparcv9 )
+#elif ( __sparc__ || __sparc || __sparcv9 )
 
 #if (NGX_PTR_SIZE == 8)