head	1.31;
access;
symbols
	REL9_0_0:1.31
	REL9_1_ALPHA1:1.31
	REL9_0_RC1:1.31
	REL9_0_BETA4:1.31
	REL9_0_STABLE:1.31.0.14
	REL9_0_BETA3:1.31
	REL9_0_BETA2:1.31
	REL7_4_29:1.21
	REL8_0_25:1.27
	REL8_1_21:1.27
	REL8_2_17:1.28
	REL8_3_11:1.30
	REL8_4_4:1.31
	REL9_0_BETA1:1.31
	REL9_0_ALPHA5_BRANCH:1.31.0.12
	REL9_0_ALPHA5:1.31
	REL7_4_28:1.21
	REL8_0_24:1.27
	REL8_1_20:1.27
	REL8_2_16:1.28
	REL8_3_10:1.30
	REL8_4_3:1.31
	REL9_0_ALPHA4:1.31
	REL9_0_ALPHA4_BRANCH:1.31.0.10
	REL8_5_ALPHA3:1.31
	REL8_5_ALPHA3_BRANCH:1.31.0.8
	REL7_4_27:1.21
	REL8_0_23:1.27
	REL8_1_19:1.27
	REL8_2_15:1.28
	REL8_3_9:1.30
	REL8_4_2:1.31
	REL8_5_ALPHA2:1.31
	REL8_5_ALPHA2_BRANCH:1.31.0.6
	REL7_4_26:1.21
	REL8_0_22:1.27
	REL8_1_18:1.27
	REL8_2_14:1.28
	REL8_3_8:1.30
	REL8_4_1:1.31
	REL8_5_ALPHA1:1.31
	REL8_5_ALPHA1_BRANCH:1.31.0.4
	REL8_4_STABLE:1.31.0.2
	REL8_4_0:1.31
	REL8_4_RC2:1.31
	REL8_4_RC1:1.31
	REL8_4_BETA2:1.31
	REL8_4_BETA1:1.31
	REL7_4_25:1.21
	REL8_0_21:1.27
	REL8_1_17:1.27
	REL8_2_13:1.28
	REL8_3_7:1.30
	REL7_4_24:1.21
	REL8_0_20:1.27
	REL8_1_16:1.27
	REL8_2_12:1.28
	REL8_3_6:1.30
	REL7_4_23:1.21
	REL8_0_19:1.27
	REL8_1_15:1.27
	REL8_2_11:1.28
	REL8_3_5:1.30
	REL7_4_22:1.21
	REL8_0_18:1.27
	REL8_1_14:1.27
	REL8_2_10:1.28
	REL8_3_4:1.30
	REL7_4_21:1.21
	REL8_0_17:1.27
	REL8_1_13:1.27
	REL8_2_9:1.28
	REL8_3_3:1.30
	REL7_4_20:1.21
	REL8_0_16:1.27
	REL8_1_12:1.27
	REL8_2_8:1.28
	REL8_3_2:1.30
	REL8_2_7:1.28
	REL8_3_1:1.30
	REL8_3_STABLE:1.30.0.2
	REL8_3_0:1.30
	REL8_3_RC2:1.30
	REL7_3_21:1.10
	REL7_4_19:1.21
	REL8_0_15:1.27
	REL8_1_11:1.27
	REL8_2_6:1.28
	REL8_3_RC1:1.30
	REL8_3_BETA4:1.30
	REL8_3_BETA3:1.30
	REL8_3_BETA2:1.30
	REL8_3_BETA1:1.30
	REL7_3_20:1.10
	REL7_4_18:1.21
	REL8_0_14:1.27
	REL8_1_10:1.27
	REL8_2_5:1.28
	REL7_3_19:1.10
	REL7_4_17:1.21
	REL8_0_13:1.27
	REL8_1_9:1.27
	REL8_2_4:1.28
	REL8_0_12:1.27
	REL8_1_8:1.27
	REL8_2_3:1.28
	REL7_3_18:1.10
	REL7_4_16:1.21
	REL8_0_11:1.27
	REL8_1_7:1.27
	REL8_2_2:1.28
	REL8_0_10:1.27
	REL8_1_6:1.27
	REL8_2_1:1.28
	REL7_4_15:1.21
	REL7_3_17:1.10
	REL8_2_STABLE:1.28.0.2
	REL8_2_0:1.28
	REL8_2_RC1:1.28
	REL8_2_BETA3:1.28
	REL8_2_BETA2:1.28
	REL8_1_5:1.27
	REL8_0_9:1.27
	REL7_4_14:1.21
	REL7_3_16:1.10
	REL8_2_BETA1:1.28
	REL7_3_15:1.10
	REL7_4_13:1.21
	REL8_0_8:1.27
	REL8_1_4:1.27
	REL7_3_14:1.10
	REL7_4_12:1.21
	REL8_0_7:1.27
	REL8_1_3:1.27
	REL7_3_13:1.10
	REL7_4_11:1.21
	REL8_0_6:1.27
	REL8_1_2:1.27
	REL7_3_12:1.10
	REL7_4_10:1.21
	REL8_0_5:1.27
	REL8_1_1:1.27
	REL8_1_STABLE:1.27.0.6
	REL8_1_0:1.27
	REL8_1_0RC1:1.27
	REL8_1_0BETA4:1.27
	REL8_1_0BETA3:1.27
	REL7_3_11:1.10
	REL7_4_9:1.21
	REL8_0_4:1.27
	REL8_1_0BETA2:1.27
	REL8_1_0BETA1:1.27
	REL7_2_8:1.9
	REL7_3_10:1.10
	REL7_4_8:1.21
	REL8_0_3:1.27
	REL8_0_2:1.27
	REL7_2_7:1.9
	REL7_3_9:1.10
	REL7_4_7:1.21
	REL8_0_1:1.27
	REL8_0_STABLE:1.27.0.4
	REL8_0_0:1.27.0.2
	REL8_0_0RC5:1.27
	REL8_0_0RC4:1.27
	REL8_0_0RC3:1.27
	REL8_0_0RC2:1.27
	REL8_0_0RC1:1.27
	REL8_0_0BETA5:1.25
	REL8_0_0BETA4:1.25
	REL7_4_6:1.21
	REL7_3_8:1.10
	REL7_2_6:1.9
	REL8_0_0BETA3:1.25
	REL8_0_0BETA2:1.25
	REL7_2_5:1.9
	REL7_4_5:1.21
	REL7_3_7:1.10
	REL7_4_4:1.21
	REL8_0_0BETA1:1.25
	REL7_4_3:1.21
	REL7_4_2:1.21
	REL7_3_6:1.10
	REL7_4_1:1.21
	REL7_3_5:1.10
	REL7_4:1.21
	REL7_4_RC2:1.21
	REL7_4_STABLE:1.21.0.2
	REL7_4_RC1:1.21
	REL7_4_BETA5:1.21
	REL7_4_BETA4:1.18
	REL7_4_BETA3:1.14
	REL7_4_BETA2:1.12
	WIN32_DEV:1.11.0.2
	REL7_4_BETA1:1.11
	REL7_3_4:1.10
	REL7_3_2:1.10
	REL7_2_4:1.9
	REL7_3_STABLE:1.10.0.2
	REL7_2_3:1.9
	REL7_2_STABLE:1.9.0.4
	REL7_2:1.9
	REL7_2_RC2:1.9
	REL7_2_RC1:1.9
	REL7_2_BETA5:1.9
	REL7_2_BETA4:1.9
	REL7_2_BETA3:1.9
	REL7_2_BETA2:1.9
	REL7_2_BETA1:1.9
	REL7_1_2:1.9
	REL7_1_STABLE:1.9.0.2
	REL7_1_BETA:1.9
	REL7_1_BETA3:1.9
	REL7_1_BETA2:1.9
	REL7_1:1.9
	release-6-3:1.5;
