aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in4
-rw-r--r--src/Makefile.shlib71
-rw-r--r--src/makefiles/Makefile.freebsd12
-rw-r--r--src/makefiles/Makefile.netbsd14
-rw-r--r--src/makefiles/Makefile.openbsd12
5 files changed, 28 insertions, 85 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index b9d86acaa94..321af38b0c3 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -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
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 373d73caefc..c4893edfc38 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -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
diff --git a/src/makefiles/Makefile.freebsd b/src/makefiles/Makefile.freebsd
index 98a6f50615e..c462e2fd584 100644
--- a/src/makefiles/Makefile.freebsd
+++ b/src/makefiles/Makefile.freebsd
@@ -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
diff --git a/src/makefiles/Makefile.netbsd b/src/makefiles/Makefile.netbsd
index 7bb9721fa5b..15695fb65c7 100644
--- a/src/makefiles/Makefile.netbsd
+++ b/src/makefiles/Makefile.netbsd
@@ -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
diff --git a/src/makefiles/Makefile.openbsd b/src/makefiles/Makefile.openbsd
index eda311087cb..15695fb65c7 100644
--- a/src/makefiles/Makefile.openbsd
+++ b/src/makefiles/Makefile.openbsd
@@ -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