move link dl to libevent's patch

Signed-off-by: zhoufeng <zhoufeng54@huawei.com>
This commit is contained in:
zhoufeng 2021-04-19 17:12:14 +08:00
parent 4631facee9
commit 51b4f464d6
2 changed files with 14 additions and 1 deletions

View File

@ -1,4 +1,4 @@
set(libevent_CFLAGS "-fstack-protector-all -D_FORTIFY_SOURCE=2 -O2 -ldl")
set(libevent_CFLAGS "-fstack-protector-all -D_FORTIFY_SOURCE=2 -O2")
if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
set(libevent_LDFLAGS "-Wl,-z,now")
endif()
@ -19,6 +19,7 @@ mindspore_add_pkg(libevent
LIBS event event_pthreads event_core event_openssl
URL ${REQ_URL}
MD5 ${MD5}
PATCHES ${CMAKE_SOURCE_DIR}/third_party/patch/libevent/libevent.patch001
CMAKE_OPTION -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING=OFF -DOPENSSL_ROOT_DIR:PATH=${openssl_ROOT})
include_directories(${libevent_INC})

View File

@ -0,0 +1,12 @@
diff -Npur libevent/CMakeLists.txt libevent-modify/CMakeLists.txt
--- libevent/CMakeLists.txt 2020-07-05 20:02:46.000000000 +0800
+++ libevent-modify/CMakeLists.txt 2021-04-19 16:36:57.982307500 +0800
@@ -852,7 +852,7 @@ if (NOT EVENT__DISABLE_OPENSSL)
list(APPEND SRC_OPENSSL bufferevent_openssl.c)
list(APPEND HDR_PUBLIC include/event2/bufferevent_ssl.h)
- list(APPEND LIB_APPS ${OPENSSL_LIBRARIES})
+ list(APPEND LIB_APPS ${OPENSSL_LIBRARIES} -ldl)
endif()
if (NOT EVENT__DISABLE_THREAD_SUPPORT)