locks; strict;
comment	@# @;


1.31
date	2008.10.29.16.06.47;	author petere;	state Exp;
branches;
next	1.30;

1.30
date	2007.09.21.02.33.46;	author tgl;	state Exp;
branches;
next	1.29;

1.29
date	2006.12.12.19.43.19;	author petere;	state Exp;
branches;
next	1.28;

1.28
date	2006.03.11.04.38.41;	author momjian;	state Exp;
branches;
next	1.27;

1.27
date	2004.12.02.18.11.40;	author momjian;	state Exp;
branches;
next	1.26;

1.26
date	2004.11.27.05.03.26;	author momjian;	state Exp;
branches;
next	1.25;

1.25
date	2004.04.26.04.04.42;	author momjian;	state Exp;
branches;
next	1.24;

1.24
date	2004.04.23.18.15.55;	author momjian;	state Exp;
branches;
next	1.23;

1.23
date	2004.03.14.15.06.13;	author momjian;	state Exp;
branches;
next	1.22;

1.22
date	2004.02.11.21.44.06;	author momjian;	state Exp;
branches;
next	1.21;

1.21
date	2003.10.09.16.52.45;	author momjian;	state Exp;
branches;
next	1.20;

1.20
date	2003.10.09.14.47.59;	author momjian;	state Exp;
branches;
next	1.19;

