Commit d10a406f authored by Tom Lane's avatar Tom Lane

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.
parent 26112850
......@@ -7,7 +7,13 @@ 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
......
......@@ -9,7 +9,13 @@ rpath = -R$(libdir)
endif
DLSUFFIX = .so
ifeq ($(findstring sparc,$(host_cpu)), sparc)
CFLAGS_SL = -fPIC -DPIC
else
CFLAGS_SL = -fpic -DPIC
endif
%.so: %.o
ifdef ELF_SYSTEM
......@@ -21,8 +27,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
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment