Commit Graph

280 Commits

Author SHA1 Message Date
Tom Lane ecb0d20a9d Use unnamed POSIX semaphores, if available, on Linux and FreeBSD.
We've had support for using unnamed POSIX semaphores instead of System V
semaphores for quite some time, but it was not used by default on any
platform.  Since many systems have rather small limits on the number of
SysV semaphores allowed, it seems desirable to switch to POSIX semaphores
where they're available and don't create performance or kernel resource
problems.  Experimentation by me shows that unnamed POSIX semaphores
are at least as good as SysV semaphores on Linux, and we previously had
a report from Maksym Sobolyev that FreeBSD is significantly worse with
SysV semaphores than POSIX ones.  So adjust those two platforms to use
unnamed POSIX semaphores, if configure can find the necessary library
functions.  If this goes well, we may switch other platforms as well,
but it would be advisable to test them individually first.

It's not currently contemplated that we'd encourage users to select
a semaphore API for themselves, but anyone who wants to experiment
can add PREFERRED_SEMAPHORES=UNNAMED_POSIX (or NAMED_POSIX, or SYSV)
to their configure command line to do so.

I also tweaked configure to report which API it's selected, mainly
so that we can tell that from buildfarm reports.

I did not touch the user documentation's discussion about semaphores;
that will need some adjustment once the dust settles.

Discussion: <8536.1475704230@sss.pgh.pa.us>
2016-10-09 18:03:45 -04:00
Tom Lane da6c4f6ca8 Refer to OS X as "macOS", except for the port name which is still "darwin".
We weren't terribly consistent about whether to call Apple's OS "OS X"
or "Mac OS X", and the former is probably confusing to people who aren't
Apple users.  Now that Apple has rebranded it "macOS", follow their lead
to establish a consistent naming pattern.  Also, avoid the use of the
ancient project name "Darwin", except as the port code name which does not
seem desirable to change.  (In short, this patch touches documentation and
comments, but no actual code.)

I didn't touch contrib/start-scripts/osx/, either.  I suspect those are
obsolete and due for a rewrite, anyway.

I dithered about whether to apply this edit to old release notes, but
those were responsible for quite a lot of the inconsistencies, so I ended
up changing them too.  Anyway, Apple's being ahistorical about this,
so why shouldn't we be?
2016-09-25 15:40:57 -04:00
Peter Eisentraut c5130e8ee0 Remove some remains from Alpha support removal 2015-10-29 16:40:14 -04:00
Andres Freund 5a33650f24 Attempt to work around a 32bit xlc compiler bug from a different place.
In de6fd1c8 I moved the the work around from 53f73879 into the aix
template. The previous location was removed in the former commit, and I
thought that it would be nice to emit a warning when running configure.

That didn't turn out to work because at the point the template is
included we don't know whether we're compiling a 32/64 bit binary and
it's possible to install compilers for both on a 64 bit kernel/OS.

So go back to a less ambitious approach and define
PG_FORCE_DISABLE_INLINE in port/aix.h, without emitting a warning. We
could try a more fancy approach, but it doesn't seem worth it.

This requires moving the check for PG_FORCE_DISABLE_INLINE in c.h to
after including the system headers included from therein which isn't
perfect, as it seems slightly more robust to include all system headers
in a similar environment. Oh well.

Discussion: 20150807132000.GC13310@awork2.anarazel.de
2015-08-08 01:19:02 +02:00
Andres Freund 18382ae7ed Fix typo in commit de6fd1c.
Per buildfarm members mandrill and hornet.
2015-08-05 18:40:18 +02:00
Andres Freund de6fd1c898 Rely on inline functions even if that causes warnings in older compilers.
So far we have worked around the fact that some very old compilers do
not support 'inline' functions by only using inline functions
conditionally (or not at all). Since such compilers are very rare by
now, we have decided to rely on inline functions from 9.6 onwards.

To avoid breaking these old compilers inline is defined away when not
supported. That'll cause "function x defined but not used" type of
warnings, but since nobody develops on such compilers anymore that's
ok.

This change in policy will allow us to more easily employ inline
functions.

I chose to remove code previously conditional on PG_USE_INLINE as it
seemed confusing to have code dependent on a define that's always
defined.

Blacklisting of compilers, like in c53f73879f, now has to be done
differently. A platform template can define PG_FORCE_DISABLE_INLINE to
force inline to be defined empty.

Discussion: 20150701161447.GB30708@awork2.anarazel.de
2015-08-05 18:19:52 +02:00
Noah Misch 43d89a23d5 AIX: Test the -qlonglong option before use.
xlc provides "long long" unconditionally at C99-compatible language
levels, and this option provokes a warning.  The warning interferes with
"configure" tests that fail in response to any warning.  Notably, before
commit 85a2a8903f, it interfered with the
test for -qnoansialias.  Back-patch to 9.0 (all supported versions).
2015-07-17 03:01:14 -04:00
Tom Lane fd3d894e4e Remove duplicate specification of -Ae for HP-UX C compiler.
Autoconf has known about automatically selecting -Ae when needed for
quite some time now, so remove the redundant addition in template/hpux.
Noted while setting up buildfarm member pademelon.
2015-01-13 22:52:11 -05:00
Andres Freund a6d488cb53 Remove Alpha and Tru64 support.
Support for running postgres on Alpha hasn't been tested for a long
while. Due to Alpha's uniquely lax cache coherency model it's a hard
to develop for platform (especially blindly!) and thought to be
unlikely to currently work correctly.

