summaryrefslogtreecommitdiff
path: root/src/template/netbsd
AgeCommit message (Collapse)Author
2022-08-30On NetBSD, force dynamic symbol resolution at postmaster start.Tom Lane
The default of lazy symbol resolution means that when the postmaster first reaches the select() call in ServerLoop, it'll need to resolve the link to that libc entry point. NetBSD's dynamic loader takes an internal lock while doing that, and if a signal interrupts the operation then there is a risk of self-deadlock should the signal handler do anything that requires that lock, as several of the postmaster signal handlers do. The window for this is pretty narrow, and timing considerations make it unlikely that a signal would arrive right then anyway. But it's semi-repeatable on slow single-CPU machines, and in principle the race could happen with any hardware. The least messy solution to this is to force binding of dynamic symbols at postmaster start, using the "-z now" linker option. While we're at it, also use "-z relro" so as to provide a small security gain. It's not entirely clear whether any other platforms share this issue, but for now we'll assume it's NetBSD-specific. (We might later try to use "-z now" on more platforms for performance reasons, but that would not likely be something to back-patch.) Report and patch by me; the idea to fix it this way is from Andres Freund. Discussion: https://postgr.es/m/3384826.1661802235@sss.pgh.pa.us
2020-10-27Makefile comment: remove reference to tools/thread/thread_testBruce Momjian
You can't compile thread_test alone anymore, and the location moved too. Reported-by: Tom Lane Discussion: https://postgr.es/m/1062278.1603819969@sss.pgh.pa.us Backpatch-through: 9.5
2019-10-21Select CFLAGS_SL at configure time, not in platform-specific Makefiles.Tom Lane
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
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-08-19Remove extra newlines at end and beginning of files, add missing newlinesPeter Eisentraut
at end of files.
2006-03-11Add CVS tag lines to files that were lacking them.Bruce Momjian
2004-04-23Add new auto-detection of thread flags.Bruce Momjian
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.
2004-04-20Add NetBSD thread compile flags.Bruce Momjian
2004-02-11Check and set thread-safe functions separately, rather than as a singleBruce Momjian
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.
2003-10-09Remove -pipe from compiles.Bruce Momjian
2003-10-09Re-add -pipe compile flags for bsd's.Bruce Momjian
2003-10-09This centralizes the optimization defaults into configure.in, ratherBruce Momjian
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.
2003-09-27Finalize configuration of thread_test program.Bruce Momjian
2003-09-15NetBSD needs reentrant funcs.Bruce Momjian
2003-09-13Attempt threading in this order:Bruce Momjian
* 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.
2003-08-16Make NEED_REENTRANT_FUNC_NAMES _require_ *_r functions, and add tests toBruce Momjian
configure to report if they are not found.
2003-06-14Move thread os defines into template files.Bruce Momjian
2000-10-21Move DLSUFFIX, AROPT, and CFLAGS_SL settings from template toPeter Eisentraut
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.
2000-07-15Rename templates to match names in makefiles/Makefile.* and include/port.Peter Eisentraut
Read templates after compiler is detected. Convert all templates to real shell scripts. Rename bsd->openbsd, alpha->osf.
2000-06-07Gen_fmgrtab.sh is strange: it is a platform dependent way (because it usesPeter Eisentraut
CPP) to create platform independent files. Unfortunately, that means that every config.status (or configure) run invariably causes a relink of the postmaster and also that we can't put these files in the distribution (usefully). So we make it a little smarter: when the output files already exist and it notices that it would recreate them in identical form, it doesn't touch them. In order to avoid re-running the make rule all the time we update a timestamp file instead. Update release_prep accordingly. Also make Gen_fmgrtab.sh use the awk that is detected at configure time, not necessarily named `awk' and have it check for exit statuses a little better. In other news... Remove USE_LOCALE from the templates, it was set to `no' everywhere anyway. Also remove YACC and YFLAGS from the templates, configure is smart enough to find bison or yacc itself. Use AC_PROG_YACC for that instead of the hand-crafted code. Do not set YFLAGS to `-d'. The make rules that need this flag should explicitly invoke it. YFLAGS should be a user variable. Update the makefiles to that effect.
1998-09-18Remove /usr/local/* from templates.Bruce Momjian
1998-06-12template changeBruce Momjian
1998-06-12template changesBruce Momjian
1997-06-06From: Phil Nelson <phil@cs.wwu.edu>Marc G. Fournier
Subject: [PATCHES] Patches to allow generic NetBSD support
1997-04-28Add a netbsd template file and update linux-elf and .similarMarc G. Fournier