1# Copyright 2017 The Fuchsia Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5LOCAL_DIR := $(GET_LOCAL_DIR)
6
7MODULE := $(LOCAL_DIR)
8
9MODULE_SRCS += $(LOCAL_DIR)/jitterentropy-base.c
10
11KERNEL_INCLUDES += $(LOCAL_DIR)/include
12
13# According to its documentation, jitterentropy must be compiled at optimization
14# level -O0.
15#
16# TODO(SEC-14): Test the code generated at various optimization levels. If there
17# is a significant difference in entropy quality, replace the relevant C code by
18# assembly code to protect against future compiler changes.
19#
20# The original Makefile also specifies -fwrapv.
21#
22# Several flags related to stack-protection were removed, for compiler
23# compatibility.
24MODULE_CFLAGS += -O0 -fwrapv -I $(LOCAL_DIR)/arch/$(ARCH)
25
26include make/module.mk
27