mirror of
https://github.com/postgres/postgres.git
synced 2025-12-04 00:04:14 -05:00
$(LD) -x -Bshareable to $(CC) -shared on OpenBSD (I suspect this should be carried over to the other two as well, but will refrain pending suggestions from people who actually use those platforms). Per Stefan Kaltenbrunner.
32 lines
536 B
Makefile
32 lines
536 B
Makefile
AROPT = cr
|
|
|
|
ifdef ELF_SYSTEM
|
|
export_dynamic = -export-dynamic
|
|
rpath = -R$(libdir)
|
|
shlib_symbolic = -Wl,-Bsymbolic -lc
|
|
endif
|
|
|
|
DLSUFFIX = .so
|
|
|
|
ifeq ($(findstring sparc,$(host_cpu)), sparc)
|
|
CFLAGS_SL = -fPIC -DPIC
|
|
else
|
|
CFLAGS_SL = -fpic -DPIC
|
|
endif
|
|
|
|
|
|
%.so: %.o
|
|
ifdef ELF_SYSTEM
|
|
$(LD) -x -shared -o $@ $<
|
|
else
|
|
$(LD) $(LDREL) $(LDOUT) $<.obj -x $<
|
|
@echo building shared object $@
|
|
@rm -f $@.pic
|
|
@${AR} cq $@.pic `lorder $<.obj | tsort`
|
|
${RANLIB} $@.pic
|
|
@rm -f $@
|
|
$(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
|
|
endif
|
|
|
|
sqlmansect = 7
|