summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2024-03-06 21:08:43 +0000
committerAndrew Clayton <a.clayton@nginx.com>2024-03-09 00:42:27 +0000
commit9cd11133f9eaf4f31f7d1c477613d12c22774b09 (patch)
treed3cbf10ed8ec7d8aee879d381fc143b7150e777a
parente79e463556d6a08432a7008d185c958907fa4f40 (diff)
downloadunit-9cd11133f9eaf4f31f7d1c477613d12c22774b09.tar.gz
unit-9cd11133f9eaf4f31f7d1c477613d12c22774b09.tar.bz2
Remove support for Sun's Sun Studio/SunPro C compiler
We really only support building Unit with GCC and Clang. Cc: Dan Callahan <d.callahan@f5.com> Reviewed-by: Alejandro Colomar <alx@kernel.org> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
-rw-r--r--auto/atomic32
-rw-r--r--auto/cc/deps12
-rw-r--r--auto/cc/test21
-rw-r--r--src/nxt_atomic.h75
4 files changed, 0 insertions, 140 deletions
diff --git a/auto/atomic b/auto/atomic
index 7acd4667..08061e9a 100644
--- a/auto/atomic
+++ b/auto/atomic
@@ -33,38 +33,6 @@ nxt_feature_test="int main(void) {
. auto/feature
-# Solaris 10 builtin atomic operations.
-
-if [ $nxt_found = no ]; then
-
- nxt_feature="Solaris builtin atomic operations"
- nxt_feature_name=NXT_HAVE_SOLARIS_ATOMIC
- nxt_feature_run=yes
- nxt_feature_incs=
- nxt_feature_libs=
- nxt_feature_test="#include <atomic.h>
-
- int main(void) {
- ulong_t n = 0;
-
- if (atomic_cas_ulong(&n, 0, 3) != 0)
- return 1;
- if (atomic_add_long_nv(&n, 1) != 4)
- return 1;
- if (atomic_swap_ulong(&n, 5) != 4)
- return 1;
- if (n != 5)
- return 1;
- if (atomic_or_ulong_nv(&n, 2) != 7)
- return 1;
- if (atomic_and_ulong_nv(&n, 5) != 5)
- return 1;
- return 0;
- }"
- . auto/feature
-fi
-
-
if [ $nxt_found = no ]; then
$echo
$echo $0: error: no atomic operations found.
diff --git a/auto/cc/deps b/auto/cc/deps
index 11429788..8b4deca7 100644
--- a/auto/cc/deps
+++ b/auto/cc/deps
@@ -1,18 +1,6 @@
case "$NXT_CC_NAME" in
- SunC):
- nxt_gen_dep_flags() {
- $echo "-xMMD -xMF $NXT_BUILD_DIR/$nxt_dep.tmp"
- }
-
- nxt_gen_dep_post() {
- $echo -n "@sed -e 's#^.*:#$NXT_BUILD_DIR/$nxt_obj:#' "
- $echo -n "$NXT_BUILD_DIR/$nxt_dep.tmp > $NXT_BUILD_DIR/$nxt_dep"
- $echo " && rm -f $NXT_BUILD_DIR/$nxt_dep.tmp"
- }
- ;;
-
*)
nxt_gen_dep_flags() {
$echo "-MMD -MF $NXT_BUILD_DIR/$nxt_dep -MT $NXT_BUILD_DIR/$nxt_obj"
diff --git a/auto/cc/test b/auto/cc/test
index 499a2fb1..dbaa7124 100644
--- a/auto/cc/test
+++ b/auto/cc/test
@@ -46,18 +46,9 @@ then
$echo " + $NXT_CC_VERSION"
else
-if `/bin/sh -c "($CC -V)" 2>&1 | grep "Sun C" >> $NXT_AUTOCONF_ERR 2>&1`
-then
- NXT_CC_NAME=SunC
- $echo " + using Sun C compiler"
- NXT_CC_VERSION=`/bin/sh -c "($CC -V)" 2>&1 | grep "Sun C" 2>&1`
- $echo " + $NXT_CC_VERSION"
-
-else
NXT_CC_NAME=cc
NXT_CC_VERSION=cc
-fi # SunC
fi # Apple LLVM clang
fi # clang
fi # gcc
@@ -141,18 +132,6 @@ case $NXT_CC_NAME in
fi
;;
- SunC)
- nxt_have=NXT_SUNC . auto/have
-
- NXT_CFLAGS="$NXT_CFLAGS -fPIC"
- # Optimization.
- NXT_CFLAGS="$NXT_CFLAGS -O -fast"
- # Stop on warning.
- NXT_CFLAGS="$NXT_CFLAGS -errwarn=%all"
- # Debug.
- NXT_CFLAGS="$NXT_CFLAGS -g"
- ;;
-
*)
;;
diff --git a/src/nxt_atomic.h b/src/nxt_atomic.h
index 585d0be2..376375c5 100644
--- a/src/nxt_atomic.h
+++ b/src/nxt_atomic.h
@@ -67,81 +67,6 @@ typedef volatile nxt_atomic_uint_t nxt_atomic_t;
#endif
-#elif (NXT_HAVE_SOLARIS_ATOMIC) /* Solaris 10 */
-
-#include <atomic.h>
-
-typedef long nxt_atomic_int_t;
-typedef ulong_t nxt_atomic_uint_t;
-typedef volatile nxt_atomic_uint_t nxt_atomic_t;
-
-
-#define nxt_atomic_cmp_set(lock, cmp, set) \
- (atomic_cas_ulong(lock, cmp, set) == (ulong_t) cmp)
-
-
-#define nxt_atomic_xchg(lock, set) \
- atomic_add_swap(lock, set)
-
-
-#define nxt_atomic_fetch_add(value, add) \
- (atomic_add_long_nv(value, add) - add)
-
-
-#define nxt_atomic_or_fetch(ptr, val) \
- atomic_or_ulong_nv(ptr, val)
-
-
-#define nxt_atomic_and_fetch(ptr, val) \
- atomic_and_ulong_nv(ptr, val)
-
-
-/*
- * Solaris uses SPARC Total Store Order model. In this model:
- * 1) Each atomic load-store instruction behaves as if it were followed by
- * #LoadLoad, #LoadStore, and #StoreStore barriers.
- * 2) Each load instruction behaves as if it were followed by
- * #LoadLoad and #LoadStore barriers.
- * 3) Each store instruction behaves as if it were followed by
- * #StoreStore barrier.
- *
- * In X86_64 atomic instructions set a full barrier and usual instructions
- * set implicit #LoadLoad, #LoadStore, and #StoreStore barriers.
- *
- * An acquire barrier requires at least #LoadLoad and #LoadStore barriers
- * and they are provided by atomic load-store instruction.
- *
- * A release barrier requires at least #LoadStore and #StoreStore barriers,
- * so a lock release does not require an explicit barrier: all load
- * instructions in critical section is followed by implicit #LoadStore
- * barrier and all store instructions are followed by implicit #StoreStore
- * barrier.
- */
-
-#define nxt_atomic_try_lock(lock) \
- nxt_atomic_cmp_set(lock, 0, 1)
-
-
-#define nxt_atomic_release(lock) \
- *lock = 0;
-
-
-/*
- * The "rep; nop" is used instead of "pause" to omit the "[ PAUSE ]" hardware
- * capability added by linker since Solaris ld.so.1 does not know about it:
- *
- * ld.so.1: ...: fatal: hardware capability unsupported: 0x2000 [ PAUSE ]
- */
-
-#if (__i386__ || __i386 || __amd64__ || __amd64)
-#define nxt_cpu_pause() \
- __asm__ ("rep; nop")
-
-#else
-#define nxt_cpu_pause()
-#endif
-
-
/* elif (NXT_HAVE_MACOSX_ATOMIC) */
/*