summaryrefslogtreecommitdiffstats
path: root/src/template/linux
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:17:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:17:33 +0000
commit5e45211a64149b3c659b90ff2de6fa982a5a93ed (patch)
tree739caf8c461053357daa9f162bef34516c7bf452 /src/template/linux
parentInitial commit. (diff)
downloadpostgresql-15-5e45211a64149b3c659b90ff2de6fa982a5a93ed.tar.xz
postgresql-15-5e45211a64149b3c659b90ff2de6fa982a5a93ed.zip
Adding upstream version 15.5.upstream/15.5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/template/linux')
-rw-r--r--src/template/linux39
1 files changed, 39 insertions, 0 deletions
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