[V3,1/4] Android NDK: necessary Makefile changes

Submitted by Zhang, Ning A on April 4, 2019, 2:22 a.m.

Details

Message ID 20190404022232.17124-2-ning.a.zhang@intel.com
State New
Series "patches for build CRIU with Android NDK"
Headers show

Commit Message

Zhang, Ning A April 4, 2019, 2:22 a.m.
From: Zhang Ning <ning.a.zhang@intel.com>

1, do not hardcode libnl's cflags
    when cross compile CRIU, libnl's header file should not point to host.

2, remove link to rt
    Android NDK doesn't have library rt, and CRIU is not really need it,
    so disable it to pass link

Cc: Chen Hu <hu1.chen@intel.com>
Signed-off-by: Zhang Ning <ning.a.zhang@intel.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 criu/Makefile          | 2 +-
 criu/Makefile.packages | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/Makefile b/criu/Makefile
index bcfb7162..79787817 100644
--- a/criu/Makefile
+++ b/criu/Makefile
@@ -26,7 +26,7 @@  ccflags-y		+= -iquote include
 ccflags-y		+= -iquote images
 ccflags-y		+= -iquote $(ARCH_DIR)/include
 ccflags-y		+= -iquote .
-ccflags-y		+= -I/usr/include/libnl3
+ccflags-y		+= $(shell pkg-config --cflags libnl-3.0)
 ccflags-y		+= $(COMPEL_UAPI_INCLUDES)
 ccflags-y		+= $(CONFIG-DEFINES)
 
diff --git a/criu/Makefile.packages b/criu/Makefile.packages
index d828cb61..b01b4b04 100644
--- a/criu/Makefile.packages
+++ b/criu/Makefile.packages
@@ -32,7 +32,7 @@  REQ-DEB-PKG-NAMES	+= python-future
 REQ-RPM-PKG-TEST-NAMES	+= $(PYTHON)-pyyaml
 endif
 
-export LIBS		+= -lrt -lprotobuf-c -ldl -lnl-3 -lsoccr -Lsoccr/ -lnet
+export LIBS		+= -lprotobuf-c -ldl -lnl-3 -lsoccr -Lsoccr/ -lnet
 
 check-packages-failed:
 	$(warning Can not find some of the required libraries)