提交 8daca4a9 编写于 作者: D Daniel Gustafsson

Build applications linking libpq with -pthread on openbsd

OpenBSD require that linking with a library using sigwait(3) be
compiled with -pthread.  This adds a kludge in the relevant
makefiles which is less than elegant, but it seemed the least
intrusive change to make.
上级 83147222
......@@ -25,6 +25,10 @@ LIBS := $(filter-out -lreadline -ledit -ltermcap -lncurses -lcurses -lcurl -lssl
override CPPFLAGS := -DDEF_PGPORT=$(DEF_PGPORT) -I$(libpq_srcdir) $(CPPFLAGS)
ifeq ($(PORTNAME),openbsd)
override CFLAGS += -pthread
endif
OBJS= pg_ctl.o $(WIN32RES)
all: pg_ctl
......
......@@ -25,6 +25,10 @@ LIBS := $(filter-out -lreadline -ledit -ltermcap -lncurses -lcurses -lcurl , $(L
# the use of tempnam in pg_backup_tar.c causes a warning when using newer versions of GCC
override CPPFLAGS := -Wno-deprecated-declarations -I$(libpq_srcdir) $(CPPFLAGS)
ifeq ($(PORTNAME),openbsd)
override CFLAGS += -pthread
endif
OBJS= pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o \
pg_backup_files.o pg_backup_null.o pg_backup_tar.o \
pg_backup_directory.o dumputils.o compress_io.o $(WIN32RES)
......
......@@ -26,8 +26,13 @@ PROGRAMS = createdb createlang createuser dropdb droplang dropuser clusterdb vac
override CPPFLAGS := -I$(top_srcdir)/src/bin/pg_dump -I$(top_srcdir)/src/bin/psql -I$(libpq_srcdir) $(CPPFLAGS)
all: $(PROGRAMS)
ifeq ($(PORTNAME),openbsd)
override CFLAGS += -pthread
endif
%: %.o $(WIN32RES)
$(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册