summaryrefslogtreecommitdiff
path: root/src/makefiles/Makefile.openbsd
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-10-11 23:27:23 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-10-11 23:27:23 +0000
commitd10a406fe8567fffb6c6aad76e11d5acc93c1ec1 (patch)
treef20d99171c2980a000e32754afe78d3b17560116 /src/makefiles/Makefile.openbsd
parent26112850ec5733a96a31022859763de4b3724336 (diff)
downloadpostgresql-d10a406fe8567fffb6c6aad76e11d5acc93c1ec1.tar.gz
Use -fPIC not -fpic for BSDen on Sparc. Also switch from
$(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.
Diffstat (limited to 'src/makefiles/Makefile.openbsd')
-rw-r--r--src/makefiles/Makefile.openbsd11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/makefiles/Makefile.openbsd b/src/makefiles/Makefile.openbsd
index 3709d24bdc..66671e675f 100644
--- a/src/makefiles/Makefile.openbsd
+++ b/src/makefiles/Makefile.openbsd
@@ -7,11 +7,17 @@ shlib_symbolic = -Wl,-Bsymbolic
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 -Bshareable -o $@ $<
+ $(CC) -shared -o $@ $<
else
$(LD) $(LDREL) $(LDOUT) $<.obj -x $<
@echo building shared object $@
@@ -19,8 +25,7 @@ else
@${AR} cq $@.pic `lorder $<.obj | tsort`
${RANLIB} $@.pic
@rm -f $@
- $(LD) -x -Bshareable -Bforcearchive \
- -o $@ $@.pic
+ $(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
endif
sqlmansect = 7