diff options
author | Tom Lane | 2004-10-11 23:27:23 +0000 |
---|---|---|
committer | Tom Lane | 2004-10-11 23:27:23 +0000 |
commit | 7beb221c0e8120cca0f57519eab677efb2efec7f (patch) | |
tree | fa51b6ff917b564ed5f7acfd4b607dffc4fd50e1 | |
parent | 425ce0e201cb748f6443c7ab9b433b9d931257d6 (diff) |
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.
-rw-r--r-- | src/makefiles/Makefile.freebsd | 6 | ||||
-rw-r--r-- | src/makefiles/Makefile.netbsd | 9 | ||||
-rw-r--r-- | src/makefiles/Makefile.openbsd | 11 |
3 files changed, 21 insertions, 5 deletions
diff --git a/src/makefiles/Makefile.freebsd b/src/makefiles/Makefile.freebsd index 90543b7016..a9e59604d5 100644 --- a/src/makefiles/Makefile.freebsd +++ b/src/makefiles/Makefile.freebsd @@ -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 diff --git a/src/makefiles/Makefile.netbsd b/src/makefiles/Makefile.netbsd index 59ab7a791f..531fc1356b 100644 --- a/src/makefiles/Makefile.netbsd +++ b/src/makefiles/Makefile.netbsd @@ -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 [email protected] `lorder $<.obj | tsort` ${RANLIB} [email protected] @rm -f $@ - $(LD) -x -Bshareable -Bforcearchive \ - -o $@ [email protected] + $(LD) -x -Bshareable -Bforcearchive -o $@ [email protected] endif sqlmansect = 7 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 [email protected] `lorder $<.obj | tsort` ${RANLIB} [email protected] @rm -f $@ - $(LD) -x -Bshareable -Bforcearchive \ - -o $@ [email protected] + $(LD) -x -Bshareable -Bforcearchive -o $@ [email protected] endif sqlmansect = 7 |