1.19
date	2003.10.09.03.20.34;	author momjian;	state Exp;
branches;
next	1.18;

1.18
date	2003.09.27.22.23.35;	author momjian;	state Exp;
branches;
next	1.17;

1.17
date	2003.09.27.16.24.44;	author momjian;	state Exp;
branches;
next	1.16;

1.16
date	2003.09.27.15.32.48;	author momjian;	state Exp;
branches;
next	1.15;

1.15
date	2003.09.26.17.39.13;	author tgl;	state Exp;
branches;
next	1.14;

1.14
date	2003.09.13.14.49.51;	author momjian;	state Exp;
branches;
next	1.13;

1.13
date	2003.09.03.22.34.08;	author momjian;	state Exp;
branches;
next	1.12;

1.12
date	2003.08.16.15.35.51;	author momjian;	state Exp;
branches;
next	1.11;

1.11
date	2003.06.14.19.21.42;	author momjian;	state Exp;
branches
	1.11.2.1;
next	1.10;

1.10
date	2002.03.21.15.21.41;	author petere;	state Exp;
branches;
next	1.9;

1.9
date	2000.10.21.22.36.13;	author petere;	state Exp;
branches;
next	1.8;

1.8
date	2000.09.29.17.17.35;	author petere;	state Exp;
branches;
next	1.7;

1.7
date	2000.07.15.15.54.52;	author petere;	state Exp;
branches;
next	1.6;

1.6
date	98.06.12.22.26.18;	author momjian;	state dead;
branches;
next	1.5;

1.5
date	97.04.16.14.13.48;	author scrappy;	state Exp;
branches;
next	1.4;

1.4
date	97.04.11.18.53.55;	author scrappy;	state Exp;
branches;
next	1.3;

1.3
date	97.04.04.11.22.56;	author scrappy;	state Exp;
branches;
next	1.2;

1.2
date	97.04.04.09.01.21;	author scrappy;	state Exp;
branches;
next	1.1;

1.1
date	97.04.04.07.58.59;	author scrappy;	state Exp;
branches;
next	;

1.11.2.1
date	2003.09.07.04.37.12;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.31
log
@Support for Sun Studio compiler on Linux

This basically takes some build system code that was previously labeled
"Solaris" and ties it to the compiler rather than the operating system.

Author: Julius Stroffek <Julius.Stroffek@@Sun.COM>
@
text
@# $PostgreSQL: pgsql/src/template/linux,v 1.30 2007/09/21 02:33:46 tgl Exp $

# Force _GNU_SOURCE on; plperl is broken with Perl 5.8.0 otherwise
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"

# If --enable-profiling is specified, we need -DLINUX_PROFILE
PLATFORM_PROFILE_FLAGS="-DLINUX_PROFILE"