As Alpha is the only supported architecture for Tru64 drop support for
it as well. Tru64's support has ended 2012 and it has been in
maintenance-only mode for much longer.

Also remove stray references to __ksr__ and ultrix defines.
2014-06-28 21:46:15 +02:00
Noah Misch 4d92b15855 Have configuration templates augment, not replace, LDFLAGS.
This preserves user-specified LDFLAGS; we already kept user-specified
CFLAGS and CPPFLAGS.  Given the shortage of complaints and the fact that
any problem caused is likely to appear at build time, no back-patch.

Dag-Erling Smørgrav and Noah Misch
2014-06-11 19:50:57 -04:00
Tom Lane 8d6e2d4abf Revert to using --enable-auto-import in Cygwin builds.
Disabling auto-import requires that all libraries we use be careful about
declspecs for exported variables; and it seems they aren't.  This means
that Cygwin will not give us useful info about missing PGDLLIMPORT markers;
but it's probably sufficient that MSVC and Mingw builds do.
2014-02-16 15:14:04 -05:00
Tom Lane 1c9acd5c86 Use --disable-auto-import linker switch in Mingw builds, too.
This is evidently the default on buildfarm member narwhal, but that
is a pretty ancient Mingw version, and there is reason to think that
more recent versions of GNU ld have this feature turned on by default.
Since we are trying to achieve consistency of link behavior across
all Windows toolchains, let's just make sure here.
2014-02-12 12:03:53 -05:00
Tom Lane 30657b796c Remove --enable-auto-import linker switch in Cygwin build.
This is expected to make it start failing when contrib modules
reference non-PGDLLIMPORT'ed global variables, as the other Windows
build methods do.  Aside from the value of consistency, the underlying
implementation of this switch is pretty ugly and not really something
we want to rely on if we have to use PGDLLIMPORT anyway for MSVC.
2014-02-12 11:53:07 -05:00
Peter Eisentraut 3626adf266 Remove leftovers of IRIX port
This removes the remaining pieces of the IRIX port that was removed by
ea91a6be89.
2013-11-12 06:39:36 -05:00
Peter Eisentraut ab112068b6 Remove _FORTIFY_SOURCE
Apparently, on some glibc versions this causes warnings when
optimization is not enabled.

Altogether, there appear to be too many incompatibilities surrounding
this.
2012-10-10 21:42:38 -04:00
Peter Eisentraut 97ec962157 Disable _FORTIFY_SOURCE with ICC
There are apparently some incompatibilities, per buildfarm.
2012-09-29 20:07:36 -04:00
Peter Eisentraut 997fa75d6b Add _FORTIFY_SOURCE to default compiler options for linux template
Many distributors use this, so we might as well see the warnings as
well.
2012-09-29 13:22:59 -04:00
Bruce Momjian ebcaa5fcde Remove BSD/OS (BSDi) port. There are no known users upgrading to
Postgres 9.2, and perhaps no existing users either.
2012-05-03 10:58:44 -04:00
Peter Eisentraut f2f9439fbf Remove dead ports
Remove the following ports:

- dgux
- nextstep
- sunos4
- svr4
- ultrix4
- univel

These are obsolete and not worth rescuing.  In most cases, there is
circumstantial evidence that they wouldn't work anymore anyway.
2012-05-01 22:11:12 +03:00
Magnus Hagander 9f2e211386 Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Peter Eisentraut 3f11971916 Remove extra newlines at end and beginning of files, add missing newlines
at end of files.
2010-08-19 05:57:36 +00:00
Tom Lane 98c2383ba5 Don't try to force use of -no-cpp-precomp on OS X. It's been five years
since Apple shipped a compiler that needed this switch, and there's
increasing interest in using other compilers that won't accept the switch
at all.  Better to let anybody who still needs the switch inject it via
CPPFLAGS.  Per gripe from Neil Conway.
2010-08-02 04:51:17 +00:00
Tom Lane 291a957745 Split the LDFLAGS make variable into two parts: LDFLAGS is now used for
linking both executables and shared libraries, and we add on LDFLAGS_EX when
linking executables or LDFLAGS_SL when linking shared libraries.  This
provides a significantly cleaner way of dealing with link-time switches than
the former behavior.  Also, make sure that the various platform-specific
%.so: %.o rules incorporate LDFLAGS and LDFLAGS_SL; most of them missed that
before.  (I did not add these variables for the platforms that invoke $(LD)
directly, however.  It's not clear if we can do that safely, since for the
most part we assume these variables use CC command-line syntax.)

