aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-04-09 09:00:42 +0200
committerDamjan Marion <dmarion@me.com>2019-04-09 23:46:41 +0000
commite035892055a7bd73297e22aefd4dcabe966e9b51 (patch)
tree56f835f8e23c8acd28899e24d9657411d1d0a6e5
parented1d872a8c2e3c2ed2cc5b36aa90ded599cf91c4 (diff)
rdma-core: add debug build option
Add option RDMA_CORE_DEBUG=[yn] build option. rdma-core package is built in Release (-O2) mode by default, but Debug (-O0 -g) mode can be selected by eg. make install-ext-deps RDMA_CORE_DEBUG=y Change-Id: Id4db5ef1e7b13c44d478755a0bfbdbe56cfc13df Signed-off-by: Benoît Ganne <bganne@cisco.com>
-rw-r--r--build/external/packages/rdma-core.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/build/external/packages/rdma-core.mk b/build/external/packages/rdma-core.mk
index 9961c80364f..09f826ce8b2 100644
--- a/build/external/packages/rdma-core.mk
+++ b/build/external/packages/rdma-core.mk
@@ -11,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+RDMA_CORE_DEBUG?=n
+
rdma-core_version := 23
rdma-core_tarball := rdma-core-$(rdma-core_version).tar.gz
rdma-core_tarball_md5sum_22.1 := dde4d30e3db20893408ae51041117034
@@ -19,6 +21,11 @@ rdma-core_tarball_md5sum := $(rdma-core_tarball_md5sum_$(rdma-core_version)
rdma-core_tarball_strip_dirs := 1
rdma-core_url := http://github.com/linux-rdma/rdma-core/releases/download/v$(rdma-core_version)/$(rdma-core_tarball)
+RDMA_BUILD_TYPE:=Release
+ifeq ($(RDMA_CORE_DEBUG),y)
+RDMA_BUILD_TYPE:=Debug
+endif
+
RDMA_FILES := include/infiniband/verbs.h \
include/infiniband/verbs_api.h \
include/infiniband/ib_user_ioctl_verbs.h \
@@ -30,7 +37,7 @@ define rdma-core_config_cmds
cd $(rdma-core_build_dir) && \
$(CMAKE) -G Ninja $(rdma-core_src_dir) \
-DENABLE_STATIC=1 -DENABLE_RESOLVE_NEIGH=0 -DNO_PYVERBS=1 -DENABLE_VALGRIND=0 \
- -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_BUILD_TYPE=$(RDMA_BUILD_TYPE) \
-DCMAKE_C_FLAGS='-fPIC -fvisibility=hidden' > $(rdma-core_config_log)
endef