Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
f8055470
Commit
f8055470
authored
Jul 28, 2017
by
gejun
Committed by
iCode
Jul 28, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge "fix the bootstraping hang when program is linked with libunwind"
parents
ab4bea5d
ca2c2625
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
78 additions
and
45 deletions
+78
-45
Makefile
Makefile
+2
-2
mutex.cpp
bthread/mutex.cpp
+35
-2
Makefile
example/asynchronous_echo_c++/Makefile
+1
-1
Makefile
example/backup_request_c++/Makefile
+1
-1
Makefile
example/cancel_c++/Makefile
+1
-1
Makefile
example/cascade_echo_c++/Makefile
+2
-2
Makefile
example/dynamic_partition_echo_c++/Makefile
+2
-2
Makefile
example/echo_c++/Makefile
+1
-1
Makefile
example/echo_c++_hulu_pbrpc/Makefile
+1
-1
Makefile
example/echo_c++_sofa_pbrpc/Makefile
+1
-1
Makefile
example/echo_c++_ubrpc_compack/Makefile
+1
-1
Makefile
example/http_c++/Makefile
+2
-2
Makefile
example/memcache_c++/Makefile
+1
-1
Makefile
example/multi_threaded_echo_c++/Makefile
+2
-2
Makefile
example/multi_threaded_echo_fns_c++/Makefile
+2
-2
Makefile
example/multi_threaded_mcpack_c++/Makefile
+2
-2
Makefile
example/multi_threaded_ubrpc_compack_c++/Makefile
+2
-2
Makefile
example/nshead_extension_c++/Makefile
+1
-1
Makefile
example/nshead_pb_extension_c++/Makefile
+1
-1
Makefile
example/parallel_echo_c++/Makefile
+2
-2
Makefile
example/partition_echo_c++/Makefile
+2
-2
Makefile
example/redis_c++/Makefile
+1
-1
Makefile
example/selective_echo_c++/Makefile
+2
-2
Makefile
example/session_data_and_thread_local/Makefile
+2
-2
Makefile
example/streaming_echo_c++/Makefile
+1
-1
COMAKE
test/COMAKE
+2
-2
Makefile
tools/parallel_http/Makefile
+1
-1
Makefile
tools/rpc_press/Makefile
+1
-1
Makefile
tools/rpc_replay/Makefile
+1
-1
Makefile
tools/rpc_view/Makefile
+1
-1
Makefile
tools/trackme_server/Makefile
+1
-1
No files found.
Makefile
View file @
f8055470
include
config.mk
CPPFLAGS
=
-D__const__
=
-D_GNU_SOURCE
-DNDEBUG
-DUSE_SYMBOLIZE
-DNO_TCMALLOC
-D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS
-D__STDC_CONSTANT_MACROS
-DBRPC_REVISION
=
\"
$(
shell
git rev-parse
--short
HEAD
)
\"
CXXFLAGS
=
$(CPPFLAGS)
-O2
-g
-pipe
-Wall
-W
-Werror
-fPIC
-fstrict-aliasing
-Wno-invalid-offsetof
-Wno-unused-parameter
-
fno-omit-frame-pointer
-
std
=
c++0x
-include
brpc/config.h
CFLAGS
=
$(CPPFLAGS)
-O2
-g
-pipe
-Wall
-W
-Werror
-fPIC
-fstrict-aliasing
-Wno-unused-parameter
-fno-omit-frame-pointer
CXXFLAGS
=
$(CPPFLAGS)
-O2
-g
-pipe
-Wall
-W
-Werror
-fPIC
-fstrict-aliasing
-Wno-invalid-offsetof
-Wno-unused-parameter
-std
=
c++0x
-include
brpc/config.h
CFLAGS
=
$(CPPFLAGS)
-O2
-g
-pipe
-Wall
-W
-Werror
-fPIC
-fstrict-aliasing
-Wno-unused-parameter
INCPATH
=
-I
.
$
(
addprefix
-I
,
$(INCS)
)
SRCEXTS
=
.c .cc .cpp .proto
...
...
bthread/mutex.cpp
View file @
f8055470
...
...
@@ -27,6 +27,10 @@
#include "bthread/processor.h" // cpu_relax, barrier
#include "bthread/types.h" // bthread_mutex_
extern
"C"
{
extern
void
*
_dl_sym
(
void
*
handle
,
const
char
*
symbol
,
void
*
caller
);
}
namespace
bthread
{
// Warm up backtrace before main().
void
*
dummy_buf
[
4
];
...
...
@@ -352,11 +356,40 @@ static MutexOp sys_pthread_mutex_lock = first_sys_pthread_mutex_lock;
static
MutexOp
sys_pthread_mutex_unlock
=
first_sys_pthread_mutex_unlock
;
static
pthread_once_t
init_sys_mutex_lock_once
=
PTHREAD_ONCE_INIT
;
// dlsym may call malloc to allocate space for dlerror and causes contention
// profiler to deadlock at boostraping when the program is linked with
// libunwind. The deadlock bt:
// #0 0x00007effddc99b80 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:81
// #1 0x00000000004b4df7 in base::internal::SpinLockDelay(int volatile*, int, int) ()
// #2 0x00000000004b4d57 in SpinLock::SlowLock() ()
// #3 0x00000000004b4a63 in tcmalloc::ThreadCache::InitModule() ()
// #4 0x00000000004aa2b5 in tcmalloc::ThreadCache::GetCache() ()
// #5 0x000000000040c6c5 in (anonymous namespace)::do_malloc_no_errno(unsigned long) [clone.part.16] ()
// #6 0x00000000006fc125 in tc_calloc ()
// #7 0x00007effdd245690 in _dlerror_run (operate=operate@entry=0x7effdd245130 <dlsym_doit>, args=args@entry=0x7fff483dedf0) at dlerror.c:141
// #8 0x00007effdd245198 in __dlsym (handle=<optimized out>, name=<optimized out>) at dlsym.c:70
// #9 0x0000000000666517 in bthread::init_sys_mutex_lock () at bthread/mutex.cpp:358
// #10 0x00007effddc97a90 in pthread_once () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S:103
// #11 0x000000000066649f in bthread::first_sys_pthread_mutex_lock (mutex=0xbaf880 <_ULx86_64_lock>) at bthread/mutex.cpp:366
// #12 0x00000000006678bc in pthread_mutex_lock_impl (mutex=0xbaf880 <_ULx86_64_lock>) at bthread/mutex.cpp:489
// #13 pthread_mutex_lock (__mutex=__mutex@entry=0xbaf880 <_ULx86_64_lock>) at bthread/mutex.cpp:751
// #14 0x00000000004c6ea1 in _ULx86_64_init () at x86_64/Gglobal.c:83
// #15 0x00000000004c44fb in _ULx86_64_init_local (cursor=0x7fff483df340, uc=0x7fff483def90) at x86_64/Ginit_local.c:47
// #16 0x00000000004b5012 in GetStackTrace(void**, int, int) ()
// #17 0x00000000004b2095 in tcmalloc::PageHeap::GrowHeap(unsigned long) ()
// #18 0x00000000004b23a3 in tcmalloc::PageHeap::New(unsigned long) ()
// #19 0x00000000004ad457 in tcmalloc::CentralFreeList::Populate() ()
// #20 0x00000000004ad628 in tcmalloc::CentralFreeList::FetchFromSpansSafe() ()
// #21 0x00000000004ad6a3 in tcmalloc::CentralFreeList::RemoveRange(void**, void**, int) ()
// #22 0x00000000004b3ed3 in tcmalloc::ThreadCache::FetchFromCentralCache(unsigned long, unsigned long) ()
// #23 0x00000000006fbb9a in tc_malloc ()
// Call _dl_sym which is a private function in glibc to workaround the malloc
// causing deadlock temporarily. This fix is hardly portable.
static
void
init_sys_mutex_lock
()
{
// TODO: may need dlvsym when GLIBC has multiple versions of a same symbol.
// http://blog.fesnel.com/blog/2009/08/25/preloading-with-multiple-symbol-versions
sys_pthread_mutex_lock
=
(
MutexOp
)
dlsym
(
RTLD_NEXT
,
"pthread_mutex_lock"
);
sys_pthread_mutex_unlock
=
(
MutexOp
)
dlsym
(
RTLD_NEXT
,
"pthread_mutex_unlock"
);
sys_pthread_mutex_lock
=
(
MutexOp
)
_dl_sym
(
RTLD_NEXT
,
"pthread_mutex_lock"
,
(
void
*
)
init_sys_mutex_lock
);
sys_pthread_mutex_unlock
=
(
MutexOp
)
_dl_sym
(
RTLD_NEXT
,
"pthread_mutex_unlock"
,
(
void
*
)
init_sys_mutex_lock
);
}
// Make sure pthread functions are ready before main().
...
...
example/asynchronous_echo_c++/Makefile
View file @
f8055470
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
LIBS
+=
$
(
wildcard
$(BRPC_PATH)
/lib/lib
*
.a
)
...
...
example/backup_request_c++/Makefile
View file @
f8055470
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
LIBS
+=
$
(
wildcard
$(BRPC_PATH)
/lib/lib
*
.a
)
...
...
example/cancel_c++/Makefile
View file @
f8055470
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
LIBS
+=
$
(
wildcard
$(BRPC_PATH)
/lib/lib
*
.a
)
...
...
example/cascade_echo_c++/Makefile
View file @
f8055470
LINK_PERFTOOLS
=
0
LINK_PERFTOOLS
=
1
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
...
...
example/dynamic_partition_echo_c++/Makefile
View file @
f8055470
LINK_PERFTOOLS
=
0
LINK_PERFTOOLS
=
1
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
...
...
example/echo_c++/Makefile
View file @
f8055470
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
LIBS
+=
$
(
wildcard
$(BRPC_PATH)
/lib/lib
*
.a
)
...
...
example/echo_c++_hulu_pbrpc/Makefile
View file @
f8055470
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
LIBS
+=
$
(
wildcard
$(BRPC_PATH)
/lib/lib
*
.a
)
...
...
example/echo_c++_sofa_pbrpc/Makefile
View file @
f8055470
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
LIBS
+=
$
(
wildcard
$(BRPC_PATH)
/lib/lib
*
.a
)
...
...
example/echo_c++_ubrpc_compack/Makefile
View file @
f8055470
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
LIBS
+=
$
(
wildcard
$(BRPC_PATH)
/lib/lib
*
.a
)
...
...
example/http_c++/Makefile
View file @
f8055470
LINK_PERFTOOLS
=
0
LINK_PERFTOOLS
=
1
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
-I
$(GFLAGS_PATH)
/include
-I
$(LEVELDB_PATH)
/include
-I
$(PROTOBUF_PATH)
/include
-I
$(TCMALLOC_PATH)
/include
...
...
example/memcache_c++/Makefile
View file @
f8055470
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
LIBS
+=
$
(
wildcard
$(BRPC_PATH)
/lib/lib
*
.a
)
...
...
example/multi_threaded_echo_c++/Makefile
View file @
f8055470
LINK_PERFTOOLS
=
0
LINK_PERFTOOLS
=
1
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
...
...
example/multi_threaded_echo_fns_c++/Makefile
View file @
f8055470
LINK_PERFTOOLS
=
0
LINK_PERFTOOLS
=
1
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
...
...
example/multi_threaded_mcpack_c++/Makefile
View file @
f8055470
LINK_PERFTOOLS
=
0
LINK_PERFTOOLS
=
1
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
...
...
example/multi_threaded_ubrpc_compack_c++/Makefile
View file @
f8055470
LINK_PERFTOOLS
=
0
LINK_PERFTOOLS
=
1
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
...
...
example/nshead_extension_c++/Makefile
View file @
f8055470
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
LIBS
+=
$
(
wildcard
$(BRPC_PATH)
/lib/lib
*
.a
)
...
...
example/nshead_pb_extension_c++/Makefile
View file @
f8055470
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
LIBS
+=
$
(
wildcard
$(BRPC_PATH)
/lib/lib
*
.a
)
...
...
example/parallel_echo_c++/Makefile
View file @
f8055470
LINK_PERFTOOLS
=
0
LINK_PERFTOOLS
=
1
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
...
...
example/partition_echo_c++/Makefile
View file @
f8055470
LINK_PERFTOOLS
=
0
LINK_PERFTOOLS
=
1
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
...
...
example/redis_c++/Makefile
View file @
f8055470
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
LIBS
+=
$
(
wildcard
$(BRPC_PATH)
/lib/lib
*
.a
)
...
...
example/selective_echo_c++/Makefile
View file @
f8055470
LINK_PERFTOOLS
=
0
LINK_PERFTOOLS
=
1
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
...
...
example/session_data_and_thread_local/Makefile
View file @
f8055470
LINK_PERFTOOLS
=
0
LINK_PERFTOOLS
=
1
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
...
...
example/streaming_echo_c++/Makefile
View file @
f8055470
include
../../config.mk
BRPC_PATH
=
../../output
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
INCPATH
=
-I
$(BRPC_PATH)
/include
$
(
addprefix
-I
,
$(INCS)
)
LIBS
+=
$
(
wildcard
$(BRPC_PATH)
/lib/lib
*
.a
)
...
...
test/COMAKE
View file @
f8055470
...
...
@@ -2,8 +2,8 @@
#coding:gbk
WORKROOT
(
'../../../..'
)
CXXFLAGS
(
'-g -pipe -Wall -W -fPIC -Wno-invalid-offsetof -fstrict-aliasing -Wno-unused-parameter -
fno-omit-frame-pointer -
std=c++0x -include brpc/config.h'
)
CFLAGS
(
'-g -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-unused-parameter
-fno-omit-frame-pointer
'
)
CXXFLAGS
(
'-g -pipe -Wall -W -fPIC -Wno-invalid-offsetof -fstrict-aliasing -Wno-unused-parameter -std=c++0x -include brpc/config.h'
)
CFLAGS
(
'-g -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-unused-parameter'
)
CPPFLAGS
(
'-D__const__= -DUSE_SYMBOLIZE -DNO_TCMALLOC -DUNIT_TEST -Dprivate=public -Dprotected=public -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DBVAR_NOT_LINK_DEFAULT_VARIABLES'
)
LDFLAGS
(
'-lpthread -lrt -lssl -lcrypto -ldl -lz'
)
INCPATHS
(
'..'
)
...
...
tools/parallel_http/Makefile
View file @
f8055470
CC
=
gcc
CXX
=
g++
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
GFLAGS_PATH
=
../../../../../third-64/gflags
...
...
tools/rpc_press/Makefile
View file @
f8055470
CC
=
gcc
CXX
=
g++
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
GFLAGS_PATH
=
../../../../../third-64/gflags
...
...
tools/rpc_replay/Makefile
View file @
f8055470
CC
=
gcc
CXX
=
g++
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
GFLAGS_PATH
=
../../../../../third-64/gflags
...
...
tools/rpc_view/Makefile
View file @
f8055470
CC
=
gcc
CXX
=
g++
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
GFLAGS_PATH
=
../../../../../third-64/gflags
...
...
tools/trackme_server/Makefile
View file @
f8055470
CC
=
gcc
CXX
=
g++
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-
fno-omit-frame-pointer
-
Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
GFLAGS_PATH
=
../../../../../third-64/gflags
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment