Commit d075df66 authored by Gert Wollny's avatar Gert Wollny

Correct use of flags and dynamic linking

parent 9cf17317
......@@ -5,8 +5,9 @@ berkeley-express (1.5.1-2) UNRELEASED; urgency=medium
* cme fix dpkg-control:
- update standards version to 3.9.8
- update to secure packaging urls
* d/p/correct-debug-flags: don't force debug flags and static
linking of BOOST
* d/p/correct-debug-flags: don't force debug flags and
dynamically link to BOOST, protobuf and tcmalloc_minimal
* d/rules: enable hardening
-- Gert Wollny <gw.fossdev@gmail.com> Tue, 26 Jul 2016 18:38:52 +0000
......
Description: remove forced flags and set dynamic linking
Remove the forced flags so that Debian flags will be used, and
link dynamically to all libraries
Author: Gert Wollny <gw.fossdev@gmail.com>
Forwarded: no
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,12 +8,12 @@
@@ -6,14 +6,13 @@
set(${PROJECT_NAME}_VERSION_MINOR 5)
set(${PROJECT_NAME}_VERSION_PATCH 1)
set(CMAKE_CXX_FLAGS "-Wall")
-set(CMAKE_CXX_FLAGS_DEBUG "-g ${CMAKE_CXX_FLAGS}")
-set(CMAKE_CXX_FLAGS_RHDEBINFO "-O3 -g ${CMAKE_CXX_FLAGS}")
-set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os ${CMAKE_CXX_FLAGS}")
-set(CMAKE_CXX_FLAGS "-Wall")
+#set(CMAKE_CXX_FLAGS "-Wall")
+#set(CMAKE_CXX_FLAGS_DEBUG "-g ${CMAKE_CXX_FLAGS}")
+#set(CMAKE_CXX_FLAGS_RHDEBINFO "-O3 -g ${CMAKE_CXX_FLAGS}")
+#set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os ${CMAKE_CXX_FLAGS}")
-set(CMAKE_CXX_FLAGS_DEBUG "-g ${CMAKE_CXX_FLAGS}")
-set(CMAKE_CXX_FLAGS_RHDEBINFO "-O3 -g ${CMAKE_CXX_FLAGS}")
-set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os ${CMAKE_CXX_FLAGS}")
-
-set(CMAKE_BUILD_TYPE Release)
-set(Boost_USE_STATIC_LIBS ON)
+#set(CMAKE_BUILD_TYPE Release)
......@@ -18,3 +27,23 @@
find_package(Boost 1.39
COMPONENTS
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -10,7 +10,7 @@
set(LIBRARIES ${Boost_LIBRARIES})
if (GPERFTOOLS_TCMALLOC)
- set(LIBRARIES ${LIBRARIES} "libtcmalloc_minimal.a")
+ set(LIBRARIES ${LIBRARIES} "libtcmalloc_minimal.so")
endif (GPERFTOOLS_TCMALLOC)
if(WIN32)
@@ -20,7 +20,7 @@
endif(WIN32)
if (PROTOBUF_FOUND)
- set(LIBRARIES ${LIBRARIES} "libprotobuf.a")
+ set(LIBRARIES ${LIBRARIES} "libprotobuf.so")
endif(PROTOBUF_FOUND)
target_link_libraries(express ${LIBRARIES})
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DH_VERBOSE := 1
%:
......
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