if test "$SUN_STUDIO_CC" = "yes" ; then
  CC="$CC -Xa"			# relaxed ISO C mode
  CFLAGS="-v"			# -v is like gcc -Wall
  if test "$enable_debug" != yes; then
    CFLAGS="$CFLAGS -O"		# any optimization breaks debug
  fi

  # Pick the right test-and-set (TAS) code for the Sun compiler.
  # We would like to use in-line assembler, but the compiler
  # requires *.il files to be on every compile line, making
  # the build system too fragile.
  case $host_cpu in
    sparc)
	need_tas=yes
	tas_file=sunstudio_sparc.s
    ;;
    i?86|x86_64)
	need_tas=yes
	tas_file=sunstudio_x86.s
    ;;
  esac
fi
@


1.30
log
@If we're gonna provide an --enable-profiling configure option, surely
it ought to know that you need -DLINUX_PROFILE on Linux.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/src/template/linux,v 1.29 2006/12/12 19:43:19 petere Exp $
d8 23
@


1.29
log
@Allow augmenting CPPFLAGS from the configure command line.  This generally
works, but some platform templates overwrote it without asking.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/src/template/linux,v 1.28 2006/03/11 04:38:41 momjian Exp $
d5 3
@


1.28
log
@Add CVS tag lines to files that were lacking them.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.314 2006/03/07 02:54:23 momjian Exp $
d4 1
a4 1
CPPFLAGS="-D_GNU_SOURCE"
@


1.27
log
@Don't bother adding to cflags/cppflags, just set them because configure
handles that, and make solaris debug use no optimization.
@
text
@d1 2
@


1.26
log
@Add to CPPFLAGS/CFLAGS in template files, don't over-ride them.
@
text
@d2 1
a2 1
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
@


1.25
log
@Unconditionally define:

	-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS

for all ports.  It can't hurt if they are not supported, but it makes
our job easier for porting.

Should fix Darwin compile and other platforms without mucking with the
thread detection code.
@
text
@d2 1
a2 1
CPPFLAGS="-D_GNU_SOURCE"
@


1.24
log
@Add new auto-detection of thread flags.

Allow additional thread flags to be added via port templates.

Change thread flag names to PTHREAD_CFLAGS and PTHREAD_LIBS to match new
configure script.
@
text
@a2 3

# tools/thread/thread_test must be run
PTHREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
@


1.23
log
@Mark linux as thread-enabled with new 7.5 tests.
@
text
@d5 1
a5 9
THREAD_CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
THREAD_LIBS="-lpthread"

THREAD_SUPPORT=yes
# 2004-03-14, Linux 2.4.25-1-686
STRERROR_THREADSAFE=yes
GETPWUID_THREADSAFE=no
GETHOSTBYNAME_THREADSAFE=no

@


1.22
log
@Check and set thread-safe functions separately, rather than as a single
variable.

Remove thread locking for non-thread-safe functions, instead throw a
compile error.

Platforms will have to re-run tools/thread to record their thread
safety.
@
text
@d7 7
@


1.21
log
@Remove -pipe on Linux, per reports from Peter.
@
text
@d4 1
a4 2
THREAD_SUPPORT=yes
NEED_REENTRANT_FUNCS=yes	# Debian kernel 2.2 2003-09-27
@


1.20
log
@Add -pipe compile for Linux.
@
text
@a0 2
CFLAGS="$CFLAGS -pipe"

@


1.19
log
@This centralizes the optimization defaults into configure.in, rather
than having CFLAGS= in the template files.

It uses -O2 for gcc (generated by autoconf), and -O for non-gcc, unless
the template overrides it.
@
text
@d1 2
@


1.18
log
@Mark Linux for threads.
@
text
@a0 1
CFLAGS=-O2
a7 1

@


1.17
log
@Finalize configuration of thread_test program.
@
text
@d6 1
a6 1
NEED_REENTRANT_FUNCS=yes
@


