summaryrefslogtreecommitdiffstats
path: root/src/template
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:44:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:44:03 +0000
commit293913568e6a7a86fd1479e1cff8e2ecb58d6568 (patch)
treefc3b469a3ec5ab71b36ea97cc7aaddb838423a0c /src/template
parentInitial commit. (diff)
downloadpostgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.tar.xz
postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.zip
Adding upstream version 16.2.upstream/16.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/template')
-rw-r--r--src/template/aix25
-rw-r--r--src/template/cygwin22
-rw-r--r--src/template/darwin30
-rw-r--r--src/template/freebsd9
-rw-r--r--src/template/linux39
-rw-r--r--src/template/netbsd13
-rw-r--r--src/template/openbsd4
-rw-r--r--src/template/solaris31
-rw-r--r--src/template/win3211
9 files changed, 184 insertions, 0 deletions
diff --git a/src/template/aix b/src/template/aix
new file mode 100644
index 0000000..47fa899
--- /dev/null
+++ b/src/template/aix
@@ -0,0 +1,25 @@
+# src/template/aix
+
+# Set default options if using xlc. This formerly included -qsrcmsg, but that
+# option elicits internal compiler errors from xlc v16.1.0. Note: configure
+# will add -qnoansialias if the compiler accepts it, even if user specifies a
+# non-default CFLAGS setting.
+if test "$GCC" != yes ; then
+ case $host_os in
+ *)
+ CFLAGS="-O2 -qmaxmem=16384"
+ ;;
+ esac
+
+ # Due to a compiler bug, see 20171013023536.GA492146@rfd.leadboat.com for details,
+ # force restrict not to be used when compiling with xlc.
+ FORCE_DISABLE_RESTRICT=yes
+fi
+
+# Extra CFLAGS for code that will go into a shared library
+CFLAGS_SL=""
+
+# Native memset() is faster, tested on:
+# AIX 5.1 and 5.2, XLC 6.0 (IBM's cc)
+# AIX 5.3 ML3, gcc 4.0.1
+MEMSET_LOOP_LIMIT=0
diff --git a/src/template/cygwin b/src/template/cygwin
new file mode 100644
index 0000000..4a03707
--- /dev/null
+++ b/src/template/cygwin
@@ -0,0 +1,22 @@
+# src/template/cygwin
+
+# Prefer unnamed POSIX semaphores if available, unless user overrides choice
+if test x"$PREFERRED_SEMAPHORES" = x"" ; then
+ PREFERRED_SEMAPHORES=UNNAMED_POSIX
+fi
+
+SRCH_LIB="/usr/local/lib"
+
+# This is required for ppoll(2), and perhaps other things
+CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+
+# Extra CFLAGS for code that will go into a shared library
+CFLAGS_SL=""
+
+# --allow-multiple-definition is required to link pg_dump because it finds
+# pg_toupper() etc. in both libpq and pgport
+# we'd prefer to use --disable-auto-import to match MSVC linking behavior,
+# but support for it in Cygwin is too haphazard
+LDFLAGS="$LDFLAGS -Wl,--allow-multiple-definition -Wl,--enable-auto-import"
+
+DLSUFFIX=".dll"
diff --git a/src/template/darwin b/src/template/darwin
new file mode 100644
index 0000000..e8eb939
--- /dev/null
+++ b/src/template/darwin
@@ -0,0 +1,30 @@
+# src/template/darwin
+
+# Note: Darwin is the original code name for macOS, also known as OS X.
+# We still use "darwin" as the port name, partly because config.guess does.
+
+# Select where system include files should be sought
+PG_SYSROOT=`${srcdir}/src/tools/darwin_sysroot $PG_SYSROOT`
+
+if test -d "$PG_SYSROOT" ; then
+ CPPFLAGS="-isysroot $PG_SYSROOT $CPPFLAGS"
+ LDFLAGS="-isysroot $PG_SYSROOT $LDFLAGS"
+fi
+
+# Extra CFLAGS for code that will go into a shared library
+CFLAGS_SL=""
+
+# Select appropriate semaphore support. Darwin 6.0 (macOS 10.2) and up
+# support System V semaphores; before that we have to use named POSIX
+# semaphores, which are less good for our purposes because they eat a
+# file descriptor per backend per max_connection slot.
+case $host_os in
+ darwin[015].*)
+ USE_NAMED_POSIX_SEMAPHORES=1
+ ;;
+ *)
+ USE_SYSV_SEMAPHORES=1
+ ;;
+esac
+
+DLSUFFIX=".dylib"
diff --git a/src/template/freebsd b/src/template/freebsd
new file mode 100644
index 0000000..41fa4a1
--- /dev/null
+++ b/src/template/freebsd
@@ -0,0 +1,9 @@
+# src/template/freebsd
+
+# Prefer unnamed POSIX semaphores if available, unless user overrides choice
+if test x"$PREFERRED_SEMAPHORES" = x"" ; then
+ PREFERRED_SEMAPHORES=UNNAMED_POSIX
+fi
+
+# Extra CFLAGS for code that will go into a shared library
+CFLAGS_SL="-fPIC -DPIC"
diff --git a/src/template/linux b/src/template/linux
new file mode 100644
index 0000000..ec3302c
--- /dev/null
+++ b/src/template/linux
@@ -0,0 +1,39 @@
+# src/template/linux
+
+# Prefer unnamed POSIX semaphores if available, unless user overrides choice
+if test x"$PREFERRED_SEMAPHORES" = x"" ; then
+ PREFERRED_SEMAPHORES=UNNAMED_POSIX
+fi
+
+# Force _GNU_SOURCE on; plperl is broken with Perl 5.8.0 otherwise
+# This is also required for ppoll(2), and perhaps other things
+CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+
+# Extra CFLAGS for code that will go into a shared library
+CFLAGS_SL="-fPIC"
+
+# 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
diff --git a/src/template/netbsd b/src/template/netbsd
new file mode 100644
index 0000000..550e8f0
--- /dev/null
+++ b/src/template/netbsd
@@ -0,0 +1,13 @@
+# src/template/netbsd
+
+# Extra CFLAGS for code that will go into a shared library
+CFLAGS_SL="-fPIC -DPIC"
+
+# We must resolve all dynamic linking in the core server at program start.
+# Otherwise the postmaster can self-deadlock due to signals interrupting
+# resolution of calls, since NetBSD's linker takes a lock while doing that and
+# some postmaster signal handlers do things that will also acquire that lock.
+# As long as we need "-z now", might as well specify "-z relro" too.
+# While there's not a hard reason to adopt these settings for our other
+# executables, there's also little reason not to, so just add them to LDFLAGS.
+LDFLAGS="$LDFLAGS -Wl,-z,now -Wl,-z,relro"
diff --git a/src/template/openbsd b/src/template/openbsd
new file mode 100644
index 0000000..365268c
--- /dev/null
+++ b/src/template/openbsd
@@ -0,0 +1,4 @@
+# src/template/openbsd
+
+# Extra CFLAGS for code that will go into a shared library
+CFLAGS_SL="-fPIC -DPIC"
diff --git a/src/template/solaris b/src/template/solaris
new file mode 100644
index 0000000..f88b1cd
--- /dev/null
+++ b/src/template/solaris
@@ -0,0 +1,31 @@
+# src/template/solaris
+
+# Extra CFLAGS for code that will go into a shared library
+if test "$GCC" = yes ; then
+ CFLAGS_SL="-fPIC"
+else
+ CFLAGS_SL="-KPIC"
+fi
+
+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
diff --git a/src/template/win32 b/src/template/win32
new file mode 100644
index 0000000..1895f06
--- /dev/null
+++ b/src/template/win32
@@ -0,0 +1,11 @@
+# src/template/win32
+
+# Extra CFLAGS for code that will go into a shared library
+CFLAGS_SL=""
+
+# --allow-multiple-definition is required to link pg_dump because it finds
+# pg_toupper() etc. in both libpq and pgport
+# --disable-auto-import is to ensure we get MSVC-like linking behavior
+LDFLAGS="$LDFLAGS -Wl,--allow-multiple-definition -Wl,--disable-auto-import"
+
+DLSUFFIX=".dll"