Commit abd7a990 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

build the .so. addresses #1185

git-svn-id: file:///svn/tokudb.1131b+1080a+1185@6366 c7de825b-a66e-492c-adef-691d508d4ae1
parent 2e6126d8
...@@ -36,6 +36,9 @@ FORMAT=-Wmissing-format-attribute ...@@ -36,6 +36,9 @@ FORMAT=-Wmissing-format-attribute
endif endif
CFLAGS = -Wall -Wextra -Wcast-align -Wbad-function-cast -Wmissing-noreturn $(FORMAT) $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS) $(PROF_FLAGS) $(FPICFLAGS) $(SHADOW) $(VISIBILITY) CFLAGS = -Wall -Wextra -Wcast-align -Wbad-function-cast -Wmissing-noreturn $(FORMAT) $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS) $(PROF_FLAGS) $(FPICFLAGS) $(SHADOW) $(VISIBILITY)
ifneq ($(CC),icc)
CFLAGS += -Werror
endif
LDFLAGS = $(OPTFLAGS) -g $(GCOV_FLAGS) $(PROF_FLAGS) -lz -lpthread LDFLAGS = $(OPTFLAGS) -g $(GCOV_FLAGS) $(PROF_FLAGS) -lz -lpthread
CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500 CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500
......
...@@ -10,7 +10,10 @@ VISIBILITY = -fvisibility=hidden ...@@ -10,7 +10,10 @@ VISIBILITY = -fvisibility=hidden
# PROF_FLAGS=-pg # PROF_FLAGS=-pg
OPTFLAGS = -O3 -finline-functions OPTFLAGS = -O3 -finline-functions
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage # GCOV_FLAGS = -fprofile-arcs -ftest-coverage
CFLAGS = -W -Wall -Wextra -Werror -g3 -ggdb3 -fPIC $(OPTFLAGS) $(GCOV_FLAGS) CFLAGS = -W -Wall -Wextra -g3 -ggdb3 -fPIC $(OPTFLAGS) $(GCOV_FLAGS)
ifneq ($(CC),icc)
CFLAGS += -Werror
endif
CFLAGS += -Wbad-function-cast -Wcast-align CFLAGS += -Wbad-function-cast -Wcast-align
CPPFLAGS = -I../include -I../newbrt -I./lock_tree/ -I./range_tree/ CPPFLAGS = -I../include -I../newbrt -I./lock_tree/ -I./range_tree/
CPPFLAGS += -D_GNU_SOURCE -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE CPPFLAGS += -D_GNU_SOURCE -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
......
...@@ -11,7 +11,7 @@ endif ...@@ -11,7 +11,7 @@ endif
VISIBILITY = -fvisibility=hidden VISIBILITY = -fvisibility=hidden
CFLAGS = -W -Wall -Wextra -Werror -fPIC $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS) CFLAGS = -W -Wall -Wextra -fPIC $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS)
CFLAGS += -Wbad-function-cast -Wcast-align -Wconversion -Waggregate-return CFLAGS += -Wbad-function-cast -Wcast-align -Wconversion -Waggregate-return
CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute
CFLAGS += $(VISIBILITY) $(PROF_FLAGS) CFLAGS += $(VISIBILITY) $(PROF_FLAGS)
......
...@@ -16,7 +16,7 @@ ifeq ($(GCOV),GCOV) ...@@ -16,7 +16,7 @@ ifeq ($(GCOV),GCOV)
else else
GCOV_FLAGS = GCOV_FLAGS =
endif endif
CFLAGS = -W -Wall -Wextra -Werror $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS) CFLAGS = -W -Wall -Wextra $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS)
CFLAGS += -Wbad-function-cast -Wcast-align -Waggregate-return CFLAGS += -Wbad-function-cast -Wcast-align -Waggregate-return
CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute
CPPFLAGS += -L../ -L../../range_tree CPPFLAGS += -L../ -L../../range_tree
......
...@@ -13,7 +13,7 @@ else ...@@ -13,7 +13,7 @@ else
GCOV_FLAGS = GCOV_FLAGS =
endif endif
CFLAGS = -W -Wall -Wextra -Werror -g3 -ggdb3 -fPIC $(OPTFLAGS) $(GCOV_FLAGS) CFLAGS = -W -Wall -Wextra -g3 -ggdb3 -fPIC $(OPTFLAGS) $(GCOV_FLAGS)
CFLAGS += -Wbad-function-cast -Wcast-align -Wconversion -Waggregate-return CFLAGS += -Wbad-function-cast -Wcast-align -Wconversion -Waggregate-return
CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute
CPPFLAGS = -I. -I../../include -I../../newbrt CPPFLAGS = -I. -I../../include -I../../newbrt
......
...@@ -13,7 +13,7 @@ endif ...@@ -13,7 +13,7 @@ endif
OPTFLAGS=-O0 OPTFLAGS=-O0
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage # GCOV_FLAGS = -fprofile-arcs -ftest-coverage
CFLAGS = -W -Wall -Wextra -Werror $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS) CFLAGS = -W -Wall -Wextra $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS)
CFLAGS += -Wbad-function-cast -Wcast-align -Wconversion -Waggregate-return CFLAGS += -Wbad-function-cast -Wcast-align -Wconversion -Waggregate-return
CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute
CPPFLAGS += -I../ -I../../../newbrt -I../../../include CPPFLAGS += -I../ -I../../../newbrt -I../../../include
......
...@@ -45,7 +45,10 @@ endif ...@@ -45,7 +45,10 @@ endif
LIBNAME=libdb.$(LIBEXT) LIBNAME=libdb.$(LIBEXT)
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage # GCOV_FLAGS = -fprofile-arcs -ftest-coverage
CFLAGS += -Wall -Werror $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS) CFLAGS += -Wall $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS)
ifneq ($(CC),icc)
CFLAGS += -Werror
endif
TDB_CPPFLAGS = -I../../include TDB_CPPFLAGS = -I../../include
SRCS = $(sort $(wildcard *.c)) SRCS = $(sort $(wildcard *.c))
......
...@@ -2539,10 +2539,10 @@ static int toku_db_del(DB *db, DB_TXN *txn, DBT *key, u_int32_t flags) { ...@@ -2539,10 +2539,10 @@ static int toku_db_del(DB *db, DB_TXN *txn, DBT *key, u_int32_t flags) {
return r2; return r2;
} }
inline void cleanup() { #define cleanup() ({ \
if (data.data) toku_free(data.data); if (data.data) toku_free(data.data); \
if (pkey.data) toku_free(pkey.data); if (pkey.data) toku_free(pkey.data); \
} })
memset(&data, 0, sizeof data); data.flags = DB_DBT_REALLOC; memset(&data, 0, sizeof data); data.flags = DB_DBT_REALLOC;
memset(&pkey, 0, sizeof pkey); pkey.flags = DB_DBT_REALLOC; memset(&pkey, 0, sizeof pkey); pkey.flags = DB_DBT_REALLOC;
......
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