Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-07-16 00:09:14 +0400
committerIgor Sysoev <igor@sysoev.ru>2007-07-16 00:09:14 +0400
commitde27bce24edee11c33232c86357c398a87811420 (patch)
treed996fa6ed66c997ad676cee8bf0433ddedf6fdf3
parent830004196b10d057e786afd27f54e36f7a2ae813 (diff)
--with-cpu-opt=sparc32 and --with-cpu-opt=sparc64
-rw-r--r--auto/cc/sunc19
-rw-r--r--src/os/unix/ngx_atomic.h2
2 files changed, 17 insertions, 4 deletions
diff --git a/auto/cc/sunc b/auto/cc/sunc
index f4a1c0297..247d92a6a 100644
--- a/auto/cc/sunc
+++ b/auto/cc/sunc
@@ -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"
diff --git a/src/os/unix/ngx_atomic.h b/src/os/unix/ngx_atomic.h
index c0734e12e..ec90855ae 100644
--- a/src/os/unix/ngx_atomic.h
+++ b/src/os/unix/ngx_atomic.h
@@ -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)