summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYurii Shutkin <shutkin@google.com>2024-02-16 04:54:13 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2024-02-16 04:54:13 +0000
commitcfe21b08e64f7c535734f2d117b31fc8d0b9a810 (patch)
tree1edcab065584cc2db2d42addcf748567437c60d2
parent8f15befc5e4d236d437a0d2436ef2ac49bbba398 (diff)
parent1d7c1bb67ec05bbd60f8e0ea91471bed6b516840 (diff)
downloadtrusty-cfe21b08e64f7c535734f2d117b31fc8d0b9a810.tar.gz
libc: move libc rand to separate module to speedup rebuilds am: 1d7c1bb67e
Original change: https://android-review.googlesource.com/c/trusty/lk/trusty/+/2904130 Change-Id: I8e8f600824b8f308b7d4d5e35bfff7ea03ae5ca2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--lib/libc-trusty/rules.mk13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/libc-trusty/rules.mk b/lib/libc-trusty/rules.mk
index 9a223a0..f13cbe2 100644
--- a/lib/libc-trusty/rules.mk
+++ b/lib/libc-trusty/rules.mk
@@ -32,15 +32,6 @@ ifndef WITH_CUSTOM_MALLOC
MODULE_DEPS += lib/heap
endif
-# Generate a random 32-bit seed for the RNG
-KERNEL_LIBC_RANDSEED_HEX := $(shell xxd -l4 -g0 -p /dev/urandom)
-KERNEL_LIBC_RANDSEED := 0x$(KERNEL_LIBC_RANDSEED_HEX)U
-
-MODULE_DEFINES += \
- KERNEL_LIBC_RANDSEED=$(KERNEL_LIBC_RANDSEED) \
-
-$(info KERNEL_LIBC_RANDSEED = $(KERNEL_LIBC_RANDSEED))
-
# Clang currently generates incorrect code when it simplifies calls to libc
# and then inlines them. The simplification pass does not set a calling
# convention on the new call, leading to problems when inlining.
@@ -115,7 +106,6 @@ MODULE_SRCS := \
$(LK_DIR)/lib/libc/eabi_unwind_stubs.c \
$(LK_DIR)/lib/libc/io_handle.c \
$(LK_DIR)/lib/libc/printf.c \
- $(LK_DIR)/lib/libc/rand.c \
$(LK_DIR)/lib/libc/stdio.c \
$(LK_DIR)/lib/libc/strtol.c \
$(LK_DIR)/lib/libc/strtoll.c \
@@ -126,6 +116,9 @@ MODULE_SRCS += \
$(LK_DIR)/lib/libc/atexit.c \
$(LK_DIR)/lib/libc/pure_virtual.cpp
+MODULE_DEPS += \
+ $(LK_DIR)/lib/libc/rand
+
# These stubs are only needed because binder uses libutils which uses pthreads mutex directly
MODULE_SRCS += \
$(LIBC_TRUSTY_DIR)/pthreads.c