1.16
log
@Rename thread compile flag.  Move thread test program to tools/thread,
and improve tests.
@
text
@d5 2
a6 2
SUPPORTS_THREADS=yes
NEED_REENTRANT_FUNCS=yes	# verified glibc 2.1 2003-09-03
@


1.15
log
@Move -D_GNU_SOURCE hack from port header to template, so that
configure's tests see the same compilation environment as the code.
Per discussion with Stephan Szabo.
@
text
@d7 1
a7 1
THREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
@


1.14
log
@Attempt threading in this order:

 *      use non-*_r function names if they are all thread-safe
 *          (NEED_REENTRANT_FUNCS=no)
 *      use *_r functions if they exist (configure test)
 *      do our own locking and copying of non-threadsafe functions

New to this patch is the last option.
@
text
@d2 2
@


1.13
log
@Tighten casting of function call pointers for threads.
@
text
@d4 1
a4 1
NEED_REENTRANT_FUNC_NAMES=yes	# verified glibc 2.1 2003-09-03
@


1.12
log
@Make NEED_REENTRANT_FUNC_NAMES _require_ *_r functions, and add tests to
configure to report if they are not found.
@
text
@d4 1
a4 1
NEED_REENTRANT_FUNC_NAMES=yes
@


1.11
log
@Move thread os defines into template files.
@
text
@d4 1
a6 1
NEED_REENTRANT_FUNC_NAMES=yes
@


1.11.2.1
log
@Update this branch to match CVS head, includes WIN32 improvements.
@
text
@a3 1
NEED_REENTRANT_FUNC_NAMES=yes	# verified glibc 2.1 2003-09-03
d6 1
@


1.10
log
@Remove -mips2 flag, which breaks the build on some MIPS systems.

Report from Ryan Murray via Debian
@
text
@d2 6
@


1.9
log
@Move DLSUFFIX, AROPT, and CFLAGS_SL settings from template to
Makefile.port, since they are of no use to configure and much of the
library magic happens in Makefile.port anyway.

Use __alpha, not __alpha__, since the former is universally available.
Remove -DNOFIXADE from the compile command line and put it in the port
include file.
@
text
@a1 4

case $host_cpu in
  mips*)   CFLAGS="$CFLAGS -mips2";;
esac
@


1.8
log
@New unified regression test driver, test/regress makefile cleanup,
add "check" and "installcheck" targets, straighten out make variable naming
of host_os, host_cpu, etc.
@
text
@a0 1
AROPT=crs
a1 2
SHARED_LIB=-fpic
DLSUFFIX=.so
@


1.7
log
@Rename templates to match names in makefiles/Makefile.* and include/port.
Read templates after compiler is detected. Convert all templates to real
shell scripts. Rename bsd->openbsd, alpha->osf.
@
text
@a7 1
  alpha*)  CPU=alpha;;
@


1.6
log
@template changes
@
text
@d1 9
a9 10
AROPT:crs
CFLAGS:
SHARED_LIB:-fpic
ALL:
SRCH_INC:
SRCH_LIB:
USE_LOCALE:no
DLSUFFIX:.so
YFLAGS:-d
YACC: bison -y
@


1.5
log
@Fix a problem with Linux where yacc is *really* bison -y
@
text
@@


1.4
log
@Change BACKEND to CFLAGS
@
text
@d10 1
a10 1
YACC:
@


1.3
log
@Move YACC and YFLAGS into the template files

Clean up the .sample files...comment out all sample entries except for
the localhost one
@
text
@d2 1
a2 1
BACKEND:
@


1.2
log
@Got AROPT setting backwards...correct it
@
text
@d9 2
@


1.1
log
@One helluva mess.

	Further extended Makefile.global/build/configure so that we can
have a 'template' file for each OS (and each version of OS, as in BSDi)
which is used as much as possible to generate Makefile.global

	Any future ports should look at using the template file as a basis,
before moving over to Makefile.global.

	This will most probably break alot of the ports, atho I've tried to
be very neat about it...
@
text
@d1 1
a1 1
AROPT:cq
@
