aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMel Gorman <mel@csn.ul.ie>2008-08-07 18:42:39 +0100
committerEric Munson <ebmunson@us.ibm.com>2008-08-14 11:07:33 -0700
commit1f6b889ccf517a61b5caadaf8ba76b19dd1fb8a7 (patch)
treeef8016f39b3c2093daa5ec920491b12a4278312c /Makefile
parent296598a39d5cde8efe200917a8dc36c41e45c10e (diff)
downloadlibhugetlbfs-1f6b889ccf517a61b5caadaf8ba76b19dd1fb8a7.tar.gz
Allow shmget() to be overridden to add the SHM_HUGETLB flag
There are applications that are not hugepage-aware but use shared memory such as the postgres database. It is possible that the SHM_HUGETLB flag could be added to such an application via libhugetlbfs and overriding shmget() to add the SHM_HUGETLB to the flags. This patch enables libhugetlbfs to add the SHM_HUGETLB when a HUGETLB_SHM environment variable is set to "yes". It will work whether the application is linked to libhugetlbfs or loaded via LD_PRELOAD. Signed-off-by: Mel Gorman <mel@csn.ul.ie> Acked-by: Adam Litke <agl@us.ibm.com> Signed-off-by: Eric Munson <ebmunson@us.ibm.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 763b28d..5221b9d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
PREFIX = /usr/local
EXEDIR = /bin
-LIBOBJS = hugeutils.o version.o init.o morecore.o debug.o alloc.o
+LIBOBJS = hugeutils.o version.o init.o morecore.o debug.o alloc.o shm.o
INSTALL_OBJ_LIBS = libhugetlbfs.so libhugetlbfs.a
BIN_OBJ_DIR=obj
INSTALL_BIN = hugectl hugeedit
@@ -16,7 +16,7 @@ NODEPTARGETS=<version.h> <clean>
INSTALL = install
-LDFLAGS += --no-undefined-version -Wl,--version-script=version.lds
+LDFLAGS += --no-undefined-version -Wl,--version-script=version.lds -ldl
CFLAGS ?= -O2 -g
CFLAGS += -Wall -fPIC
CPPFLAGS += -D__LIBHUGETLBFS__