Per gripe from Aaron Swenson and subsequent investigation.
2010-07-05 18:54:38 +00:00
Tom Lane 68d95f12e7 Tweak configure to attempt to add -qnoansialias to CFLAGS whenever running
on AIX with a non-gcc compiler.  The previous coding would do this only if
CC was exactly "xlc"; which is a bad idea, as demonstrated by trouble report
from Mihai Criveti.
2009-02-11 20:02:40 +00:00
Peter Eisentraut d50966a49d Move forgotten comment closer to where it matters. 2008-10-29 16:23:07 +00:00
Peter Eisentraut 79d306c84a 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>
2008-10-29 16:06:47 +00:00
Tom Lane 93407d3998 Use SYSV semaphores rather than POSIX on Darwin >= 6.0 (i.e., OS X 10.2
and up), per Chris Marcellino.  This avoids consuming O(N^2) file
descriptors to support N backends.  Tests suggest it's about a wash for
small installations, but large ones would have a problem.
2007-09-26 00:32:46 +00:00
Tom Lane 017daed0dd If we're gonna provide an --enable-profiling configure option, surely
it ought to know that you need -DLINUX_PROFILE on Linux.
2007-09-21 02:33:46 +00:00
Neil Conway e9e97500c9 With the native compiler on Unixware, disable optimization if
--enable-debug is used, to avoid complaints about debugging and
optimization being mutually exclusive. Patch from Stefan Kaltenbrunner.
2007-07-16 17:38:48 +00:00
Tom Lane 1f09a857b7 Make --with-ldap build on Unixware, per Olivier Prenant. 2006-12-14 21:49:54 +00:00
Peter Eisentraut 0bc8a5b669 Remove Windows port^W^Wobsolete template file. 2006-12-14 20:53:50 +00:00
Peter Eisentraut 9cf2706742 Allow augmenting CPPFLAGS from the configure command line. This generally
works, but some platform templates overwrote it without asking.
2006-12-12 19:43:19 +00:00
Bruce Momjian e81b7b1dac Remove extra 'else' in solaris compiler code. 2006-04-28 04:32:10 +00:00
Bruce Momjian 128bed948f Rewrite Solaris compiler tas() assembly routines, merge i386 and x86_64
assembler files, renamed as solaris_x86.s.

Theo Schlossnagle
2006-04-27 22:28:42 +00:00
Bruce Momjian f3d99d160d Add CVS tag lines to files that were lacking them. 2006-03-11 04:38:42 +00:00
Bruce Momjian a25b1decef Update tested AIX memset platforms. 2006-02-03 13:56:20 +00:00
Bruce Momjian ebd38e3c1d Allow MEMSET_LOOP_LIMIT to be set on a per-platform basis, and turn off
MemSet on AIX by setting MEMSET_LOOP_LIMIT to zero.

Add optimization to skip MemSet tests in MEMSET_LOOP_LIMIT == 0 case and
just call memset() directly.
2006-02-03 13:53:15 +00:00
Bruce Momjian 44f9021223 Remove BEOS port. 2006-01-05 03:01:38 +00:00
Bruce Momjian a1675649e4 Remove QNX port. 2006-01-05 01:56:30 +00:00
Bruce Momjian bb1bba8eca Remove unnecessary assignment, per Tom. 2006-01-02 03:30:41 +00:00
Bruce Momjian 12af9cdff4 Add support for Solaris x86_64 using Sun's compiler.
Pierre Girard
2005-12-30 21:43:41 +00:00
Bruce Momjian 1521aef1db SUNOS4_CC -> SUNOS_CC. 2005-07-30 03:07:42 +00:00
Tom Lane 507b758ad9 It appears we need -DSUNOS4_CC for both solaris and sunos4 templates.
Per report from Andrew Clark.
2005-07-29 17:00:29 +00:00
Tom Lane 96ecf9d5aa Support Sun's compiler on SunOS4 (a/k/a Solaris 9). Per ayan@ayan.net 2004-12-29 23:47:40 +00:00
Bruce Momjian f69cf1fc14 Mention why unixware doesn't handle threading in 8.0. 2004-12-19 04:09:48 +00:00
Bruce Momjian f7bae20d67 Don't bother adding to cflags/cppflags, just set them because configure
handles that, and make solaris debug use no optimization.
2004-12-02 18:11:40 +00:00
Bruce Momjian 3aa9776d95 Add to CPPFLAGS/CFLAGS in template files, don't over-ride them. 2004-11-27 05:03:26 +00:00
Tom Lane 5d72ef83fd Miscellaneous Cygwin build fixes from Reini Urban. 2004-11-17 17:46:24 +00:00
Bruce Momjian 0d3b8e9a50 Allow win32/cygwin link against the first matching library symbol rather
than erroring out.  This is the Unix behavior.
2004-11-08 05:23:26 +00:00
Tom Lane 409b38f514 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...)
2004-09-24 00:21:32 +00:00