diff options
author | Tom Lane | 2004-09-24 00:21:32 +0000 |
---|---|---|
committer | Tom Lane | 2004-09-24 00:21:32 +0000 |
commit | 996176d5c9d67f796109c18c2c7c4da89c85331d (patch) | |
tree | a59ec594cb2195de04a03196cb994caa5faea2e0 | |
parent | b00da0f5f0688572bfd4eb87fc08e45106e62da7 (diff) |
Fix TAS assembly stuff for Solaris/386. (I'm not in a position to
actually test this, but it couldn't be broken any worse than it was...)
-rw-r--r-- | src/include/storage/s_lock.h | 12 | ||||
-rw-r--r-- | src/template/solaris | 17 |
2 files changed, 26 insertions, 3 deletions
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index 7726b5a6dc..753ada7767 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h @@ -658,6 +658,18 @@ typedef unsigned char slock_t; #endif +/* out-of-line assembler from src/backend/port/tas/*.s */ + +#if defined(__sun) && defined(__i386) +/* + * Solaris/386 (we only get here for non-gcc case) + */ +#define HAS_TEST_AND_SET + +typedef unsigned char slock_t; +#endif + + #endif /* !defined(HAS_TEST_AND_SET) */ diff --git a/src/template/solaris b/src/template/solaris index f2e7aaa047..4b6d9cdb58 100644 --- a/src/template/solaris +++ b/src/template/solaris @@ -3,10 +3,21 @@ if test "$GCC" != yes ; then CFLAGS="-O -v" # -v is like gcc -Wall fi -# Pick right test-and-set (TAS) code. +# Pick right test-and-set (TAS) code. We need out-of-line assembler +# when not using gcc. case $host in - sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;; - i?86-*-solaris*) need_tas=yes; tas_file=solaris_i386.s ;; + sparc-*-solaris*) + if test "$GCC" != yes ; then + need_tas=yes + tas_file=solaris_sparc.s + fi + ;; + i?86-*-solaris*) + if test "$GCC" != yes ; then + need_tas=yes + tas_file=solaris_i386.s + fi + ;; esac # -D_POSIX_PTHREAD_SEMANTICS enables 5-arg getpwuid_r, among other things |