summaryrefslogtreecommitdiff
path: root/src/template/linux
Commit message (Collapse)AuthorAgeFilesLines
* Select CFLAGS_SL at configure time, not in platform-specific Makefiles.Tom Lane2019-10-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | Move the platform-dependent logic that sets CFLAGS_SL from src/makefiles/Makefile.foo to src/template/foo, so that the value is determined at configure time and thus is available while running configure's tests. On a couple of platforms this might save a few microseconds of build time by eliminating a test that make otherwise has to do over and over. Otherwise it's pretty much a wash for build purposes; in particular, this makes no difference to anyone who might be overriding CFLAGS_SL via a make option. This patch in itself does nothing with the value and thus should not change any behavior, though you'll probably have to re-run configure to get a correctly updated Makefile.global. We'll use the new configure variable in a follow-on patch. Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches, because the follow-on patch is a portability bug fix. Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota.ntt@gmail.com
* Use ppoll(2), if available, to wait for input in pgbench.Tom Lane2018-09-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Previously, pgbench always used select(2) for this purpose, but that's problematic for very high client counts, because select() can't deal with file descriptor numbers larger than FD_SETSIZE. It's pretty common for that to be only 1024 or so, whereas modern OSes can allow many more open files than that. Using poll(2) would surmount that problem, but it creates another one: poll()'s timeout resolution is only 1ms, which is poor enough to cause problems with --rate specifications approaching or exceeding 1K TPS. On platforms that have ppoll(2), which includes Linux and recent FreeBSD, we can use that to avoid the FD_SETSIZE problem without any loss of timeout resolution. Hence, add configure logic to test for ppoll(), and use it if available. This patch introduces an abstraction layer into pgbench that could be extended to support other kernel event-wait APIs such as kevents. But actually adding such support is a matter for some future patch. Doug Rady, reviewed by Robert Haas and Fabien Coelho, and whacked around a good bit more by me Discussion: https://postgr.es/m/23D017C9-81B7-484D-8490-FD94DEC4DF59@amazon.com
* Use unnamed POSIX semaphores, if available, on Linux and FreeBSD.Tom Lane2016-10-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Remove _FORTIFY_SOURCEPeter Eisentraut2012-10-101-6/+0
| | | | | | | | Apparently, on some glibc versions this causes warnings when optimization is not enabled. Altogether, there appear to be too many incompatibilities surrounding this.
* Disable _FORTIFY_SOURCE with ICCPeter Eisentraut2012-09-291-2/+5
| | | | There are apparently some incompatibilities, per buildfarm.
* Add _FORTIFY_SOURCE to default compiler options for linux templatePeter Eisentraut2012-09-291-0/+3
| | | | | Many distributors use this, so we might as well see the warnings as well.
* Remove cvs keywords from all files.Magnus Hagander2010-09-201-1/+1
|
* Support for Sun Studio compiler on LinuxPeter Eisentraut2008-10-291-1/+24
| | | | | | | 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>
* If we're gonna provide an --enable-profiling configure option, surelyTom Lane2007-09-211-1/+4
| | | | it ought to know that you need -DLINUX_PROFILE on Linux.
* Allow augmenting CPPFLAGS from the configure command line. This generallyPeter Eisentraut2006-12-121-2/+2
| | | | works, but some platform templates overwrote it without asking.
* Add CVS tag lines to files that were lacking them.Bruce Momjian2006-03-111-0/+2
|
* Don't bother adding to cflags/cppflags, just set them because configureBruce Momjian2004-12-021-1/+1
| | | | handles that, and make solaris debug use no optimization.
* Add to CPPFLAGS/CFLAGS in template files, don't over-ride them.Bruce Momjian2004-11-271-1/+1
|
* Unconditionally define:Bruce Momjian2004-04-261-3/+0
| | | | | | | | | | -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.
* Add new auto-detection of thread flags.Bruce Momjian2004-04-231-9/+1
| | | | | | | 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.
* Mark linux as thread-enabled with new 7.5 tests.Bruce Momjian2004-03-141-0/+7
|
* Check and set thread-safe functions separately, rather than as a singleBruce Momjian2004-02-111-2/+1
| | | | | | | | | | 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.
* Remove -pipe on Linux, per reports from Peter.Bruce Momjian2003-10-091-2/+0
|
* Add -pipe compile for Linux.Bruce Momjian2003-10-091-0/+2
|
* This centralizes the optimization defaults into configure.in, ratherBruce Momjian2003-10-091-2/+0
| | | | | | | 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.
* Mark Linux for threads.Bruce Momjian2003-09-271-1/+1
|
* Finalize configuration of thread_test program.Bruce Momjian2003-09-271-2/+2
|
* Rename thread compile flag. Move thread test program to tools/thread,Bruce Momjian2003-09-271-1/+1
| | | | and improve tests.
* Move -D_GNU_SOURCE hack from port header to template, so thatTom Lane2003-09-261-0/+2
| | | | | configure's tests see the same compilation environment as the code. Per discussion with Stephan Szabo.
* Attempt threading in this order:Bruce Momjian2003-09-131-1/+1
| | | | | | | | | * 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.
* Tighten casting of function call pointers for threads.Bruce Momjian2003-09-031-1/+1
|
* Make NEED_REENTRANT_FUNC_NAMES _require_ *_r functions, and add tests toBruce Momjian2003-08-161-1/+1
| | | | configure to report if they are not found.
* Move thread os defines into template files.Bruce Momjian2003-06-141-0/+6
|
* Remove -mips2 flag, which breaks the build on some MIPS systems.Peter Eisentraut2002-03-211-4/+0
| | | | Report from Ryan Murray via Debian
* Move DLSUFFIX, AROPT, and CFLAGS_SL settings from template toPeter Eisentraut2000-10-211-3/+0
| | | | | | | | | 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.
* New unified regression test driver, test/regress makefile cleanup,Peter Eisentraut2000-09-291-1/+0
| | | | | add "check" and "installcheck" targets, straighten out make variable naming of host_os, host_cpu, etc.
* Rename templates to match names in makefiles/Makefile.* and include/port.Peter Eisentraut2000-07-151-0/+9
| | | | | Read templates after compiler is detected. Convert all templates to real shell scripts. Rename bsd->openbsd, alpha->osf.
* template changesBruce Momjian1998-06-121-10/+0
|
* Fix a problem with Linux where yacc is *really* bison -yMarc G. Fournier1997-04-161-1/+1
|
* Change BACKEND to CFLAGSMarc G. Fournier1997-04-111-1/+1
|
* Move YACC and YFLAGS into the template filesMarc G. Fournier1997-04-041-0/+2
| | | | | Clean up the .sample files...comment out all sample entries except for the localhost one
* Got AROPT setting backwards...correct itMarc G. Fournier1997-04-041-1/+1
|
* One helluva mess.Marc G. Fournier1997-04-041-0/+8
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...