Commit baee5f75 authored by Tom Lane's avatar Tom Lane

Push responsibility for selecting out-of-line-assembler TAS code out to

the platform template files, instead of doing it directly in configure.in.
This seems cleaner, and also opens the door to making the choice be
dependent on the compiler being used.
parent 9adaf64d
...@@ -1448,22 +1448,11 @@ echo "${ECHO_T}$template" >&6 ...@@ -1448,22 +1448,11 @@ echo "${ECHO_T}$template" >&6
PORTNAME=$template PORTNAME=$template
# Pick right test-and-set (TAS) code. Most platforms have inline # Initialize default assumption that we do not need separate assembly code
# assembler code in src/include/storage/s_lock.h, so we just use # for TAS (test-and-set). This can be overridden by the template file
# a dummy file here. # when it's executed.
case $host in need_tas=no
hppa*-*-hpux*) need_tas=yes; tas_file=hpux_hppa.s ;; tas_file=dummy.s
sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;;
i?86-*-solaris*) need_tas=yes; tas_file=solaris_i386.s ;;
*) need_tas=no; tas_file=dummy.s ;;
esac
ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
if test "$need_tas" = yes ; then
TAS=tas.o
fi
...@@ -2824,6 +2813,21 @@ _ACEOF ...@@ -2824,6 +2813,21 @@ _ACEOF
#
# Set up TAS assembly code if needed; the template file has now had its
# chance to request this.
#
ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
if test "$need_tas" = yes ; then
TAS=tas.o
else
TAS=""
fi
# #
# Automatic dependency tracking # Automatic dependency tracking
# #
...@@ -18223,7 +18227,6 @@ s,@host_cpu@,$host_cpu,;t t ...@@ -18223,7 +18227,6 @@ s,@host_cpu@,$host_cpu,;t t
s,@host_vendor@,$host_vendor,;t t s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t s,@host_os@,$host_os,;t t
s,@PORTNAME@,$PORTNAME,;t t s,@PORTNAME@,$PORTNAME,;t t
s,@TAS@,$TAS,;t t
s,@docdir@,$docdir,;t t s,@docdir@,$docdir,;t t
s,@enable_nls@,$enable_nls,;t t s,@enable_nls@,$enable_nls,;t t
s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
...@@ -18240,6 +18243,7 @@ s,@EXEEXT@,$EXEEXT,;t t ...@@ -18240,6 +18243,7 @@ s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t s,@OBJEXT@,$OBJEXT,;t t
s,@CPP@,$CPP,;t t s,@CPP@,$CPP,;t t
s,@GCC@,$GCC,;t t s,@GCC@,$GCC,;t t
s,@TAS@,$TAS,;t t
s,@autodepend@,$autodepend,;t t s,@autodepend@,$autodepend,;t t
s,@INCLUDES@,$INCLUDES,;t t s,@INCLUDES@,$INCLUDES,;t t
s,@enable_thread_safety@,$enable_thread_safety,;t t s,@enable_thread_safety@,$enable_thread_safety,;t t
......
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.308 2003/11/29 19:51:16 pgsql Exp $ dnl $PostgreSQL: pgsql/configure.in,v 1.309 2003/12/23 18:40:52 tgl Exp $
dnl dnl
dnl Developers, please strive to achieve this order: dnl Developers, please strive to achieve this order:
dnl dnl
...@@ -97,21 +97,11 @@ AC_MSG_RESULT([$template]) ...@@ -97,21 +97,11 @@ AC_MSG_RESULT([$template])
PORTNAME=$template PORTNAME=$template
AC_SUBST(PORTNAME) AC_SUBST(PORTNAME)
# Pick right test-and-set (TAS) code. Most platforms have inline # Initialize default assumption that we do not need separate assembly code
# assembler code in src/include/storage/s_lock.h, so we just use # for TAS (test-and-set). This can be overridden by the template file
# a dummy file here. # when it's executed.
case $host in need_tas=no
hppa*-*-hpux*) need_tas=yes; tas_file=hpux_hppa.s ;; tas_file=dummy.s
sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;;
i?86-*-solaris*) need_tas=yes; tas_file=solaris_i386.s ;;
*) need_tas=no; tas_file=dummy.s ;;
esac
AC_CONFIG_LINKS([src/backend/port/tas.s:src/backend/port/tas/${tas_file}])
if test "$need_tas" = yes ; then
TAS=tas.o
fi
AC_SUBST(TAS)
...@@ -302,6 +292,20 @@ AC_DEFINE_UNQUOTED(PG_VERSION_STR, ...@@ -302,6 +292,20 @@ AC_DEFINE_UNQUOTED(PG_VERSION_STR,
[A string containing the version number, platform, and C compiler]) [A string containing the version number, platform, and C compiler])
#
# Set up TAS assembly code if needed; the template file has now had its
# chance to request this.
#
AC_CONFIG_LINKS([src/backend/port/tas.s:src/backend/port/tas/${tas_file}])
if test "$need_tas" = yes ; then
TAS=tas.o
else
TAS=""
fi
AC_SUBST(TAS)
# #
# Automatic dependency tracking # Automatic dependency tracking
# #
......
...@@ -4,3 +4,8 @@ if test "$GCC" != yes ; then ...@@ -4,3 +4,8 @@ if test "$GCC" != yes ; then
CC="$CC -Ae" CC="$CC -Ae"
CFLAGS="+O2" CFLAGS="+O2"
fi fi
# Pick right test-and-set (TAS) code.
case $host in
hppa*-*-hpux*) need_tas=yes; tas_file=hpux_hppa.s ;;
esac
...@@ -3,6 +3,12 @@ if test "$GCC" != yes ; then ...@@ -3,6 +3,12 @@ if test "$GCC" != yes ; then
CFLAGS="-O -v" # -v is like gcc -Wall CFLAGS="-O -v" # -v is like gcc -Wall
fi fi
# Pick right test-and-set (TAS) code.
case $host in
sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;;
i?86-*-solaris*) need_tas=yes; tas_file=solaris_i386.s ;;
esac
THREAD_SUPPORT=yes THREAD_SUPPORT=yes
NEED_REENTRANT_FUNCS=yes # 5.6 2003-09-13 NEED_REENTRANT_FUNCS=yes # 5.6 2003-09-13
THREAD_LIBS="-pthread" THREAD_LIBS="-pthread"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment