diff options
Diffstat (limited to 'src/OS')
-rw-r--r-- | src/OS/Makefile-Base | 1 | ||||
-rw-r--r-- | src/OS/Makefile-FreeBSD | 3 | ||||
-rw-r--r-- | src/OS/Makefile-Linux | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/src/OS/Makefile-Base b/src/OS/Makefile-Base index 5793869e2..29a6ad371 100644 --- a/src/OS/Makefile-Base +++ b/src/OS/Makefile-Base @@ -641,6 +641,7 @@ $(MONBIN): $(HDRS) buildlookups lookups/lookups.a: config.h @cd lookups; $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" \ + CFLAGS_DYNAMIC="$(CFLAGS_DYNAMIC)" \ FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" HDRS="$(PHDRS)" \ INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE) $(LOOKUP_INCLUDE)"; \ echo " " diff --git a/src/OS/Makefile-FreeBSD b/src/OS/Makefile-FreeBSD index c0f75ee78..3a2697bba 100644 --- a/src/OS/Makefile-FreeBSD +++ b/src/OS/Makefile-FreeBSD @@ -15,6 +15,9 @@ HAVE_SA_LEN=YES # crypt() is in a separate library LIBS=-lcrypt -lm -lutil +# Dynamicly loaded modules need to be built with -fPIC +CFLAGS_DYNAMIC=-shared -rdynamic -fPIC + # FreeBSD always ships with Berkeley DB USE_DB=yes diff --git a/src/OS/Makefile-Linux b/src/OS/Makefile-Linux index cc8dce728..4fe2436a6 100644 --- a/src/OS/Makefile-Linux +++ b/src/OS/Makefile-Linux @@ -11,6 +11,7 @@ CHGRP_COMMAND=look_for_it CHMOD_COMMAND=look_for_it CFLAGS=-O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE +CFLAGS_DYNAMIC=-shared -rdynamic DBMLIB = -ldb USE_DB = yes |