Merge "uml: init: add USER_MODE_LINUX cflag, USER_MODE_LINUX case in init.cpp" am: a022ea424d am: c1e78e1331 am: be2a262b47

am: 6bcf4fb8b5

Change-Id: I1b6656bc4ec0dbebccb4fe92c6f73f9be6965353
This commit is contained in:
Quang Luong 2017-07-18 23:24:51 +00:00 committed by android-build-merger
commit 559674dbe3
2 changed files with 8 additions and 1 deletions

View file

@ -28,6 +28,10 @@ endif
init_options += -DLOG_UEVENTS=0
ifeq ($(TARGET_USER_MODE_LINUX), true)
init_cflags += -DUSER_MODE_LINUX
endif
init_cflags += \
$(init_options) \
-Wall -Wextra \

View file

@ -391,7 +391,10 @@ static int set_mmap_rnd_bits_action(const std::vector<std::string>& args)
int ret = -1;
/* values are arch-dependent */
#if defined(__aarch64__)
#if defined(USER_MODE_LINUX)
/* uml does not support mmap_rnd_bits */
ret = 0;
#elif defined(__aarch64__)
/* arm64 supports 18 - 33 bits depending on pagesize and VA_SIZE */
if (set_mmap_rnd_bits_min(33, 24, false)
&& set_mmap_rnd_bits_min(16, 16, true)) {