1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +03:00

Remove support for non-ELF BSD systems

This is long obsolete.

Discussion: https://www.postgresql.org/message-id/8eacdc0d-123f-dbca-bacf-0a68766a4889@2ndquadrant.com
This commit is contained in:
Peter Eisentraut
2019-07-01 23:46:24 +01:00
parent 615cebc94b
commit c72f9b9502
7 changed files with 161 additions and 275 deletions

View File

@ -506,10 +506,6 @@ host_tuple = @host@
host_os = @host_os@
host_cpu = @host_cpu@
# This is mainly for use on FreeBSD, where we have both a.out and elf
# systems now. May be applicable to other systems to?
ELF_SYSTEM= @ELF_SYS@
# Backend stack size limit has to be hard-wired on Windows (it's in bytes)
WIN32_STACK_RLIMIT=4194304

View File

@ -139,57 +139,42 @@ ifeq ($(PORTNAME), darwin)
endif
ifeq ($(PORTNAME), openbsd)
ifdef ELF_SYSTEM
LINK.shared = $(COMPILER) -shared
ifdef soname
LINK.shared += -Wl,-x,-soname,$(soname)
endif
BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@
exports_file = $(SHLIB_EXPORTS:%.txt=%.list)
ifneq (,$(exports_file))
LINK.shared += -Wl,--version-script=$(exports_file)
endif
SHLIB_LINK += -lc
else
LINK.shared = $(LD) -x -Bshareable -Bforcearchive
LINK.shared = $(COMPILER) -shared
ifdef soname
LINK.shared += -Wl,-x,-soname,$(soname)
endif
BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@
exports_file = $(SHLIB_EXPORTS:%.txt=%.list)
ifneq (,$(exports_file))
LINK.shared += -Wl,--version-script=$(exports_file)
endif
SHLIB_LINK += -lc
endif
ifeq ($(PORTNAME), freebsd)
ifdef ELF_SYSTEM
ifdef SO_MAJOR_VERSION
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
endif
LINK.shared = $(COMPILER) -shared
ifdef soname
LINK.shared += -Wl,-x,-soname,$(soname)
endif
BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@
exports_file = $(SHLIB_EXPORTS:%.txt=%.list)
ifneq (,$(exports_file))
LINK.shared += -Wl,--version-script=$(exports_file)
endif
else
ifdef SO_MAJOR_VERSION
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
endif
LINK.shared = $(LD) -x -Bshareable -Bforcearchive
ifdef SO_MAJOR_VERSION
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
endif
LINK.shared = $(COMPILER) -shared
ifdef soname
LINK.shared += -Wl,-x,-soname,$(soname)
endif
BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@
exports_file = $(SHLIB_EXPORTS:%.txt=%.list)
ifneq (,$(exports_file))
LINK.shared += -Wl,--version-script=$(exports_file)
endif
endif
ifeq ($(PORTNAME), netbsd)
ifdef ELF_SYSTEM
LINK.shared = $(COMPILER) -shared
ifdef soname
LINK.shared += -Wl,-x,-soname,$(soname)
endif
BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@
exports_file = $(SHLIB_EXPORTS:%.txt=%.list)
ifneq (,$(exports_file))
LINK.shared += -Wl,--version-script=$(exports_file)
endif
else
LINK.shared = $(LD) -x -Bshareable -Bforcearchive
LINK.shared = $(COMPILER) -shared
ifdef soname
LINK.shared += -Wl,-x,-soname,$(soname)
endif
BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@
exports_file = $(SHLIB_EXPORTS:%.txt=%.list)
ifneq (,$(exports_file))
LINK.shared += -Wl,--version-script=$(exports_file)
endif
endif

View File

@ -1,9 +1,7 @@
AROPT = cr
ifdef ELF_SYSTEM
export_dynamic = -Wl,-export-dynamic
rpath = -Wl,-R'$(rpathdir)'
endif
DLSUFFIX = .so
@ -20,14 +18,4 @@ endef
# Rule for building a shared library from a single .o file
%.so: %.o
ifdef ELF_SYSTEM
$(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@
else
$(LD) $(LDREL) $(LDOUT) $<.obj -x $<
@echo building shared object $@
@rm -f $@.pic
@${AR} cq $@.pic $<.obj
${RANLIB} $@.pic
@rm -f $@
$(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
endif

View File

@ -1,11 +1,7 @@
AROPT = cr
ifdef ELF_SYSTEM
export_dynamic = -Wl,-E
rpath = -Wl,-R'$(rpathdir)'
else
rpath = -Wl,-R'$(rpathdir)'
endif
DLSUFFIX = .so
@ -14,14 +10,4 @@ CFLAGS_SL = -fPIC -DPIC
# Rule for building a shared library from a single .o file
%.so: %.o
ifdef ELF_SYSTEM
$(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@
else
$(LD) $(LDREL) $(LDOUT) $<.obj -x $<
@echo building shared object $@
@rm -f $@.pic
@${AR} cq $@.pic $<.obj
${RANLIB} $@.pic
@rm -f $@
$(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
endif

View File

@ -1,9 +1,7 @@
AROPT = cr
ifdef ELF_SYSTEM
export_dynamic = -Wl,-E
rpath = -Wl,-R'$(rpathdir)'
endif
DLSUFFIX = .so
@ -12,14 +10,4 @@ CFLAGS_SL = -fPIC -DPIC
# Rule for building a shared library from a single .o file
%.so: %.o
ifdef ELF_SYSTEM
$(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@
else
$(LD) $(LDREL) $(LDOUT) $<.obj -x $<
@echo building shared object $@
@rm -f $@.pic
@${AR} cq $@.pic $<.obj
${RANLIB} $@.pic
@rm -f $@
$(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
endif