Commit 4fb33dd9 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

Try to get linking to work right. Addresses #1032, #1343, #1328.

git-svn-id: file:///svn/toku/tokudb.1032b+1343@8454 c7de825b-a66e-492c-adef-691d508d4ae1
parent 7cc6e1fb
...@@ -91,7 +91,7 @@ COMBINE_C = -combine -c ...@@ -91,7 +91,7 @@ COMBINE_C = -combine -c
LIBPORTABILITY = $(TOKUROOT)lib/libtokuportability.$(AEXT) LIBPORTABILITY = $(TOKUROOT)lib/libtokuportability.$(AEXT)
PORTABILITY_HEADERS= $(TOKUROOT)linux PORTABILITY_HEADERS= $(TOKUROOT)linux
ALWAYS_LINK= -lz -lpthread ALWAYS_LINK= $(LIBPORTABILITY) -lz -lpthread
C99 = -std=c99 C99 = -std=c99
W64 = #-Wshorten-64-to-32 W64 = #-Wshorten-64-to-32
BINOUTPUT = -o BINOUTPUT = -o
...@@ -128,6 +128,7 @@ LINK_DLINK_FILES=$(patsubst %,$(LINK)%,$(notdir $(DLINK_FILES_PREPROCESS_2))) ...@@ -128,6 +128,7 @@ LINK_DLINK_FILES=$(patsubst %,$(LINK)%,$(notdir $(DLINK_FILES_PREPROCESS_2)))
CRUNTIME= CRUNTIME=
DEPEND_LINK += \ DEPEND_LINK += \
$(LIBPORTABILITY) \
$(LINK_FILES) \ $(LINK_FILES) \
# keep this line so I can have a \ on the previous line # keep this line so I can have a \ on the previous line
...@@ -184,7 +185,7 @@ ifneq ($(CYGWIN),) ...@@ -184,7 +185,7 @@ ifneq ($(CYGWIN),)
#Cygwin (Windows) Must override some settings #Cygwin (Windows) Must override some settings
BINSUF=.exe BINSUF=.exe
WRONGBINSUF=#empty WRONGBINSUF=#empty
ALWAYS_LINK=/usr/lib/libz.a ALWAYS_LINK=$(LIBPORTABILITY) /usr/lib/libz.a
VGRIND =#No Valgrind in cygwin VGRIND =#No Valgrind in cygwin
HGRIND =#No Hgrind in cygwin HGRIND =#No Hgrind in cygwin
FPICFLAGS=#FPIC is default and not allowed as an option. FPICFLAGS=#FPIC is default and not allowed as an option.
...@@ -199,7 +200,7 @@ ifneq ($(CYGWIN),) ...@@ -199,7 +200,7 @@ ifneq ($(CYGWIN),)
CRUNTIME=MDd CRUNTIME=MDd
endif endif
endif endif
ALWAYS_LINK=$(TOKUROOT)windows/lib/$(CRUNTIME)/zlib.lib Ws2_32.lib psapi.lib ALWAYS_LINK=$(LIBPORTABILITY) $(TOKUROOT)windows/lib/$(CRUNTIME)/zlib.lib Ws2_32.lib psapi.lib
LINK=#Empty LINK=#Empty
BINOUTPUT=-Fe BINOUTPUT=-Fe
OOUTPUT=-Fo OOUTPUT=-Fo
......
...@@ -56,7 +56,7 @@ int toku_os_initialize_settings(int verbosity) __attribute__((__visibility__("d ...@@ -56,7 +56,7 @@ int toku_os_initialize_settings(int verbosity) __attribute__((__visibility__("d
// //
// this int acts like a bool, returns 0 for false, 1 for true // this int acts like a bool, returns 0 for false, 1 for true
// //
int toku_os_is_absolute_name(const char* path); int toku_os_is_absolute_name(const char* path) __attribute__((__visibility__("default")));
#if defined __cplusplus #if defined __cplusplus
}; };
......
...@@ -16,10 +16,6 @@ ...@@ -16,10 +16,6 @@
toku_add_trace_mem; toku_add_trace_mem;
toku_print_trace_mem; toku_print_trace_mem;
toku_os_mkdir;
toku_free;
toku_os_initialize_settings;
local: *; local: *;
}; };
...@@ -158,7 +158,6 @@ endif ...@@ -158,7 +158,6 @@ endif
%.bdb$(BINSUF): CFLAGS+= -DENVDIR=\"dir.$<.bdb\" -DUSE_BDB -DIS_TDB=0 %.bdb$(BINSUF): CFLAGS+= -DENVDIR=\"dir.$<.bdb\" -DUSE_BDB -DIS_TDB=0
%.bdb$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) %.bdb$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK)
echo portability now $(LIBPORTABILITY)
$(MAYBEATSIGN)$(CC) $< $(BIN_FROM_C_FLAGS) $(LIBPORTABILITY) $(MAYBEATSIGN)$(CC) $< $(BIN_FROM_C_FLAGS) $(LIBPORTABILITY)
%.tdb$(BINSUF): DLINK_FILES+=$(LIBTDB) %.tdb$(BINSUF): DLINK_FILES+=$(LIBTDB)
......
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